* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f6f8;
}

.login-container {
    min-height: 100vh;

    display: flex;

    justify-content: center;

    align-items: center;
}

.login-box {
    width: 400px;

    background: white;

    padding: 40px;

    border-radius: 12px;

    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.login-box h1 {
    margin: 0;

    text-align: center;
}

.login-subtitle {
    text-align: center;

    color: #777;

    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;

    margin-bottom: 7px;

    font-weight: 600;
}

.form-group input {
    width: 100%;

    padding: 12px;

    border: 1px solid #ccc;

    border-radius: 6px;

    font-size: 15px;
}

.login-button {
    width: 100%;

    padding: 13px;

    border: none;

    border-radius: 6px;

    background: #1f7a4d;

    color: white;

    font-size: 16px;

    cursor: pointer;
}

.login-button:hover {
    opacity: 0.9;
}

.error-message {
    background: #ffe5e5;

    color: #b00020;

    padding: 10px;

    border-radius: 6px;

    margin-bottom: 20px;

    text-align: center;
}



/* ================================
   AGENT DASHBOARD
================================ */

body {
    background: #f5f7f9;
}

.dashboard {
    min-height: 100vh;
    display: flex;
    position: relative;
    width: 100%;
}

/* Sidebar */

.sidebar {
    width: 250px;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;

    display: flex;
    flex-direction: column;

    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-logo {
    padding: 20px 22px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 70px;
    box-sizing: border-box;
}

.sidebar-logo h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.sidebar-nav {
    padding: 16px 12px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 11px 14px;

    margin-bottom: 6px;

    text-decoration: none;

    color: #4b5563;

    border-radius: 8px;

    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    z-index: 2;

    transition: all 0.15s ease;
}

.nav-item svg {
    flex-shrink: 0;
    opacity: 0.75;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.nav-item:hover {
    background: #f3f4f6;
    color: #111827;
}

.nav-item:hover svg {
    opacity: 1;
    transform: scale(1.05);
}

.nav-item.active {
    background: #e8f5ed;
    color: #1f7a4d;
    font-weight: 700;
}

.nav-item.active svg {
    opacity: 1;
    stroke: #1f7a4d;
}

/* Sidebar Nav Submenus */
.nav-group {
    margin-bottom: 4px;
}

.nav-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 11px 14px;
    background: none;
    border: none;
    text-decoration: none;
    color: #4b5563;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
    text-align: left;
    box-sizing: border-box;
}

.nav-group-toggle:hover {
    background: #f3f4f6;
    color: #111827;
}

.nav-group-toggle .nav-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-group-toggle svg {
    flex-shrink: 0;
    opacity: 0.75;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.nav-group-toggle:hover svg {
    opacity: 1;
    transform: scale(1.05);
}

.nav-group-toggle .chevron {
    width: 16px;
    height: 16px;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.6;
}

.nav-group.open .nav-group-toggle {
    color: #0f172a;
    background: #f8fafc;
}

.nav-group.open .nav-group-toggle .chevron {
    transform: rotate(180deg);
    opacity: 0.9;
}

.nav-sub {
    display: none;
    padding-left: 18px;
    margin-top: 3px;
    margin-bottom: 6px;
}

.nav-group.open .nav-sub {
    display: block;
}

.nav-sub-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    margin-bottom: 2px;
    text-decoration: none;
    color: #64748b;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 600;
    transition: all 0.15s ease;
}

.nav-sub-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.nav-sub-item.active {
    background: #e8f5ed;
    color: #1f7a4d;
    font-weight: 700;
}

.nav-sub-item .sub-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #cbd5e1;
    flex-shrink: 0;
    transition: background 0.15s ease, transform 0.15s ease;
}

.nav-sub-item:hover .sub-dot {
    background: #1f7a4d;
    transform: scale(1.2);
}

.nav-sub-item.active .sub-dot {
    background: #1f7a4d;
    transform: scale(1.3);
}

.sidebar-bottom {
    margin-top: auto;
    padding: 14px 12px;
    border-top: 1px solid #f1f5f9;
}

.nav-item.logout {
    color: #dc2626;
}

.nav-item.logout:hover {
    background: #fee2e2;
    color: #b91c1c;
}

/* Main content */

.main-content {
    margin-left: 250px;
    width: calc(100% - 250px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1), width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Desktop Collapsed Sidebar State */
.dashboard.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
}

.dashboard.sidebar-collapsed .main-content {
    margin-left: 0 !important;
    width: 100% !important;
}

/* Topbar */

.topbar {
    height: 70px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 900;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar h1 {
    margin: 0;
    font-size: 21px;
    font-weight: 700;
    color: #0f172a;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-brand .company-logo {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    object-fit: contain;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    padding: 2px;
    flex-shrink: 0;
}

.topbar-brand .company-name {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.user-info {
    display: flex;

    align-items: center;

    gap: 10px;

    font-weight: 600;
}

.user-info .role {
    font-size: 12px;

    padding: 4px 8px;

    background: #e8f5ed;

    color: #1f7a4d;

    border-radius: 20px;
}

.user-info .role.admin {
    background: #eff6ff;
    color: #1d4ed8;
}

/* Content */

.content {
    padding: 30px;
}

.welcome-section {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 25px;
}

.welcome-section h2 {
    margin: 0 0 5px;

    font-size: 24px;
}

.welcome-section p {
    margin: 0;

    color: #6b7280;
}

/* Buttons */

.primary-button {
    display: inline-block;

    padding: 11px 18px;

    background: #1f7a4d;

    color: #ffffff;

    text-decoration: none;

    border-radius: 7px;

    font-weight: 600;

    border: none;

    cursor: pointer;
}

.primary-button:hover {
    background: #17633e;
}

/* Statistics */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.stat-label {
    color: #64748b;
    font-size: 13.5px;
    font-weight: 600;
    text-transform: capitalize;
}

.stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon.icon-green {
    background: #ecfdf5;
    color: #0f6b4c;
}

.stat-icon.icon-blue {
    background: #eff6ff;
    color: #2563eb;
}

.stat-icon.icon-purple {
    background: #faf5ff;
    color: #7c3aed;
}

.stat-icon.icon-amber {
    background: #fffbeb;
    color: #d97706;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* Section card */

.section-card {
    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 10px;

    overflow: hidden;
}

.section-header {
    padding: 20px 22px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    border-bottom: 1px solid #e5e7eb;
}

.section-header h3 {
    margin: 0 0 5px;
}

.section-header p {
    margin: 0;

    color: #6b7280;

    font-size: 14px;
}

.view-all {
    text-decoration: none;

    color: #1f7a4d;

    font-weight: 600;
}

/* Table */

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;

    border-collapse: collapse;
}

th,
td {
    padding: 14px 18px;

    text-align: left;

    border-bottom: 1px solid #f0f0f0;
}

th {
    background: #fafafa;

    font-size: 13px;

    color: #6b7280;
}

td {
    font-size: 14px;
}

tr:last-child td {
    border-bottom: none;
}

/* Status */

.status-badge {
    display: inline-block;

    padding: 5px 9px;

    border-radius: 20px;

    font-size: 12px;

    font-weight: 600;
}

.status-draft {
    background: #fef3c7;

    color: #92400e;
}

.status-generated {
    background: #dcfce7;

    color: #166534;
}

.status-cancelled {
    background: #fee2e2;

    color: #991b1b;
}

/* Action */

.action-button {
    display: inline-block;

    padding: 6px 10px;

    border-radius: 5px;

    background: #f3f4f6;

    color: #374151;

    text-decoration: none;

    font-size: 13px;

    font-weight: 600;
}

.action-button:hover {
    background: #e5e7eb;
}

/* Empty state */

.empty-state {
    text-align: center;

    padding: 60px 20px;
}

.empty-icon {
    font-size: 40px;

    margin-bottom: 15px;
}

.empty-state h4 {
    margin: 0 0 8px;

    font-size: 18px;
}

.empty-state p {
    color: #6b7280;

    margin-bottom: 20px;
}


/* ==========================================
   NEW QUOTATION FORM
========================================== */

.quotation-page-header {
    margin-bottom: 25px;
}

.quotation-page-header h2 {
    margin: 0 0 6px;
    font-size: 24px;
}

.quotation-page-header p {
    margin: 0;
    color: #6b7280;
}


/* ==========================================
   FORM CARD
========================================== */

.form-card {
    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 10px;

    margin-bottom: 25px;

    overflow: hidden;
}


.form-card-header {
    display: flex;

    align-items: center;

    gap: 15px;

    padding: 20px 22px;

    border-bottom: 1px solid #e5e7eb;

    background: #fafafa;
}


.form-card-header h2 {
    margin: 0 0 4px;

    font-size: 18px;
}


.form-card-header p {
    margin: 0;

    color: #6b7280;

    font-size: 13px;
}


.section-number {
    width: 38px;

    height: 38px;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;

    border-radius: 8px;

    background: #e8f5ed;

    color: #1f7a4d;

    font-weight: 700;

    font-size: 14px;
}


/* ==========================================
   FORM GRID
========================================== */

.form-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 20px;

    padding: 25px;
}


.form-group {
    display: flex;

    flex-direction: column;

    gap: 7px;
}


.form-group.full-width {
    grid-column: 1 / -1;
}


.form-group label {
    font-size: 14px;

    font-weight: 600;

    color: #374151;
}


.required {
    color: #dc2626;
}


.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;

    box-sizing: border-box;

    border: 1px solid #d1d5db;

    border-radius: 7px;

    padding: 11px 12px;

    font-size: 14px;

    font-family: inherit;

    background: #ffffff;

    color: #111827;

    outline: none;

    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}


.form-group textarea {
    resize: vertical;
}


.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #1f7a4d;

    box-shadow:
        0 0 0 3px
        rgba(31, 122, 77, 0.10);
}


