:root {
    --sidebar-bg: #000;
    --sidebar-active-bg: #f3ef88;
    --sidebar-active-color: #000;
    --sidebar-color: #a0a8a3;
    --bg-color: #ffffff;
    --text-main: #1c1c1c;
    --text-muted: #8c8c8c;
    --border-color: #f0f0f0;
    --badge-active-bg: #f3ef88;
    --badge-active-color: #000;
    --badge-inactive-bg: #e6e8eb;
    --badge-inactive-color: #000;
    --font-family: Arial, sans-serif;
    --font-size-base: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Top App Header */
.app-header {
    height: 60px;
    background-color: var(--sidebar-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1020;
    flex-shrink: 0;
}

/* Logo */
.app-header .header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--sidebar-active-bg);
    font-size: 20px;
    font-weight: bold;
}

.app-header .header-logo i {
    font-size: 22px;
}

.app-header .brand-name {
    color: #fff;
    font-size: 16px;
    letter-spacing: 0.5px;
}

/* Nav links */
.app-header .header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
}

.app-header .nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: var(--sidebar-color);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-header .nav-item i {
    font-size: 16px;
}

.app-header .nav-item:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.08);
}

.app-header .nav-item.active {
    background-color: var(--sidebar-active-bg);
    color: var(--sidebar-active-color);
    font-weight: 600;
}

/* Right Section: User & Logout */
.app-header .header-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.app-header .user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.app-header .user-name {
    color: #fff;
    font-weight: 600;
    font-size: 12px;
}

.app-header .user-role {
    color: var(--sidebar-color);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.app-header .btn-logout {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    color: var(--sidebar-color);
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s;
}

.app-header .btn-logout:hover {
    background-color: rgba(224, 82, 96, 0.2);
    color: #e05260;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 10px;
    position: sticky;
    top: 0;
    background-color: var(--bg-color);
    z-index: 1010;
    border-bottom: 1px solid var(--border-color);
}

.dataTables_length {
    margin-bottom: 4px !important;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 10px 15px;
    padding-right: 35px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    outline: none;
    width: 400px !important;
}

.search-box i {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    cursor: pointer;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--sidebar-bg);
    color: #fff;
}

.btn-primary:hover {
    background-color: #000;
}

.btn-success {
    background-color: var(--sidebar-active-bg);
    color: var(--sidebar-active-color);
}

.btn-danger {
    background-color: #e05260;
    color: #fff;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-danger:hover {
    background-color: #cb3d4b;
}

.btn-danger:active {
    transform: scale(0.97);
}

/* Table */
.data-container {
    padding: 0px 10px 10px 10px;
}

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

table th,
table td {
    padding: 15px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table th {
    background-color: #222121;
    color: #FFF;
    font-weight: bold;
}

table td {
    font-size: 14px;
}

table td .subtext {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 11px;
    text-align: center;
    display: inline-block;
}

.badge.active {
    background-color: var(--badge-active-bg);
    color: var(--badge-active-color);
}

.badge.inactive {
    background-color: var(--badge-inactive-bg);
    color: var(--badge-inactive-color);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    width: 400px;
    max-width: 90%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

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

.close-modal {
    cursor: pointer;
    font-size: 20px;
    color: var(--text-muted);
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    outline: none;
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, var(--sidebar-bg) 0%, #0a110d 100%);
    width: 100%;
}

.auth-box {
    width: 400px;
    padding: 50px 40px;
    background: #ffffff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.auth-box h2 {
    margin-bottom: 30px;
    text-align: center;
    font-size: 28px;
    color: var(--text-main);
}

.auth-box .form-group label {
    font-weight: bold;
    font-size: 13px;
    color: var(--text-main);
}

.auth-box .form-group input {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.auth-box .form-group input:focus {
    border-color: var(--sidebar-bg);
    box-shadow: 0 0 0 3px rgba(17, 28, 22, 0.1);
}

.auth-box .btn {
    width: 100%;
    justify-content: center;
    margin-top: 20px;
    padding: 12px;
    font-size: 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.auth-box .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Utility */
.text-right {
    text-align: right;
}

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

.d-none {
    display: none !important;
}

.mt-20 {
    margin-top: 20px;
}