:root {
    --primary: #2563EB;
    --navy: #0F172A;
    --accent: #F59E0B;
    --success: #10B981;
    --danger: #EF4444;
    --background: #F8FAFC;
    --card: #FFFFFF;
    --border: #E2E8F0;
    --text: #0F172A;
    --muted: #64748B;
    --sidebar-width: 248px;
    --header-height: 72px;
    --radius-lg: 22px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.06);
    --shadow-blue: 0 18px 36px rgba(37, 99, 235, 0.22);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 28%),
        radial-gradient(circle at bottom left, rgba(245, 158, 11, 0.08), transparent 24%),
        var(--background);
    color: var(--text);
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

.admin-wrapper {
    min-height: 100vh;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    opacity: 0;
    visibility: hidden;
    transition: 0.25s ease;
    z-index: 999;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    background:
        radial-gradient(circle at top, rgba(37, 99, 235, 0.25), transparent 36%),
        linear-gradient(180deg, #111c31 0%, var(--navy) 72%);
    padding: 18px 14px 16px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.25s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.sidebar-logo {
    padding: 4px 6px 18px;
}

.logo-icon,
.login-logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: grid;
    place-items: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.logo-icon span,
.login-logo-icon span,
.brand-logo-inner span,
.brand-icon span {
    width: 26px;
    height: 17px;
    border-radius: 999px;
    display: block;
    background: linear-gradient(to bottom, var(--accent) 0 46%, #ffffff 46% 58%, #172033 58%);
}

.sidebar-logo h4,
.login-logo h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #fff;
}

.sidebar-logo p,
.login-logo p {
    margin: 2px 0 0;
    color: #94A3B8;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3em;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 6px;
}

.menu-link,
.logout-link {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 16px;
    text-decoration: none;
    border: 1px solid transparent;
    color: #9FB0C7;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    transition: 0.2s ease;
}

.menu-link i,
.logout-link i {
    font-size: 16px;
}

.menu-link:hover,
.logout-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.menu-link.active {
    color: #fff;
    background: var(--primary);
    box-shadow: var(--shadow-blue);
}

.sidebar-footer {
    margin-top: auto;
    padding: 14px 6px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.logout-link {
    border: 0;
    text-align: left;
}

.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.top-header {
    position: sticky;
    top: 0;
    z-index: 500;
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 12px 32px;
    background: rgba(248, 250, 252, 0.82);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.92);
}

.mobile-menu-btn,
.notification-btn {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    color: var(--navy);
    display: grid;
    place-items: center;
    transition: 0.2s ease;
}

.mobile-menu-btn {
    display: none;
}

.mobile-menu-btn:hover,
.notification-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

.mobile-menu-btn i,
.notification-btn i {
    font-size: 1.1rem;
}

.search-box {
    width: min(520px, 100%);
    height: 44px;
    padding: 0 18px;
    border-radius: 18px;
    background: #EFF5FF;
    border: 1px solid #D8E4FB;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-box i {
    color: #7B8AA2;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 14px;
}

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
}

.notification-btn {
    position: relative;
}

.notification-btn span {
    position: absolute;
    top: 11px;
    right: 12px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--danger);
    border: 2px solid #fff;
}

