:root {
    --bg: #f4efe6;
    --panel: rgba(255, 250, 242, 0.88);
    --panel-strong: #fffaf2;
    --ink: #1f2430;
    --muted: #6b6f76;
    --line: rgba(31, 36, 48, 0.1);
    --sand: #e8c9a7;
    --mint: #b8d6c3;
    --coral: #c96d56;
    --shadow: 0 22px 60px rgba(52, 39, 17, 0.1);
    
    /* Tab & UI variables */
    --radius: 10px;
    --radius-lg: 28px;
    --bg-tertiary: rgba(31, 36, 48, 0.05);
    --text-primary: var(--ink);
    --text-secondary: #6b6f76;
    --border-hover: rgba(31, 36, 48, 0.2);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "IBM Plex Sans", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(201, 109, 86, 0.14), transparent 25%),
        radial-gradient(circle at bottom right, rgba(184, 214, 195, 0.26), transparent 30%),
        linear-gradient(180deg, #fbf8f1 0%, var(--bg) 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

.shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    padding: 32px 24px;
    background: rgba(255, 250, 242, 0.75);
    border-right: 1px solid var(--line);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
}

.sidebar h1,
.hero h2,
.panel h3,
.stat-card strong {
    font-family: "Space Grotesk", sans-serif;
}

.nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-top: 24px;
    flex: 1;
    justify-content: flex-start;
}

.nav a {
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav a i {
    width: 24px;
    margin-right: 8px;
    text-align: center;
    font-size: 1rem;
    display: inline-block;
}

.nav a span {
    display: inline;
}

.nav a.active {
    background: var(--sand);
    color: var(--ink);
    font-weight: 600;
}

.nav a:hover {
    background: rgba(31, 36, 48, 0.05);
}

.content {
    padding: 28px;
}

.content-with-tabs {
    padding-top: 24px;
}

.tabs-container {
    display: block;
    width: 100%;
}

.hero,
.panel,
.stat-card {
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: var(--shadow);
    border-radius: 28px;
}

.hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    padding: 28px;
    margin-bottom: 24px;
}

.hero.compact {
    align-items: flex-end;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.76rem;
    color: var(--muted);
    margin: 0 0 8px;
}

.muted {
    color: var(--muted);
}

.grid {
    display: grid;
    gap: 24px;
}

.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 24px;
}

.admin-grid {
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
}

.wide-grid {
    grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
}

.panel,
.stat-card {
    padding: 24px;
}

.section-panel {
	margin-bottom: 24px;
}

.stat-card strong {
    display: block;
    font-size: 3rem;
    margin-top: 12px;
}

.accent-sand {
    background: linear-gradient(135deg, rgba(232, 201, 167, 0.85), rgba(255, 250, 242, 0.95));
}

.accent-mint {
    background: linear-gradient(135deg, rgba(184, 214, 195, 0.85), rgba(255, 250, 242, 0.95));
}

.panel-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
}

.button {
    appearance: none;
    border: 0;
    border-radius: 14px;
    padding: 12px 16px;
    font-weight: 700;
    cursor: pointer;
}

.button.primary {
    background: var(--ink);
    color: white;
}

.button.secondary,
.button.ghost {
    background: rgba(31, 36, 48, 0.06);
    color: var(--ink);
}

.button.danger {
    background: rgba(201, 109, 86, 0.12);
    color: #8c3b2b;
}

.sidebar-user {
    display: flex;
    flex-direction: column;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    margin-top: auto;
}

.sidebar-user-header {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.sidebar-user-avatar {
    flex-shrink: 0;
}

.sidebar-user-avatar .avatar-circle {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: var(--ink) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    font-family: "Space Grotesk", sans-serif !important;
}

.sidebar-user-avatar .avatar-circle span {
    color: white;
    font-size: 16px;
    font-weight: 700;
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.sidebar-user-info strong {
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user span {
    color: var(--muted);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-actions {
    position: relative;
    flex-shrink: 0;
}

.dropdown-toggle {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--muted);
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--ink);
}

.dropdown-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(52, 39, 17, 0.16);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 1000;
    margin-bottom: 8px;
    overflow: hidden;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--ink);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    font-size: 14px;
    font-family: "IBM Plex Sans", sans-serif;
}

