/* kyc-management.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;
    display: flex;
    flex-direction: row;
}

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

/* Sidebar with Modern Design */
.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);
    transition: all 0.3s ease;
    overflow-y: auto;
}

.sidebar-header {
    padding: 0 24px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 24px;
}

.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;
}

.logo img {
    height: 32px;
}

.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;
}

/* Navigation Items */
.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;
    position: relative;
    border-radius: 0 25px 25px 0;
    margin: 4px 0;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.nav-item:focus {
    outline: 2px solid #2b8be6;
    outline-offset: 2px;
}

.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);
    transform: translateX(5px);
    position: relative;
}

.nav-item.active-page::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid #5468f2;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.nav-item.active-page .material-icons {
    color: #5468f2;
}

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

.nav-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    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);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.return-btn .material-icons {
    font-size: 20px;
}

.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;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.2));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 25px;
    font-size: 14px;
    color: #10b981;
    font-weight: 500;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

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

/* View transitions */
.view {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.view.hidden {
    display: none;
}

.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;
}

/* KYC Dashboard Grid */
.kyc-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.kyc-stat-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;
}

.kyc-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

.stat-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #2b8be6, #5468f2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.stat-title {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #2b8be6;
    margin-bottom: 8px;
}

.stat-label {
    color: #8c99a8;
    font-size: 14px;
}

/* KYC Table */
.kyc-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.kyc-table th,
.kyc-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.kyc-table th {
    background: rgba(43,139,230,0.1);
    color: #2b8be6;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kyc-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-approved {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.status-pending {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.status-rejected {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.status-review {
    background: linear-gradient(135deg, #2b8be6, #1f74c9);
    color: white;
}

/* Buttons */
.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);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

/* 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: 600px;
    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-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #f2f5f9;
    font-size: 14px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 14px;
    color: #f2f5f9;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

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

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

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

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

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

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

    .content {
        padding: 20px;
    }

    .kyc-dashboard {
        grid-template-columns: 1fr;
    }

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

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

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

.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;
}

@keyframes chatbotPulse {
    0% {
        box-shadow: 0 8px 25px rgba(43,139,230,0.4), 0 0 0 0 rgba(43,139,230,0.7);
    }
    70% {
        box-shadow: 0 8px 25px rgba(43,139,230,0.4), 0 0 0 15px rgba(43,139,230,0);
    }
    100% {
        box-shadow: 0 8px 25px rgba(43,139,230,0.4), 0 0 0 0 rgba(43,139,230,0);
    }
}

.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-window.active {
    display: flex;
    transform: translateY(0);
    opacity: 1;
}

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

.chatbot-header-info {
    display: flex;
    align-items: center;
}

.chatbot-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-image: url('../pria-avatar.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.chatbot-info {
    flex: 1;
}

.chatbot-name {
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 4px;
}

.chatbot-status {
    font-size: 14px;
    opacity: 0.9;
    display: flex;
    align-items: center;
}

.status-indicator-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

.chatbot-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.quick-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.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;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.bot {
    display: flex;
    align-items: flex-start;
}

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

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2b8be6, #5468f2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}

.message-content {
    max-width: 85%;
    padding: 16px 20px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
}

.message.bot .message-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f2f5f9;
    border-bottom-left-radius: 6px;
}

.message.user .message-content {
    background: linear-gradient(135deg, #2b8be6, #5468f2);
    color: white;
    border-bottom-right-radius: 6px;
}

.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);
}

.chatbot-input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    font-size: 14px;
    color: #f2f5f9;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

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

#chatbot-ai-btn:hover {
    background: linear-gradient(135deg, rgba(43,139,230,0.4), rgba(84,104,242,0.5));
    border-color: #5468f2;
    color: #b8c1fa;
    transform: scale(1.08);
    box-shadow: 0 0 16px rgba(84,104,242,0.4);
}
#chatbot-ai-btn.loading {
    pointer-events: none;
    animation: sparkle-pulse 1.2s ease-in-out infinite;
}
@keyframes sparkle-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(84,104,242,0.3); }
    50% { opacity: 0.6; box-shadow: 0 0 20px rgba(84,104,242,0.6); }
}

/* AI-powered chatbot response (outcome-results style inside chatbot) */
.message.bot .message-content.ai-styled {
    background: rgba(11,14,19,0.85);
    border: 1px solid rgba(43,139,230,0.25);
    max-width: 92%;
    padding: 20px;
}
.message.bot .message-content.ai-styled .ai-response {
    line-height: 1.7;
    color: #ffffff;
    font-size: 13px;
}
.message.bot .message-content.ai-styled .ai-response h2 {
    font-weight: 700;
    color: #2b8be6;
    margin: 16px 0 8px 0;
    border-bottom: 1px solid rgba(43,139,230,0.3);
    padding-bottom: 6px;
    font-size: 15px;
}
.message.bot .message-content.ai-styled .ai-response h3 {
    color: #2b8be6;
    font-weight: 600;
    margin: 14px 0 6px 0;
    font-size: 14px;
}
.message.bot .message-content.ai-styled .ai-response p {
    margin-bottom: 10px;
    color: #c9d2dc;
}
.message.bot .message-content.ai-styled .ai-response ul,
.message.bot .message-content.ai-styled .ai-response ol {
    padding-left: 20px;
    margin: 8px 0;
}
.message.bot .message-content.ai-styled .ai-response li {
    margin-bottom: 6px;
    color: #c9d2dc;
}
.message.bot .message-content.ai-styled .ai-response ul li {
    list-style-type: disc;
}
.message.bot .message-content.ai-styled .ai-response ul li::marker {
    color: #2b8be6;
}
.message.bot .message-content.ai-styled .ai-response ol li {
    list-style-type: decimal;
}
.message.bot .message-content.ai-styled .claude-stream-text {
    white-space: pre-wrap;
    word-break: break-word;
    color: #c9d2dc;
}

.chatbot-input::placeholder {
    color: #8c99a8;
}

.quick-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.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;
}

.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(-10px);
        opacity: 1;
    }
}

/* 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;
    }
}
