/* customer-persona-manager.html — page-specific styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0b0e13 0%, #141c28 100%);
    min-height: 100vh;
    color: #c9d2dc;
    line-height: 1.6;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 24px 0;
    box-shadow: 2px 0 25px rgba(0,0,0,0.3);
    overflow-y: auto;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #ff6b00, #ff9933);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-buttons {
    margin-top: 16px;
}

.header-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #8c99a8;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
}

.header-btn:hover {
    background: rgba(43,139,230,0.2);
    border-color: #2b8be6;
    color: #2b8be6;
}

.header-btn .material-icons {
    font-size: 18px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: none;
    color: white;
    width: 100%;
    text-align: left;
    border-radius: 0 25px 25px 0;
    margin: 4px 0;
}

.nav-item.active-page {
    background: linear-gradient(135deg, rgba(43,139,230,0.3), rgba(84,104,242,0.3));
    border-left: 4px solid #5468f2;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(84,104,242,0.3);
}

.nav-item .material-icons {
    margin-right: 12px;
    font-size: 20px;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.02);
}

.header {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.return-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    backdrop-filter: blur(10px);
}

.return-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(-2px);
}

.header-title {
    font-size: 28px;
    font-weight: 700;
    margin-left: 20px;
    background: linear-gradient(135deg, #ff6b00, #ff9933);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, #2b8be6, #5468f2);
    color: white;
    box-shadow: 0 4px 15px rgba(43,139,230,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(43,139,230,0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

/* Content Area */
.content {
    padding: 32px;
    flex: 1;
    overflow-y: auto;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    margin-bottom: 32px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.4);
}

.card-header {
    padding: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(43,139,230,0.1), rgba(84,104,242,0.1));
}

.card-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #f2f5f9;
}

.card-subtitle {
    color: #8c99a8;
    font-size: 16px;
    font-weight: 400;
}

.card-content {
    padding: 32px;
}

/* Persona Grid */
.persona-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.persona-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.persona-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(43,139,230,0.3);
}

.persona-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.persona-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2b8be6, #5468f2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 600;
}

.persona-info h3 {
    color: #f2f5f9;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.persona-info p {
    color: #8c99a8;
    font-size: 14px;
}

.persona-attributes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.attribute-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 12px;
}

.attribute-label {
    color: #8c99a8;
}

.attribute-value {
    color: #f2f5f9;
    font-weight: 500;
}

.risk-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
}

.risk-low {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.risk-medium {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.risk-high {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Search and Filter */
.search-filter-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 300px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #f2f5f9;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #2b8be6;
    background: rgba(255, 255, 255, 0.1);
}

.filter-select {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #f2f5f9;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.filter-select:focus {
    border-color: #2b8be6;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.modal-content {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    margin: 5% auto;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    color: #f2f5f9;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.modal-close {
    color: #8c99a8;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    background: none;
    border: none;
    padding: 8px;
    border-radius: 8px;
}

.modal-close:hover {
    color: #f2f5f9;
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #2b8be6;
    background: rgba(255, 255, 255, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.modal-footer {
    padding: 24px 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 80px;
    }

    .sidebar .nav-text {
        display: none;
    }

    .header-title {
        font-size: 20px;
    }

    .content {
        padding: 20px;
    }

    .persona-grid {
        grid-template-columns: 1fr;
    }

    .search-filter-bar {
        flex-direction: column;
    }

    .search-input {
        min-width: auto;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Modern Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 1000;
}

.issues-tracker-form {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.1);
    max-height: calc(90vh - 80px);
}

.form-group {
    margin-bottom: 20px;
}

.form-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.form-success {
    text-align: center;
    padding: 40px 20px;
    color: #10b981;
}

.form-success .material-icons {
    font-size: 48px;
    margin-bottom: 16px;
}

.form-success h3 {
    margin-bottom: 8px;
    color: #f2f5f9;
}

.form-success p {
    color: #8c99a8;
    font-size: 14px;
}

.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 80px;
    }

    .sidebar .nav-text {
        display: none;
    }

    .header-title {
        font-size: 20px;
    }

    .content {
        padding: 20px;
    }

    .persona-grid {
        grid-template-columns: 1fr;
    }

    .search-filter-bar {
        flex-direction: column;
    }

    .search-input {
        min-width: auto;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .issues-tracker-window {
        width: 320px;
        max-height: 85vh;
        min-height: 400px;
        right: 50px;
    }

    .issues-tracker-container {
        top: 50%;
        right: 0;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .issues-tracker-window {
        width: 280px;
        max-height: 80vh;
        min-height: 350px;
        right: 40px;
    }

    .issues-tracker-form {
        max-height: calc(80vh - 80px);
        padding: 16px;
    }

    .issues-tracker-trigger {
        width: 50px;
        height: 50px;
    }

    .issues-tracker-trigger .material-icons {
        font-size: 20px;
    }
}

.chatbot-trigger {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #2b8be6, #5468f2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(43,139,230,0.4);
    transition: all 0.3s ease;
    border: none;
    color: white;
    animation: chatbotPulse 3s infinite;
}

.chatbot-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(43,139,230,0.5);
}

.chatbot-trigger .material-icons {
    font-size: 32px;
}

.chatbot-window {
    position: fixed;
    bottom: 122px;
    right: 32px;
    width: 380px;
    height: calc(100vh - 210px);
    max-height: calc(100vh - 210px);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
}

.chatbot-header {
    background: linear-gradient(135deg, #2b8be6, #5468f2);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.quick-action {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #8c99a8;
}

.quick-action:hover {
    background: rgba(43,139,230,0.2);
    border-color: #2b8be6;
    color: #2b8be6;
}

.chatbot-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.1);
}

.message {
    margin-bottom: 20px;
    animation: messageSlideIn 0.4s ease;
}

.message.user {
    display: flex;
    justify-content: flex-end;
}

.chatbot-input-area {
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.message.bot .message-content.ai-styled .ai-response {
    line-height: 1.7;
    color: #ffffff;
    font-size: 13px;
}

.typing-indicator {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.typing-dots {
    display: flex;
    gap: 6px;
    margin-left: 12px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #8c99a8;
    border-radius: 50%;
    animation: typingDot 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-12px);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Responsive chatbot */
@media (max-width: 480px) {
    .chatbot-window {
        width: 320px;
        height: calc(100vh - 190px);
        max-height: calc(100vh - 190px);
        right: 16px;
        bottom: 80px;
    }

    .chatbot-trigger {
        width: 60px;
        height: 60px;
        right: 16px;
        bottom: 16px;
    }

    .chatbot-trigger .material-icons {
        font-size: 28px;
    }
}

.sample-data-btn {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
}

.sample-data-btn:hover {
    background: linear-gradient(135deg, #45a049, #5bb974);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.sample-data-btn .material-icons {
    font-size: 1.1rem;
}