.admin-profile {
    height: 50px;
    padding: 4px 16px 4px 4px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.profile-avatar,
.avatar,
.large-avatar,
.customer-avatar-lg,
.customer-gradient-avatar {
    display: grid;
    place-items: center;
    font-weight: 800;
}

.profile-avatar,
.avatar {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #60A5FA);
    color: #fff;
    font-size: 14px;
}

.profile-info h6 {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
}

.profile-info p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.page-content {
    padding: 32px;
}

.page-header,
.dashboard-header,
.detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.page-header h1,
.detail-header h1,
.dashboard-header h1 {
    margin: 0;
    font-size: clamp(25px, 2.6vw, 28px);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.page-header p,
.detail-header p,
.dashboard-header p,
.card-title-row p,
.table-card-header p,
.finance-card-header p,
.recent-payment-card p,
.settings-subtitle,
.detail-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.page-actions,
.dashboard-actions,
.detail-actions,
.create-invoice-actions,
.finance-tools,
.payment-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.page-toolbar {
    display: flex;
    justify-content: flex-end;
    margin: -10px 0 18px;
}

.btn-filter,
.btn-add,
.filter-btn,
.export-btn,
.primary-action-btn,
.outline-action-btn,
.profile-primary-btn,
.profile-outline-btn,
.settings-save-btn,
.save-payment-btn,
.cancel-payment-btn,
.add-payment-btn,
.generate-pdf-btn,
.print-invoice-btn,
.mark-paid-btn,
.upload-logo-btn,
.edit-profile-btn,
.back-btn {
    min-height: 44px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: 0.2s ease;
}

.btn-add,
.export-btn,
.primary-action-btn,
.profile-primary-btn,
.settings-save-btn,
.save-payment-btn,
.generate-pdf-btn {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: var(--shadow-blue);
}

.btn-filter,
.filter-btn,
.outline-action-btn,
.profile-outline-btn,
.cancel-payment-btn,
.print-invoice-btn,
.upload-logo-btn,
.edit-profile-btn {
    background: #fff;
    color: var(--navy);
}

.mark-paid-btn {
    width: 100%;
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.16);
    color: #047857;
}

.back-btn {
    width: 44px;
    padding: 0;
    border-radius: 15px;
    background: #fff;
    color: var(--navy);
}

.btn-filter:hover,
.btn-add:hover,
.filter-btn:hover,
.export-btn:hover,
.primary-action-btn:hover,
.outline-action-btn:hover,
.profile-primary-btn:hover,
.profile-outline-btn:hover,
.settings-save-btn:hover,
.save-payment-btn:hover,
.cancel-payment-btn:hover,
.add-payment-btn:hover,
.generate-pdf-btn:hover,
.print-invoice-btn:hover,
.mark-paid-btn:hover,
.upload-logo-btn:hover,
.edit-profile-btn:hover,
.back-btn:hover {
    transform: translateY(-1px);
}

.data-card,
.chart-card,
.table-card,
.finance-table-card,
.recent-payment-card,
.detail-card,
.profile-card,
.profile-form-card,
.settings-card,
.invoice-preview-card,
.invoice-info-alert,
.finance-stat-card,
.stats-card,
.customer-stat-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.stats-card,
.finance-stat-card,
.customer-stat-card {
    padding: 22px;
}

.stats-top,
.finance-icon,
.customer-stat-icon,
.invoice-summary-icon {
    margin-bottom: 18px;
}

.stats-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stats-icon,
.finance-icon,
.customer-stat-icon,
.invoice-summary-icon {
    width: 50px;
    height: 50px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 18px;
}

.stats-icon.blue,
.finance-icon.blue,
.customer-stat-icon.blue,
.invoice-summary-icon.blue {
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary);
}

.stats-icon.orange,
.finance-icon.orange {
    background: rgba(245, 158, 11, 0.14);
    color: #C97A06;
}

.stats-icon.green,
.finance-icon.green,
.customer-stat-icon.green,
.invoice-summary-icon.green {
    background: rgba(16, 185, 129, 0.12);
    color: #0F9A66;
}

.stats-icon.red,
.finance-icon.red,
.customer-stat-icon.red,
.invoice-summary-icon.red {
    background: rgba(239, 68, 68, 0.12);
    color: #D83939;
}

.stats-top span,
.success-text {
    color: #0F9A66;
    font-size: 13px;
    font-weight: 700;
}

