:root {

    --primary: #fea016;

    --primary-hover: #e08b10;
    --primary-soft: rgba(254, 160, 22, 0.15);
    --primary-glow: rgba(254, 160, 22, 0.3);
    --primary-gradient: linear-gradient(135deg, #FFB74D 0%, #fea016 100%);

    --sidebar-bg: #101e32;

    --sidebar-text: #e2e8f0;
    --sidebar-text-muted: #94a3b8;
    --sidebar-active: #fea016;
    --sidebar-active-bg: rgba(255, 255, 255, 0.05);

    --bg-light: #f1f5f9;

    --card-light: #ffffff;
    --text-light: #1e293b;

    --text-muted-light: #64748b;
    --border-light: #e2e8f0;
    --shadow-premium: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.02);

    --bg-dark: #0f172a;
    --card-dark: #1e293b;
    --text-dark: #f8fafc;
    --text-muted-dark: #94a3b8;
    --border-dark: #334155;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --header-height: 70px;
    --footer-height: 60px;
}

[data-theme="light"] {
    --bg: var(--bg-light);
    --card: var(--card-light);
    --text: var(--text-light);
    --text-muted: var(--text-muted-light);
    --border: var(--border-light);
    --shadow: var(--shadow-premium);
}

[data-theme="dark"] {
    --bg: var(--bg-dark);
    --card: var(--card-dark);
    --text: var(--text-dark);
    --text-muted: var(--text-muted-dark);
    --border: var(--border-dark);
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body.user-is-tabbing :focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

body:not(.user-is-tabbing) :focus {
    outline: none;
}

body {
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    transition: var(--transition);
    line-height: 1.5;
    background-image: radial-gradient(at 0% 0%, rgba(254, 160, 22, 0.03) 0px, transparent 50%);
}

#suite-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-center {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-container {
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
    padding: 3.5rem;
    background: var(--card);
    border-radius: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: relative;
}

.auth-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    width: 80%;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 0 0 100px 100px;
}

.auth-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
    text-align: center;
    letter-spacing: -0.05em;
    color: var(--text);
}

.auth-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.75rem;
    color: #64748b;
    width: 100%;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-size: 0.825rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
    text-transform: capitalize;
    letter-spacing: 0.05em;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    border: 2px solid var(--border);
    background: var(--bg);
    color: var(--text);
    outline: none;
    transition: var(--transition);
    font-size: 1rem;
    font-weight: 500;
    resize: vertical;
}

.input-group select option {
    background: #ffffff;
    color: #1e293b;
}

[data-theme="dark"] .input-group select option {
    background: #1e293b;
    color: #f8fafc;
}

[data-theme="dark"] .input-group input,
[data-theme="dark"] .input-group select,
[data-theme="dark"] .input-group textarea {
    background: #0f172a;
    color: #f8fafc;
    border-color: #334155;
}

[data-theme="dark"] .input-group input::placeholder,
[data-theme="dark"] .input-group textarea::placeholder {
    color: #64748b;
}

::-webkit-calendar-picker-indicator {
    filter: invert(0) !important;
}

[data-theme="dark"] ::-webkit-calendar-picker-indicator {
    filter: invert(1) !important;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 5px var(--primary-soft);
}

[data-theme="dark"] .input-group input:focus,
[data-theme="dark"] .input-group textarea:focus,
[data-theme="dark"] .input-group select:focus {
    background: #1e293b;
}

.btn {
    width: 100%;
    padding: 1.1rem 1.5rem;
    border-radius: 1.1rem;
    border: none;
    background: var(--text);
    color: var(--card);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-3px);
    background: var(--primary);
    box-shadow: 0 20px 25px -5px var(--primary-soft);
}

.btn-primary {
    background: var(--primary-gradient);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
}

[data-theme="dark"] .nav {
    background: rgba(16, 30, 50, 0.95);

    background: rgba(2, 6, 23, 0.95);
}

.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    padding: 1.5rem 1rem;
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    z-index: 90;
}

.nav-brand {
    font-size: 1.75rem;
    font-weight: 950;
    letter-spacing: -0.06em;
    color: var(--text);
}

.dashboard-layout {
    display: flex;
    flex: 1;
}

.card {
    background: var(--card);
    border-radius: 2rem;
    padding: 3rem;
    border: 1px solid var(--border);
    margin-bottom: 3rem;
    box-shadow: var(--shadow-premium);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 40px -15px rgba(0, 0, 0, 0.05);
}

.main-content {
    flex: 1;
    padding: 3rem 4rem 6rem 4rem;

    background: var(--bg);
    min-height: calc(100vh - var(--header-height));
}

footer {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 280px;

    height: var(--footer-height);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);

    border-top: 1px solid var(--border);
    z-index: 80;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] footer {
    background: rgba(15, 23, 42, 0.9);
}

@media (max-width: 768px) {
    footer {
        left: 0;

        padding: 1rem;
        font-size: 0.7rem;
    }

    .main-content {
        padding: 1rem 1rem 5rem 1rem !important;

    }
}

.card:hover {
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.06);
}

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