.dropdown-item:hover {
    background: var(--bg-tertiary);
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    color: var(--muted);
}

.dropdown-item:hover i {
    color: var(--ink);
}

.dropdown-divider {
    height: 1px;
    background: var(--line);
    margin: 4px 16px;
}

.dropdown-form {
    margin: 0;
}

.search-form,
.stack {
    display: grid;
    gap: 14px;
}

.search-form {
    grid-template-columns: minmax(0, 1fr) auto;
    min-width: min(100%, 420px);
}

.filter-bar {
    display: grid;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: end;
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: end;
    align-self: end;
}

.filter-actions .button {
    white-space: nowrap;
}

label span {
    display: block;
    margin-bottom: 8px;
    font-size: 0.92rem;
    font-weight: 600;
}

input,
textarea,
select {
    width: 100%;
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--panel-strong);
    font: inherit;
}

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

#user-table {
	width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 16px 10px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

td strong,
td span {
    display: block;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name {
    font-weight: 700;
    font-size: 1rem;
}

.user-username {
    color: var(--muted);
    font-size: 0.9rem;
}

.user-email {
    color: var(--muted);
    font-size: 0.84rem;
}

.badge {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: capitalize;
}

.badge.active {
    background: rgba(100, 176, 129, 0.14);
    color: #27613c;
}

.badge.maintenance {
    background: rgba(232, 201, 167, 0.4);
    color: #7a5727;
}

.badge.inactive {
    background: rgba(201, 109, 86, 0.18);
    color: #8c3b2b;
}

.actions {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
}

/* Table Actions - Keep horizontal on all screens */
table .actions {
    display: flex !important;
    flex-direction: row !important;
    gap: 6px;
    flex-wrap: nowrap !important;
    white-space: nowrap;
}

table .actions button {
    white-space: nowrap;
}

/* Actions Column Width */
th:last-child,
td:last-child {
    width: 180px;
    min-width: 150px;
}

.inline-chip {
    display: inline-flex;
    margin: 0 8px 0 0;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(31, 36, 48, 0.06);
    font-size: 0.84rem;
}

.menu-label {
    font-size: 0.92rem;
    font-weight: 600;
}

.menu-grid {
    display: grid;
    gap: 12px;
}

.check-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel-strong);
}

.check-card input {
    width: auto;
    margin-top: 3px;
}

.check-card span {
    display: block;
    color: var(--muted);
    margin-top: 4px;
}

.checklist {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.alert,
.notice,
.loading-card,
.empty-state {
    padding: 14px;
    border-radius: 16px;
    background: rgba(201, 109, 86, 0.08);
    color: #8c3b2b;
}

.loading-card,
.empty-state {
    color: var(--muted);
    background: rgba(31, 36, 48, 0.04);
}

.notice {
    background: rgba(100, 176, 129, 0.14);
    color: #27613c;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(100%, 460px);
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: var(--shadow);
    border-radius: 28px;
    padding: 32px;
    display: grid;
    gap: 20px;
}

.modal-shell {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 24px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(31, 36, 48, 0.36);
    backdrop-filter: blur(6px);
}

.modal-card {
    position: relative;
    width: min(100%, 560px);
    max-height: calc(100vh - 48px);
    overflow: auto;
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: var(--shadow);
    border-radius: 28px;
    padding: 24px;
    display: grid;
    gap: 18px;
}

.modal-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 1080px) {
    .shell,
    .admin-grid,
    .two-col,
    .checklist {
        grid-template-columns: 1fr;
    }

    .sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .hero {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .filter-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .content {
        padding: 18px;
    }

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

    .filter-actions,
    .modal-actions {
        width: 100%;
    }

    .actions {
        flex-direction: column;
    }

    .modal-shell {
        padding: 12px;
    }
}
/* ===========================================
   HORIZONTAL TABS - Simple & Clean
   =========================================== */
.tab-button-row {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.tab-button {
    padding: 10px 20px;
    border: 2px solid transparent;
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-secondary);
    font-family: "IBM Plex Sans", sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 200ms ease;
}

.tab-button:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: rgba(31, 36, 48, 0.15);
}