.stats-card h2,
.finance-stat-card h2,
.customer-stat-card h3,
.invoice-summary-block h3,
.preview-total-box strong {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.stats-card p,
.finance-stat-card p,
.customer-stat-card p,
.invoice-summary-block p,
.preview-info-list span,
.preview-subtitle,
.preview-label,
.section-label {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.chart-card,
.table-card,
.finance-table-card,
.recent-payment-card,
.detail-card,
.profile-card,
.profile-form-card,
.settings-card,
.invoice-preview-card {
    padding: 20px;
}

.chart-frame {
    position: relative;
    height: 280px;
    width: 100%;
}

.chart-frame canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.card-title-row,
.table-card-header,
.finance-card-header,
.history-card-header,
.payment-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.card-title-row h5,
.table-card-header h5,
.finance-card-header h3,
.detail-card h3,
.profile-form-card h3,
.settings-card h3,
.recent-payment-card h3,
.history-card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.table-card-header a,
.history-card-header a,
.finance-card-header a {
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.table-responsive {
    overflow-x: auto;
}

.table-card {
    padding: 12px;
}

.custom-table,
.customer-table,
.finance-table,
.payment-history-table,
.customer-detail-table {
    margin: 0;
}

.custom-table thead th,
.customer-table thead th,
.finance-table thead th,
.payment-history-table thead th,
.customer-detail-table thead th {
    padding: 15px 16px;
    border: 0;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748B;
    background: #F8FAFC;
    white-space: nowrap;
}

.custom-table thead th:first-child,
.customer-table thead th:first-child,
.finance-table thead th:first-child,
.payment-history-table thead th:first-child,
.customer-detail-table thead th:first-child {
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
}

.custom-table thead th:last-child,
.customer-table thead th:last-child,
.finance-table thead th:last-child,
.payment-history-table thead th:last-child,
.customer-detail-table thead th:last-child {
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
}

.custom-table tbody td,
.customer-table tbody td,
.finance-table tbody td,
.payment-history-table tbody td,
.customer-detail-table tbody td {
    padding: 16px 16px;
    border-color: #EDF2F7;
    vertical-align: middle;
    font-size: 13px;
    color: var(--text);
}

.text-muted-custom,
.address-cell,
.payment-bottom span,
.customer-contact-list p,
.invoice-customer-info p,
.detail-field p,
.status-setting-item span,
.notification-setting-item p,
.color-item p {
    color: var(--muted);
}

.business-cell,
.customer-summary,
.customer-profile-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.business-avatar {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

.status-badge,
.customer-status,
.role-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid transparent;
}

.status-badge.pending {
    background: #F1F5F9;
    color: #475569;
}

.status-badge.confirmed {
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary);
}

.status-badge.processing {
    background: rgba(245, 158, 11, 0.14);
    color: #B76D05;
}

.status-badge.delivered,
.customer-status.active,
.role-badge {
    background: rgba(16, 185, 129, 0.12);
    color: #0F9A66;
}

.status-badge.cancelled,
.customer-status.inactive {
    background: rgba(239, 68, 68, 0.12);
    color: #D83939;
}

.action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.action-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #F8FAFC;
    color: var(--navy);
    display: grid;
    place-items: center;
    text-decoration: none;
    transition: 0.2s ease;
}

.action-btn:hover {
    background: #EFF6FF;
    color: var(--primary);
}

.action-btn.danger:hover {
    background: #FEF2F2;
    color: var(--danger);
}

.table-footer,
.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.table-footer {
    justify-content: space-between;
    padding: 18px 12px 6px;
    color: var(--muted);
    font-size: 14px;
}

.pagination-buttons button,
.order-tabs button,
.status-step {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--navy);
    border-radius: 12px;
    min-height: 40px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 600;
}