.form-group input:disabled {
    background: #f3f4f6;

    color: #6b7280;

    cursor: not-allowed;
}


.field-help {
    font-size: 12px;

    color: #6b7280;

    line-height: 1.5;
}


/* ==========================================
   INPUT WITH UNIT
========================================== */

.input-with-unit {
    display: flex;

    align-items: stretch;
}


.input-with-unit input {
    border-radius:
        7px 0 0 7px;
}


.input-with-unit span {
    display: flex;

    align-items: center;

    padding: 0 14px;

    background: #f3f4f6;

    border: 1px solid #d1d5db;

    border-left: none;

    border-radius:
        0 7px 7px 0;

    font-size: 14px;

    color: #4b5563;

    font-weight: 600;
}


/* ==========================================
   FORM ACTIONS
========================================== */

.form-actions {
    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 12px;

    margin-top: 5px;

    margin-bottom: 30px;
}


.secondary-button {
    display: inline-block;

    padding: 11px 18px;

    border: 1px solid #d1d5db;

    background: #ffffff;

    color: #374151;

    text-decoration: none;

    border-radius: 7px;

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;

    transition: 0.2s;
}


.secondary-button:hover {
    background: #f3f4f6;
}


.form-actions .primary-button {
    border: none;

    font-size: 14px;
}


