/* ==================== CSS Reset & Base ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --success: #16a34a;
    --success-light: #bbf7d0;
    --warning: #ea580c;
    --warning-light: #fed7aa;
    --danger: #dc2626;
    --info: #0284c7;
    --info-light: #bae6fd;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --sidebar-width: 250px;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.5;
}

/* ==================== Layout ==================== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ==================== Sidebar ==================== */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(135deg, var(--gray-900), var(--gray-800));
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.logo {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo-icon {
    font-size: 28px;
    color: var(--primary-light);
}

.logo h2 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.nav-menu {
    padding: 16px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: var(--gray-400);
    font-size: 14px;
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.2s;
    text-align: left;
    width: 100%;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.nav-btn.active {
    background: var(--primary);
    color: #fff;
    font-weight: 500;
}

.nav-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
    color: var(--gray-500);
}

/* ==================== Main Content ==================== */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 0;
    min-height: 100vh;
}

.top-header {
    background: #fff;
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-900);
}

.current-date {
    color: var(--gray-500);
    font-size: 14px;
}

/* ==================== Views ==================== */
.view {
    display: none;
    padding: 32px;
    animation: fadeIn 0.3s ease;
}

.view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== Stats Grid ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: #fff;
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--gray-300);
}

.stat-card.stat-total { border-left-color: var(--primary); }
.stat-card.stat-pending { border-left-color: var(--warning); }
.stat-card.stat-processing { border-left-color: var(--info); }
.stat-card.stat-completed { border-left-color: var(--success); }

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-label {
    font-size: 14px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* ==================== Section Header ==================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
}

.filter-bar select,
.filter-bar input {
    padding: 8px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 14px;
    background: #fff;
    color: var(--gray-700);
}

.filter-bar input {
    min-width: 240px;
}