.pagination-buttons button.active,
.order-tabs button.active,
.status-step.active {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

.order-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.finance-tools {
    margin-left: auto;
}

.mini-search {
    width: 220px;
    height: 42px;
    padding: 0 14px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: #F8FAFC;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mini-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 14px;
}

.finance-tools button {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: #fff;
}

.payment-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.payment-item {
    padding: 16px 18px;
    border-radius: 18px;
    background: #F8FAFC;
    border: 1px solid #EDF2F7;
}

.payment-top,
.payment-bottom {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.payment-top h6,
.payment-top strong,
.color-item h6,
.notification-setting-item h6 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
}

.payment-bottom {
    margin-top: 8px;
    font-size: 12px;
}

.payment-bottom code {
    background: #E2E8F0;
    color: var(--navy);
    padding: 4px 8px;
    border-radius: 999px;
}

.profile-card {
    text-align: center;
}

.profile-avatar-wrapper {
    position: relative;
    width: fit-content;
    margin: 0 auto 18px;
}

.large-avatar {
    width: 104px;
    height: 104px;
    border-radius: 30px;
    background: linear-gradient(135deg, var(--primary), #60A5FA);
    color: #fff;
    font-size: 32px;
}

.camera-btn {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    border: 4px solid #fff;
    background: var(--accent);
    color: #fff;
}

.profile-card h2,
.profile-page h2,
.settings-page h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.profile-card > p {
    margin: 10px 0 14px;
    color: var(--muted);
}

.profile-stats {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.profile-stat-item {
    padding: 16px 18px;
    border-radius: 18px;
    background: #F8FAFC;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.profile-stat-item span {
    color: var(--muted);
    font-size: 13px;
}

.form-group-custom,
.invoice-field {
    display: grid;
    gap: 8px;
}

.form-group-custom label,
.invoice-field label,
.login-field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.form-group-custom input,
.form-group-custom select,
.form-group-custom textarea,
.invoice-field input,
.invoice-field select,
.invoice-field textarea,
.login-field input {
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    outline: 0;
    font-size: 14px;
    transition: 0.2s ease;
}

.form-group-custom textarea,
.invoice-field textarea {
    min-height: 110px;
    resize: vertical;
}

.form-group-custom input:focus,
.form-group-custom select:focus,
.form-group-custom textarea:focus,
.invoice-field input:focus,
.invoice-field select:focus,
.invoice-field textarea:focus,
.login-field input:focus {
    border-color: rgba(37, 99, 235, 0.5);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.detail-field h6,
.customer-summary h6 {
    margin: 6px 0 0;
    font-size: 14px;
    font-weight: 700;
}

.detail-field .highlight {
    color: var(--primary);
}

.delivery-address-box,
.special-note-box,
.invoice-info-alert,
.logo-upload-box,
.status-setting-item,
.notification-setting-item,
.color-item,
.order-reference-box,
.invoice-summary-block {
    margin-top: 20px;
    padding: 18px;
    border-radius: 18px;
    background: #F8FAFC;
    border: 1px solid #EDF2F7;
}

.address-line,
.customer-contact-list p,
.invoice-customer-info p {
    display: flex;
    gap: 10px;
    margin: 0;
    line-height: 1.6;
}

.special-note-box .note-text {
    color: var(--text);
    line-height: 1.7;
}

.status-step-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.status-step {
    min-height: 68px;
    display: grid;
    gap: 6px;
    place-items: center;
    padding: 12px;
}

.status-step.cancel {
    color: var(--danger);
}

.customer-avatar-lg,
.customer-gradient-avatar {
    width: 74px;
    height: 74px;
    border-radius: 24px;
    color: #fff;
    font-size: 22px;
}

.customer-avatar-lg {
    background: linear-gradient(135deg, var(--primary), #60A5FA);
}

.customer-gradient-avatar {
    background: linear-gradient(135deg, var(--accent), var(--primary));
}

.activity-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: grid;
    gap: 18px;
}

.activity-list li {
    display: flex;
    gap: 14px;
}

.activity-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.activity-marker span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
}

.activity-marker em {
    width: 2px;
    flex: 1;
    background: #D8E4FB;
}

.activity-list h6 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.activity-list p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.invoice-progress,
.customer-payment-progress {
    width: 100%;
    height: 10px;
    margin-top: 18px;
    border-radius: 999px;
    background: #E5EEF9;
    overflow: hidden;
}

.invoice-progress > div,
.customer-payment-progress > div {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), #60A5FA);
}

.invoice-progress-text {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.add-payment-box {
    display: none;
}

.add-payment-box.show {
    display: block;
}

.invoice-side-actions {
    display: grid;
    gap: 12px;
}

.order-reference-box {
    display: grid;
    gap: 6px;
    text-decoration: none;
    color: var(--text);
}

.invoice-preview-card {
    background: linear-gradient(180deg, #10213E 0%, #17315B 100%);
    color: #fff;
}

.invoice-preview-card .preview-label,
.invoice-preview-card .preview-subtitle,
.invoice-preview-card .preview-info-list span {
    color: rgba(255, 255, 255, 0.7);
}

.invoice-preview-card h2 {
    margin: 4px 0 0;
    font-size: 28px;
    font-weight: 800;
}

.preview-info-list {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}

.preview-info-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.preview-total-box {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-setting-list,
.notification-setting-list,
.color-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.status-setting-item,
.notification-setting-item,
.color-item {
    margin-top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.color-item > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-box {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-block;
}

.color-box.primary { background: var(--primary); }
.color-box.navy { background: var(--navy); }
.color-box.accent { background: var(--accent); }
.color-box.success { background: var(--success); }
.color-box.danger { background: var(--danger); }

.toggle-switch {
    position: relative;
    width: 52px;
    height: 30px;
}

.toggle-switch input {
    display: none;
}

.toggle-switch span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #CBD5E1;
    transition: 0.2s ease;
}

.toggle-switch span::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    transition: 0.2s ease;
}

.toggle-switch input:checked + span {
    background: var(--primary);
}

.toggle-switch input:checked + span::after {
    transform: translateX(22px);
}

.brand-logo-preview {
    width: 112px;
    height: 112px;
    margin: 0 auto 16px;
    border-radius: 28px;
    background: #10213E;
    display: grid;
    place-items: center;
}

.brand-logo-inner {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    display: grid;
    place-items: center;
}

.logo-upload-box {
    text-align: center;
}

.logo-upload-box p {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.admin-login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.22), transparent 30%),
        radial-gradient(circle at bottom left, rgba(245, 158, 11, 0.18), transparent 26%),
        linear-gradient(180deg, #EFF6FF 0%, #F8FAFC 100%);
}

.login-backdrop {
    position: absolute;
    border-radius: 50%;
    filter: blur(10px);
}

.login-backdrop-one {
    width: 340px;
    height: 340px;
    top: -80px;
    right: -80px;
    background: rgba(37, 99, 235, 0.18);
}

.login-backdrop-two {
    width: 260px;
    height: 260px;
    left: -60px;
    bottom: -40px;
    background: rgba(245, 158, 11, 0.14);
}

.login-card {
    width: min(100%, 460px);
    padding: 34px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.12);
    position: relative;
    z-index: 1;
}

.login-logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.login-logo h3 {
    color: var(--navy);
}

.login-title {
    margin: 28px 0 24px;
}

.login-title h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.login-title p {
    margin: 10px 0 0;
    color: var(--muted);
}

.login-field {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 18px 0 24px;
    color: var(--muted);
    font-size: 13px;
}

.login-options label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.login-btn {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), #4688F5);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    box-shadow: var(--shadow-blue);
}

.login-alert {
    padding: 14px 16px;
    border-radius: 16px;
    margin-bottom: 20px;
    background: rgba(239, 68, 68, 0.1);
    color: #B91C1C;
    font-size: 14px;
    font-weight: 600;
}

@media (max-width: 1199px) {
    .page-content,
    .top-header {
        padding-left: 28px;
        padding-right: 28px;
    }

    .status-step-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-wrapper {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: grid;
    }

    .top-header {
        padding: 12px 18px;
    }

    .page-content {
        padding: 18px;
    }

    .search-box {
        max-width: 360px;
    }

    .status-step-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .top-header {
        gap: 12px;
    }

    .search-box {
        display: none;
    }

    .page-header,
    .dashboard-header,
    .detail-header,
    .table-footer,
    .payment-top,
    .payment-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-actions,
    .dashboard-actions,
    .detail-actions,
    .create-invoice-actions,
    .payment-form-actions,
    .finance-tools {
        width: 100%;
    }

    .page-actions > *,
    .dashboard-actions > *,
    .detail-actions > *,
    .create-invoice-actions > *,
    .payment-form-actions > *,
    .finance-tools > *,
    .invoice-side-actions > * {
        width: 100%;
    }

    .mini-search {
        width: 100%;
    }

    .status-step-grid {
        grid-template-columns: 1fr;
    }

    .admin-profile {
        padding-right: 10px;
    }

    .profile-info {
        display: none;
    }

    .login-card {
        padding: 26px;
    }

    .chart-frame {
        height: 240px;
    }
}