th {
    text-align: left;
    padding: 1rem;
    font-size: 0.75rem;
    text-transform: capitalize;
    color: #64748b;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-active {
    background: #dcfce7;
    color: #166534;
}

.badge-suspended {
    background: #fee2e2;
    color: #991b1b;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    font-size: 1.2rem;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .sidebar {
        position: fixed;
        left: -110% !important;
        top: 60px;
        height: auto !important;
        max-height: calc(100vh - 60px);
        width: 100vw !important;
        right: 0 !important;
        z-index: 1000;
        transition: var(--transition);
        display: block !important;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        background: var(--sidebar-bg);
        overflow-y: auto;
        padding-top: 3rem !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .sidebar-link {
        justify-content: center !important;
        width: fit-content !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
        padding: 0.75rem 2rem !important;
    }

    .sidebar-user {
        margin-bottom: 2rem !important;
        width: 85% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        background: rgba(255, 255, 255, 0.05) !important;
        flex-direction: row !important;
        justify-content: center !important;
        gap: 1rem !important;
        padding: 0.75rem 1rem !important;
    }

    .sidebar-user-info {
        align-items: flex-start !important;
        text-align: left !important;
    }

    .sidebar.show {
        left: 0 !important;
    }

    .main-content {
        margin-top: 0;
    }

    .nav {
        height: 60px;
        position: sticky;
        top: 0;
        z-index: 1001;
        padding: 0 1rem !important;
    }

    .nav-brand {
        font-size: 1.2rem !important;
    }

    .header-user,
    .header-logout,
    .nav div[style*="position: relative"] {
        display: none !important;
    }

    .nav div[style*="gap: 1.5rem"] {
        gap: 0.75rem !important;
    }

    .menu-toggle {
        margin-left: 0.5rem;
    }

    .main-content {
        padding: 1rem !important;
    }

    .card {
        padding: 1.25rem 1rem !important;
        margin-bottom: 2rem !important;
    }

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block !important;
        width: 100% !important;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        background: var(--card) !important;
        border: 1px solid var(--border) !important;
        border-radius: 1.5rem !important;
        margin-bottom: 2rem !important;
        padding: 1rem !important;
        box-shadow: var(--shadow) !important;
    }

    td {
        border: none !important;
        border-bottom: 1px solid var(--border) !important;
        position: relative !important;
        padding: 1.25rem 1rem 1.25rem 40% !important;
        text-align: right !important;
        font-size: 0.9rem !important;
        min-height: 3.5rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
    }

    td:last-child {
        border-bottom: 0 !important;
    }

    td::before {
        content: attr(data-label);
        position: absolute;
        left: 1rem;
        width: 35%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: 800;
        text-align: left;
        color: var(--text-muted);
        font-size: 0.75rem;
        text-transform: capitalize;
        letter-spacing: 0.05em;
    }

    td div {
        justify-content: flex-end !important;
        flex-wrap: wrap !important;
    }

    .modal-content {
        width: 95% !important;
        max-width: 95vw !important;
        margin: auto !important;
        padding: 1.5rem !important;
        max-height: 92vh !important;
    }

    .header-user,
    .header-logout {
        display: none !important;
    }
}

.header-user {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
}

.sidebar-user {
    display: flex !important;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-user-avatar {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--sidebar-text);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    border: 1.5px solid var(--primary);
}

.sidebar-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.sidebar-user .username {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--sidebar-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.sidebar-user .role {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--sidebar-text-muted);
    text-transform: capitalize;
    letter-spacing: 0.02em;
    margin-top: 0.1rem;
}

.modal {
    display: none !important;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}

.modal[style*="display: flex"] {
    display: flex !important;
}

.modal-content {
    background: var(--card);
    border-radius: 2rem;
    padding: 2.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 440px;
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: auto;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 1.5rem !important;
    flex-shrink: 0;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
    margin-bottom: 1.5rem;
}

.modal-footer {
    flex-shrink: 0;
    display: flex;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--card);
}

.modal-body::-webkit-scrollbar {
    width: 5px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

.back-to-top {
    position: fixed;
    bottom: calc(var(--footer-height) + 2rem);
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: none;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-hover);
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px var(--primary-soft);
}

.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    pointer-events: none;
}

.toast {
    background: var(--card);
    color: var(--text);
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-premium);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    max-width: 400px;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: auto;
    backdrop-filter: blur(10px);
}

.toast.toast-success {
    border-left: 4px solid #10b981;
}

.toast.toast-error {
    border-left: 4px solid #ef4444;
}

.toast.hiding {
    animation: slideOut 0.3s forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.sidebar-link {
    display: flex !important;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    color: var(--sidebar-text-muted) !important;
    text-decoration: none !important;
    margin-bottom: 0.25rem;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-text) !important;
}

.sidebar-link.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active) !important;
    border-left: 3px solid var(--sidebar-active);
}

.input-group input,
.input-group select,
.input-group textarea {
    background: #ffffff;
    border: 1px solid var(--border);
}

#global-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--primary-gradient);
    z-index: 9999;

    box-shadow: 0 0 10px var(--primary);
}