.tab-button.active {
    background: var(--sand);
    color: var(--ink);
    border-color: transparent;
    font-weight: 600;
}

.tab-content {
    width: 100%;
    animation: fadeIn 250ms ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===========================================
   PERMISSIONS - Menu Grid & Styles
   =========================================== */
.permissions-filter {
    margin-bottom: 24px;
}

.permissions-role-select {
    width: 320px !important;
    padding: 14px 16px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
}

/* Menu Grid for Permissions Modal - Improved */
.modal .menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    max-height: 450px;
    overflow-y: auto;
    padding: 16px;
    background: rgba(31, 36, 48, 0.02);
    border-radius: 16px;
}

.modal .menu-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid var(--line);
    border-radius: 14px;
    cursor: pointer;
    transition: all 200ms ease;
    user-select: none;
    background: white;
}

.modal .menu-checkbox:hover {
    background: rgba(31, 36, 48, 0.03);
    border-color: var(--border-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.modal .menu-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--ink);
}

.modal .menu-checkbox input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: var(--ink);
}

/* ===========================================
   MODAL - Enhanced Styles
   =========================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-open {
    display: flex !important;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(31, 36, 48, 0.45);
    backdrop-filter: blur(8px);
}

.modal-dialog {
    position: relative;
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: var(--shadow);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 680px;
    max-height: 85vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    font-family: "Space Grotesk", sans-serif;
}

.modal-close {
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 200ms ease;
}

.modal-close:hover {
    background: rgba(201, 109, 86, 0.1);
    color: var(--coral);
    border-color: rgba(201, 109, 86, 0.3);
}

.modal-body {
    padding: 24px 32px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 32px;
    border-top: 1px solid var(--line);
    background: rgba(255, 250, 242, 0.5);
}

/* ===========================================
   PERMISSIONS TABLE - Enhanced
   =========================================== */
.permissions-table th:first-child {
    width: 40%;
}

.permissions-table td strong {
    font-size: 15px;
    font-weight: 600;
}

/* ===========================================
   RESPONSIVE - Mobile Friendly
   =========================================== */
@media (max-width: 1080px) {
    .tab-button-row {
        flex-wrap: wrap;
    }
    
    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    
    .permissions-role-select {
        width: 100% !important;
    }
}

@media (max-width: 720px) {
    .modal-dialog {
        width: 95%;
        max-height: 90vh;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }

    .modal-header h3 {
        font-size: 18px;
    }

    .menu-grid {
        grid-template-columns: 1fr;
        max-height: 350px;
    }
    
    .content-with-tabs {
        padding-top: 16px;
    }
}

/* ===========================================
   FINAL POLISH - Additional Enhancements
   =========================================== */

/* Table Row Hover Effect */
table tbody tr:hover {
    background: rgba(31, 36, 48, 0.02);
}

/* Smooth Loading Animation */
.loading-card {
    text-align: center;
    padding: 3rem !important;
    animation: pulse 2s ease-in-out infinite;
}

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

/* Improved Button Focus States */
button:focus,
input:focus,
select:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(31, 36, 48, 0.1);
}

/* Enhanced Empty State */
.empty-state {
    padding: 3rem !important;
    text-align: center;
    font-size: 15px;
}

/* Section Panel Spacing */
.section-panel:first-child {
    margin-bottom: 24px;
}

/* Permissions Filter Enhancement */
.permissions-filter {
    background: linear-gradient(135deg, rgba(255, 250, 242, 0.95), rgba(232, 201, 167, 0.3));
}

/* Permissions filter-grid override - force single row layout */
.permissions-filter .filter-grid {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 16px;
    width: 100%;
}

.permissions-filter .filter-grid > label {
    flex: 1;
    margin-bottom: 0;
}

.permissions-filter .filter-grid > .filter-actions {
    flex-shrink: 0;
    align-self: flex-end;
}

/* Users filter-grid override - force single row layout */
.users-filter .filter-grid {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 16px;
    width: 100%;
}

.users-filter .filter-grid > label {
    flex: 1;
    margin-bottom: 0;
}

.users-filter .filter-grid > .filter-actions {
    flex-shrink: 0;
    align-self: flex-end;
}