/* ==========================================
   MENU TOGGLE & SIDEBAR OVERLAY
========================================== */

.menu-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    color: #1e293b;
    flex-shrink: 0;
    padding: 0;
    transition: all 0.15s ease;
}

.menu-toggle-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
    color: #0f172a;
}

.sidebar-close-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    color: #475569;
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
    padding: 0;
    transition: all 0.15s ease;
}

.sidebar-close-btn:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
}

.sidebar-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 1040;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ==========================================
   RESPONSIVE (TABLET & MOBILE)
========================================== */

@media (max-width: 900px) {

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .sidebar {
        transform: translateX(-100%);
        z-index: 1050;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    }

    .sidebar.open {
        transform: translateX(0) !important;
    }

    .sidebar-close-btn {
        display: inline-flex;
    }

    .dashboard.sidebar-collapsed .sidebar {
        transform: translateX(-100%);
    }

    .dashboard.sidebar-collapsed .sidebar.open {
        transform: translateX(0) !important;
    }

    .topbar {
        padding: 0 16px;
    }

    .topbar-brand {
        gap: 8px;
    }

    .topbar-brand .company-logo {
        width: 32px;
        height: 32px;
    }

    .topbar-brand .company-name {
        font-size: 16px;
    }

    .content {
        padding: 18px;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 14px;
    }

    .welcome-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .welcome-section a {
        width: 100%;
        text-align: center;
    }

    .form-grid {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .form-group.full-width {
        grid-column: auto;
    }

    .form-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .form-actions a,
    .form-actions button {
        text-align: center;
    }
}

/* ==========================================================================
   STATUS PILLS & WORKFLOW BADGES
   ========================================================================== */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: capitalize;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.status-pill.status-approved,
.status-pill.approved {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.status-pill.status-pending_review,
.status-pill.pending_review,
.status-pill.status-pending {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.status-pill.status-draft,
.status-pill.draft {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.status-pill.status-cancelled,
.status-pill.status-rejected,
.status-pill.rejected {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Sidebar & Navigation Badges */
.nav-badge.pending-badge {
    background: #f59e0b;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 9999px;
    line-height: 1.2;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Topbar Notification Bell */
.topbar-bell-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-right: 8px;
}

.topbar-bell-btn:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1;
}

.topbar-bell-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 9999px;
    min-width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4);
    line-height: 1;
}

/* Floating Toast Notifications */
.admin-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 380px;
    width: calc(100vw - 48px);
}

.admin-toast-card {
    pointer-events: auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 5px solid #f59e0b;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.1);
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.3s ease;
}

.admin-toast-card.fade-out {
    opacity: 0;
    transform: translateX(30px);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.toast-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.toast-icon-title {
    display: flex;
    align-items: center;
    gap: 6px;
}

.toast-bell-icon {
    font-size: 15px;
}

.toast-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
}

.toast-close-btn {
    background: transparent;
    border: none;
    font-size: 18px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}

.toast-close-btn:hover {
    color: #0f172a;
}

.toast-body-content {
    font-size: 12.5px;
    color: #475569;
    line-height: 1.45;
}

.toast-highlight {
    font-size: 13px;
    color: #0f6b4c;
    margin-bottom: 2px;
}

.toast-meta-chip {
    display: inline-block;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-top: 6px;
}

.toast-footer-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

.toast-btn-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #0f6b4c;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.15s ease;
}

.toast-btn-action:hover {
    background: #0b533b;
    color: #ffffff;
}