/* ==================== Table ==================== */
.table-container {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: var(--gray-50);
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    border-bottom: 2px solid var(--gray-200);
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 14px;
    color: var(--gray-700);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

.empty-state {
    text-align: center !important;
    color: var(--gray-400) !important;
    padding: 40px 16px !important;
    font-style: italic;
}

/* ==================== Stage Badges ==================== */
.stage-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.stage-badge.stage-1 { background: #ede9fe; color: #6d28d9; }
.stage-badge.stage-2 { background: #dbeafe; color: #1d4ed8; }
.stage-badge.stage-3 { background: #fef3c7; color: #b45309; }
.stage-badge.stage-4 { background: #ffedd5; color: #c2410c; }
.stage-badge.stage-5 { background: #d1fae5; color: #047857; }
.stage-badge.stage-6 { background: #bbf7d0; color: #15803d; }

/* ==================== Buttons ==================== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}
.btn-secondary:hover { background: var(--gray-300); }

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-success {
    background: var(--success);
    color: #fff;
}
.btn-success:hover { background: #15803d; }

.btn-info {
    background: var(--info);
    color: #fff;
}
.btn-info:hover { background: #0369a1; }

.btn-outline {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-600);
}
.btn-outline:hover {
    background: var(--gray-100);
}

/* ==================== Form ==================== */
.form-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
    max-width: 800px;
}

.form-card h2 {
    margin-bottom: 24px;
    font-size: 20px;
    color: var(--gray-900);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
}

.required {
    color: var(--danger);
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--gray-800);
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group textarea {
    resize: vertical;
}

.file-upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--gray-50);
}

.file-upload-area:hover {
    border-color: var(--primary);
    background: #f0f0ff;
}

.upload-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.upload-success .upload-icon {
    color: var(--success);
}

.file-upload-area p {
    font-size: 14px;
    color: var(--gray-500);
}

.form-actions {
    margin-top: 28px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ==================== Pipeline Board (Admin) ==================== */
.pipeline-board {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
}

.pipeline-column {
    background: var(--gray-50);
    border-radius: var(--radius);
    min-width: 200px;
    min-height: 300px;
}

.pipeline-header {
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius) var(--radius) 0 0;
    text-align: center;
}

.pipeline-header.stage-1 { background: #ede9fe; color: #6d28d9; }
.pipeline-header.stage-2 { background: #dbeafe; color: #1d4ed8; }
.pipeline-header.stage-3 { background: #fef3c7; color: #b45309; }
.pipeline-header.stage-4 { background: #ffedd5; color: #c2410c; }
.pipeline-header.stage-5 { background: #d1fae5; color: #047857; }
.pipeline-header.stage-6 { background: #bbf7d0; color: #15803d; }

.pipeline-cards {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pipeline-card {
    background: #fff;
    padding: 14px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid var(--primary-light);
}

.pipeline-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.pipeline-card .card-vendor {
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.pipeline-card .card-invoice {
    font-size: 12px;
    color: var(--gray-500);
}

.pipeline-card .card-date {
    font-size: 11px;
    color: var(--gray-400);
    margin-top: 6px;
}

/* ==================== Modal ==================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h2 {
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-500);
    padding: 4px 8px;
    border-radius: var(--radius);
}
.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.modal-body {
    padding: 24px;
}

/* Modal Detail Sections */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
}

.detail-value {
    font-size: 15px;
    color: var(--gray-800);
}

/* Workflow Timeline */
.workflow-timeline {
    margin-top: 24px;
    border-top: 1px solid var(--gray-200);
    padding-top: 24px;
}

.workflow-timeline h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--gray-800);
}

.timeline-step {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    position: relative;
}

.timeline-step:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 36px;
    bottom: -12px;
    width: 2px;
    background: var(--gray-200);
}

.timeline-step.completed:not(:last-child)::before {
    background: var(--success);
}

.timeline-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    color: var(--gray-500);
}

.timeline-step.completed .timeline-dot {
    background: var(--success);
    color: #fff;
}

.timeline-step.current .timeline-dot {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2);
}

.timeline-info {
    flex: 1;
}

.timeline-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-800);
}

.timeline-step.pending .timeline-title {
    color: var(--gray-400);
}

.timeline-meta {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}

.timeline-action {
    margin-top: 10px;
}

.timeline-action input,
.timeline-action textarea {
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 13px;
    width: 100%;
    margin-bottom: 8px;
    font-family: inherit;
}

.timeline-action input:focus,
.timeline-action textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* ==================== Toast Notification ==================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    background: var(--gray-800);
    color: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--info); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ==================== Responsive ==================== */
@media (max-width: 1200px) {
    .pipeline-board {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    .logo h2, .nav-btn span:not(.nav-icon), .sidebar-footer {
        display: none;
    }
    .main-content {
        margin-left: 60px;
    }
    .nav-btn {
        justify-content: center;
        padding: 12px;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .detail-grid {
        grid-template-columns: 1fr;
    }
    .pipeline-board {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .filter-bar {
        flex-direction: column;
        width: 100%;
    }
    .filter-bar input {
        min-width: 100%;
    }
}

/* ==================== Nav Separator ==================== */
.nav-separator {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 8px 4px;
}

/* Nav links (a tags) styled like nav buttons */
a.nav-btn {
    text-decoration: none;
    color: var(--gray-400);
}

a.nav-btn:hover {
    color: #fff;
}

a.nav-btn.active {
    background: var(--primary);
    color: #fff;
    font-weight: 500;
}

/* ==================== Stage Page Styles ==================== */
.stage-info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.stage-info-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 16px;
    align-items: flex-start;
    border-top: 4px solid var(--gray-300);
}

.stage-info-card.stage-info-1 { border-top-color: #6d28d9; }
.stage-info-card.stage-info-2 { border-top-color: #1d4ed8; }
.stage-info-card.stage-info-3 { border-top-color: #b45309; }
.stage-info-card.stage-info-4 { border-top-color: #c2410c; }
.stage-info-card.stage-info-5 { border-top-color: #047857; }
.stage-info-card.stage-info-6 { border-top-color: #15803d; }

.stage-info-number {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-600);
    flex-shrink: 0;
}

.stage-info-card.stage-info-1 .stage-info-number { background: #ede9fe; color: #6d28d9; }
.stage-info-card.stage-info-2 .stage-info-number { background: #dbeafe; color: #1d4ed8; }
.stage-info-card.stage-info-3 .stage-info-number { background: #fef3c7; color: #b45309; }
.stage-info-card.stage-info-4 .stage-info-number { background: #ffedd5; color: #c2410c; }
.stage-info-card.stage-info-5 .stage-info-number { background: #d1fae5; color: #047857; }
.stage-info-card.stage-info-6 .stage-info-number { background: #bbf7d0; color: #15803d; }

.stage-info-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.stage-info-card p {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.5;
}

.stage-page-board {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.stage-page-column {
    background: var(--gray-50);
    border-radius: var(--radius);
    min-height: 400px;
}

.stage-page-cards {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stage-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s;
    border-left: 4px solid var(--primary-light);
}

.stage-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stage-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.stage-card-vendor {
    font-weight: 600;
    font-size: 15px;
    color: var(--gray-800);
}

.stage-card-inv {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.stage-card-desc {
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.stage-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--gray-400);
    padding-top: 8px;
    border-top: 1px solid var(--gray-100);
}

.stage-card-payment {
    background: var(--success-light);
    padding: 8px 12px;
    border-radius: var(--radius);
    margin-bottom: 8px;
    font-size: 12px;
    color: #047857;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stage-empty {
    text-align: center;
    color: var(--gray-400);
    font-style: italic;
    padding: 40px 16px;
    font-size: 14px;
}

.col-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.4);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    margin-right: 6px;
}

@media (max-width: 768px) {
    .stage-info-row {
        grid-template-columns: 1fr;
    }
    .stage-page-board {
        grid-template-columns: 1fr;
    }
}

/* ==================== Auth / Login Page ==================== */
.auth-page {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4338ca 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 480px;
}

.auth-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 40px 36px 36px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    margin-top: 8px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 4px;
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.auth-tab.active {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    font-weight: 600;
}

/* Auth Form */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form-group {
    margin-bottom: 18px;
}

.auth-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.auth-form-group input[type="text"],
.auth-form-group input[type="password"] {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--gray-800);
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.auth-form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 44px !important;
}

.toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    color: var(--gray-400);
}

.toggle-password:hover {
    color: var(--gray-600);
}

.auth-error {
    color: var(--danger);
    font-size: 13px;
    margin-bottom: 12px;
    min-height: 18px;
}

.auth-success {
    color: var(--success);
    font-size: 13px;
    margin-bottom: 12px;
    min-height: 18px;
}

.auth-submit {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    justify-content: center;
}

/* Role Selector */
.role-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.role-option {
    cursor: pointer;
}

.role-option input[type="radio"] {
    display: none;
}

.role-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    transition: all 0.2s;
}

.role-option input:checked + .role-card {
    border-color: var(--primary);
    background: #f5f3ff;
}

.role-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.role-card strong {
    display: block;
    font-size: 14px;
    color: var(--gray-800);
}

.role-card span {
    display: block;
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 1px;
}

/* ==================== User Badge (Sidebar Footer) ==================== */
.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.user-info {
    min-width: 0;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 11px;
    color: var(--gray-400);
}

.btn-logout {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.15);
    background: transparent;
    color: var(--gray-400);
    font-size: 12px;
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.2s;
    font-family: inherit;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-color: rgba(255,255,255,0.25);
}

/* ==================== Auth Responsive ==================== */
@media (max-width: 480px) {
    .auth-card {
        padding: 28px 20px 24px;
    }
    .role-card {
        padding: 10px 12px;
    }
    .role-card span {
        font-size: 11px;
    }
}