/* Permissions Table Inline Checkbox */
.menu-checkbox-inline {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

#select-all-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

.permissions-table thead .checkbox-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 2px;
}

.badge.inactive {
    background: rgba(255, 169, 169, 0.2);
    color: #e74c3c;
}

/* Permissions Table Styling */
.permissions-table td:first-child {
    text-align: center;
}

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

/* Tab Button Active Indicator */
.vertical-tabs .tab-button.active {
    position: relative;
}

/* Smooth Scrollbar for Modal */
.modal-dialog::-webkit-scrollbar {
    width: 8px;
}

.modal-dialog::-webkit-scrollbar-track {
    background: rgba(31, 36, 48, 0.05);
    border-radius: 4px;
}

.modal-dialog::-webkit-scrollbar-thumb {
    background: rgba(31, 36, 48, 0.2);
    border-radius: 4px;
}

.modal-dialog::-webkit-scrollbar-thumb:hover {
    background: rgba(31, 36, 48, 0.3);
}

/* Checkbox Custom Style Enhancement */
.menu-checkbox input[type="checkbox"] {
    accent-color: var(--ink);
}

/* Panel Shadow Enhancement on Hover */
.panel:hover {
    box-shadow: 0 28px 70px rgba(52, 39, 17, 0.14);
    transition: box-shadow 300ms ease;
}

/* Enhanced Table Actions Styling */
td .actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: nowrap !important;
    padding: 4px 0;
}

td .actions button {
    margin: 0;
    padding: 6px 12px;
    font-size: 13px;
    line-height: 1.5;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Ensure Actions column has proper width */
table th:last-child,
table td:last-child {
    min-width: 200px !important;
    width: auto !important;
}

/* ============================
   Global Toast Notification System
   ============================ */
.toast-notification-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    pointer-events: none;
}

.toast-notification {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: 0 8px 32px rgba(52, 39, 17, 0.16);
    pointer-events: auto;
    animation: toastSlideIn 0.3s ease-out;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-notification.toast-closing {
    opacity: 0;
    transform: translateX(100%);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-notification .toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-notification .toast-content {
    flex: 1;
    min-width: 0;
}

.toast-notification .toast-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
    color: var(--ink);
}

.toast-notification .toast-message {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.4;
}

.toast-notification .toast-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

.toast-notification .toast-close:hover {
    color: var(--coral);
    transform: scale(1.1);
}

/* Toast Types */
.toast-notification.toast-success {
    background: linear-gradient(135deg, rgba(184, 214, 195, 0.3), rgba(255, 250, 242, 0.9));
    border-color: var(--mint);
}

.toast-notification.toast-success .toast-icon {
    color: #27613c;
}

.toast-notification.toast-error {
    background: linear-gradient(135deg, rgba(201, 109, 86, 0.15), rgba(255, 250, 242, 0.9));
    border-color: var(--coral);
}

.toast-notification.toast-error .toast-icon {
    color: #c96d56;
}

.toast-notification.toast-warning {
    background: linear-gradient(135deg, rgba(232, 201, 167, 0.4), rgba(255, 250, 242, 0.9));
    border-color: var(--sand);
}

.toast-notification.toast-warning .toast-icon {
    color: #7a5727;
}

/* Progress Bar for Auto Close */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 14px 14px;
    background: var(--mint);
    animation: toastProgress linear forwards;
}

.toast-notification.toast-error .toast-progress {
    background: var(--coral);
}

.toast-notification.toast-warning .toast-progress {
    background: var(--sand);
}

@keyframes toastProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Notification Badge Counter */
.toast-badge-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--coral);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 999px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(201, 109, 86, 0.3);
}

/* Notification Settings Button */
.toast-settings-btn {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9998;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: var(--ink);
    box-shadow: 0 4px 16px rgba(52, 39, 17, 0.08);
    transition: all 0.2s ease;
}

.toast-settings-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(52, 39, 17, 0.12);
    border-color: var(--line);
}

/* ===========================================
    PROFILE PAGE STYLES
    =========================================== */
.profile-card {
    display: flex;
    gap: 24px;
    padding: 24px;
}

.profile-avatar {
    flex-shrink: 0;
}

.avatar-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    font-weight: 600;
    font-family: "Space Grotesk", sans-serif;
}

.profile-info h3 {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-family: "Space Grotesk", sans-serif;
}

.profile-details {
    margin-top: 16px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    font-weight: 500;
    color: var(--muted);
    font-size: 14px;
}

.detail-row .value {
    color: var(--ink);
    font-size: 14px;
}

/* Form Card for Change Password */
.form-card {
    max-width: 500px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--ink);
}

.form-input {
    width: 100%;
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--panel-strong);
    font: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(31, 36, 48, 0.1);
}

.form-actions {
    margin-top: 24px;
}

/* Alert Styles */
.alert {
    padding: 12px 16px;
    border-radius: 14px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-error {
    background: rgba(201, 109, 86, 0.1);
    color: #8c3b2b;
    border: 1px solid rgba(201, 109, 86, 0.2);
}

.alert-success {
    background: rgba(184, 214, 195, 0.3);
    color: #27613c;
    border: 1px solid var(--mint);
}

.text-muted {
    color: var(--muted);
    font-size: 14px;
}


/* ===========================================
    PROFILE PAGE STYLES - SERAGAM DENGAN EXISTING DESIGN
    =========================================== */

/* Hero Section - Match existing .hero style */
.hero-content {
    display: flex;
    align-items: center;
    gap: 24px;
}

.hero-info h1 {
    margin: 0 0 4px 0;
    font-size: 24px;
    font-weight: 700;
    font-family: "Space Grotesk", sans-serif;
}

.hero-role {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
}

.hero-username {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

/* Hero Avatar */
.hero-avatar {
    position: relative;
    display: inline-block;
}

/* Large Avatar for Profile Hero */
.avatar-circle-lg {
    width: 80px !important;
    height: 80px !important;
    font-size: 32px !important;
}

/* Status Badge */
.status-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.status-badge .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
}

.status-badge.status-inactive .status-dot {
    background: #f87171;
}

/* Status Badge Small */
.status-badge-small {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge-small.status-active {
    background: rgba(74, 222, 128, 0.15);
    color: #16a34a;
}

.status-badge-small.status-inactive {
    background: rgba(248, 113, 113, 0.15);
    color: #dc2626;
}

/* Role Badge */
.role-badge {
    background: var(--ink);
    color: white;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

/* Info Row - Match existing .detail-row style */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.info-row:last-child {
    border-bottom: none;
    padding-bottom: 4px;
}

.info-row:first-child {
    padding-top: 4px;
}

.info-label {
    font-weight: 500;
    color: var(--muted);
    font-size: 14px;
}

.info-value {
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
}

/* Panel Body - Add padding for cards */
.panel-body {
    padding-top: 8px;
}

/* Activity Stats */
.activity-stats {
    display: flex;
    gap: 40px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 20px;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    font-family: "Space Grotesk", sans-serif;
}

.stat-label {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .activity-stats {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-info h1 {
        font-size: 20px;
    }
}

/* ===========================================
    MODAL STYLES
    =========================================== */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay .modal {
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border-radius: 28px;
    width: 100%;
    max-width: 640px;
    height: auto;
    max-height: 90vh;
    overflow-y: auto;
    margin: auto;
    z-index: 10000 !important;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
/* Modal Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
    width: 100%;
    background: transparent;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    font-family: "Space Grotesk", sans-serif;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h3 i {
    color: var(--primary-color);
    font-size: 22px;
}

/* Modal Close Button */
.modal-close {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--muted);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--ink);
}

/* Modal Body */
.modal-body {
    padding: 28px;
    display: block !important;
    width: 100% !important;
    flex: 1 1 auto;
}

/* Modal Form Group */
.modal-body .form-group {
    margin-bottom: 20px;
    display: block;
    width: 100%;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--ink);
}

/* Modal Form Input */
.modal-body .form-input {
    width: 100% !important;
    display: block;
}

/* Form Input */
.form-input {
    width: 100%;
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--panel-strong);
    font: inherit;
    font-size: 14px;
    color: var(--ink);
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(31, 36, 48, 0.1);
}

.form-input::placeholder {
    color: var(--muted);
}

/* Modal Form Actions */
.modal-body .form-actions {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Form Actions */
.form-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
}

/* Button Styles */
.button {
    appearance: none;
    border: 0;
    border-radius: 14px;
    padding: 12px 16px;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.button.primary {
    background: var(--ink);
    color: white;
}

.button.primary:hover:not(:disabled) {
    background: rgba(31, 36, 48, 0.9);
}

.button.secondary {
    background: rgba(31, 36, 48, 0.06);
    color: var(--ink);
}

.button.secondary:hover:not(:disabled) {
    background: rgba(31, 36, 48, 0.1);
}

/* Alert Styles */
.alert {
    padding: 12px 16px;
    border-radius: 14px;
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-error {
    background: rgba(201, 109, 86, 0.1);
    color: #8c3b2b;
    border: 1px solid rgba(201, 109, 86, 0.2);
}

.alert-success {
    background: rgba(184, 214, 195, 0.3);
    color: #27613c;
    border: 1px solid var(--mint);
}

.alert i {
    font-size: 16px;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal {
        max-width: 100%;
        margin: 20px;
        border-radius: 20px;
    }
    
    .modal-header {
        padding: 20px 24px;
    }
    
    .modal-body {
        padding: 24px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* ===========================================
   SMTP SETTINGS - Email Configuration
   =========================================== */

.form-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--line);
}

.form-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.form-section h4 {
    margin: 0 0 20px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section h4 i {
    color: var(--primary-color);
}

.form-row {
    margin-bottom: 16px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-row .form-group {
    flex: 1;
}

.form-row .form-group:last-child {
    margin-left: 16px;
}

.form-group label {
    margin-bottom: 8px;
}

.form-group input[type="checkbox"] {
    margin-right: 8px;
}

.form-group label input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

/* SMTP Guide Grid */
.smtp-guide-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.smtp-guide-item {
    padding: 20px;
    background: rgba(255, 250, 242, 0.5);
    border: 1px solid var(--line);
    border-radius: 16px;
    transition: all 0.2s ease;
}

.smtp-guide-item:hover {
    border-color: var(--border-hover);
    box-shadow: 0 2px 8px rgba(31, 36, 48, 0.06);
}

.smtp-guide-item h5 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    font-family: "Space Grotesk", sans-serif;
}

.smtp-guide-detail {
    font-size: 13px;
    line-height: 1.6;
    color: var(--muted);
}

.smtp-guide-detail p {
    margin: 4px 0;
}

.smtp-guide-detail strong {
    color: var(--ink);
    font-weight: 500;
}

/* Responsive SMTP Guide */
@media (max-width: 1080px) {
    .smtp-guide-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .form-row .form-group:last-child {
        margin-left: 0;
        margin-top: 12px;
    }
    
    .form-section {
        padding-bottom: 24px;
    }
}

/* ===========================================
   SUBMENU - Navigation
   =========================================== */

.nav-item {
    position: relative;
    width: 100%;
}

.nav-item.has-submenu > a {
    cursor: pointer;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 12px;
    transition: all 200ms ease;
    font-size: 14px;
    font-weight: 500;
}

.nav-item a:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item a.active {
    background: rgba(31, 36, 48, 0.08);
    color: var(--ink);
    font-weight: 600;
}

.submenu-arrow {
    margin-left: auto;
    font-size: 12px;
    transition: transform 200ms ease;
    color: var(--muted);
}

.submenu-arrow.expanded {
    transform: rotate(180deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 300ms ease, padding 300ms ease;
    padding-left: 20px;
    background: rgba(31, 36, 48, 0.02);
    border-radius: 12px;
    margin-top: 4px;
}

.submenu.expanded {
    max-height: 500px;
    padding: 8px 0;
}

.submenu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: var(--muted);
    text-decoration: none;
    border-radius: 8px;
    transition: all 200ms ease;
    font-size: 13px;
    font-weight: 400;
}

.submenu a:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.submenu a.active {
    background: rgba(31, 36, 48, 0.06);
    color: var(--ink);
    font-weight: 500;
}

/* Responsive Submenu */
@media (max-width: 720px) {
    .submenu {
        padding-left: 16px;
    }
    
    .submenu.expanded {
        padding: 6px 0;
    }
}
