/* ==========================================================================
   1. GLOBAL VARIABLES & RESET
   ========================================================================== */
:root {
    /* Primary Color Palette */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;

    /* Neutral Color Palette */
    --bg-body: #f8fafc;
    --surface: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;

    /* Status Colors */
    --danger-bg: #fee2e2;
    --danger-text: #ef4444;
    --success-bg: #dcfce7;
    --success-text: #16a34a;

    /* Layout & Styling */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --transition: all 0.2s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
}

body.dashboard-body,
body.app-body {
    display: flex;
    background-color: #f8fafc;
    min-height: 100vh;
    color: #334155;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ==========================================================================
   2. HALAMAN LOGIN
   ========================================================================== */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #e0f2fe 0%, #f8fafc 100%);
}

.login-card {
    display: flex;
    width: 100%;
    max-width: 880px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.login-form-area {
    flex: 1.1;
    padding: 44px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-logo {
    font-size: 36px;
    margin-bottom: 12px;
}

.brand-logo-wrapper {
    margin-bottom: 20px;
}

.login-form-area h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 6px;
}

.login-form-area p {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 24px;
}

.input-group {
    position: relative;
    margin-bottom: 14px;
}

.input-group .icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    pointer-events: none;
    z-index: 2;
}

.input-group input,
.input-group select {
    width: 100%;
    height: 46px;
    padding: 0 40px 0 42px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text-primary);
    background-color: var(--surface);
    transition: var(--transition);
    outline: none;
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    z-index: 3;
}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

input[type="password"]::-webkit-password-reveal-button,
input[type="password"]::-webkit-credentials-auto-fill-button {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.remember-me input[type="checkbox"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.btn-login {
    width: 100%;
    height: 46px;
    background-color: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 15px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.btn-login:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.login-illustration-area {
    flex: 1;
    background-color: #eef2ff;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
}

.bg-pattern-circle {
    position: absolute;
    width: 360px;
    height: 360px;
    background: #e0e7ff;
    border-radius: 50%;
    top: -40px;
    right: -40px;
    z-index: 1;
}

.character-img,
.login-illustration-area img {
    position: relative;
    z-index: 2;
    width: 110%;
    max-height: 480px;
    object-fit: contain;
    display: block;
    margin-bottom: -10px;
    transform: scale(1.15);
    transform-origin: bottom center;
}

.alert-danger {
    color: var(--danger-text);
    background-color: var(--danger-bg);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
}

/* ==========================================================================
   3. LAYOUT SIDEBAR & UTAMA
   ========================================================================== */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #12193b;
    color: #ffffff;
    padding: 24px 16px;
    box-sizing: border-box;
    z-index: 100;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-header,
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.brand-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #4f32ff, #6a1bff);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(99, 43, 255, 0.4);
}

.brand-text h3,
.brand-text h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #ffffff;
    text-transform: uppercase;
}

.brand-text span,
.brand-text p {
    margin-top: 2px;
    display: block;
    font-size: 0.75rem;
    color: #7b88a8;
    font-weight: 500;
    text-transform: uppercase;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    flex: 1; 
}

.sidebar-menu li {
    margin-bottom: 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    color: #8c9bba;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.2s ease-in-out;
}

.sidebar-menu a i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sidebar-menu a:hover {
    color: #ffffff;
}

/* Menu aktif */
.sidebar-menu li.active a {
    background: linear-gradient(90deg, #4b12ff, #5e22ff);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 18px rgba(75, 18, 255, 0.45);
}

.sidebar .logout-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    color: #8c9bba;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    border-radius: 12px;
    transition: background-color 0.2s, color 0.2s;
}

.sidebar .logout-btn:hover {
    background-color: #ef4444;
    color: #ffffff;
}

.main-content {
    margin-left: 250px;
    flex: 1;
    padding: 35px 40px;
    background-color: var(--bg-body);
    overflow-y: auto;
}

.dashboard-header,
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.dashboard-header h1,
.content-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 18px;
    color: #475569;
    cursor: pointer;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.avatar {
    width: 36px;
    height: 36px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

/* ==========================================================================
   4. DASHBOARD UTAMA & ELEMEN KONTEN
   ========================================================================== */
.welcome-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.03);
    margin-bottom: 35px;
    position: relative;
    overflow: hidden;
}

.welcome-text h2 {
    margin: 0 0 8px 0;
    font-size: 1.6rem;
    color: #1b254b;
    font-weight: 700;
}

.welcome-text p {
    margin: 0 0 20px 0;
    color: #707ebe;
    font-size: 0.92rem;
}

.welcome-img img {
    height: 130px;
    object-fit: contain;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--surface);
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-info h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-info p {
    font-size: 13px;
    color: var(--text-secondary);
}

.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.search-box,
.search-box-dashboard {
    position: relative;
    width: 380px;
    display: flex;
    align-items: center;
}

.search-icon,
.search-box-dashboard i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
}

.search-box input,
.search-box-dashboard input {
    width: 100%;
    height: 42px;
    padding: 0 16px 0 40px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    outline: none;
    font-size: 13px;
    color: #1b254b;
}

.search-box input:focus,
.search-box-dashboard input:focus {
    border-color: #4318ff;
}

.clear-search-btn {
    position: absolute;
    right: 12px;
    color: #a3aed0;
    text-decoration: none;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.clear-search-btn:hover {
    color: #ef4444;
}

.btn-primary-add {
    background-color: #5b46e5;
    color: #ffffff;
    padding: 0 18px;
    height: 42px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(91, 70, 229, 0.2);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #1b254b;
    font-weight: 700;
}

.see-all {
    color: #4318ff;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
}

/* Grid Komik */
.komik-grid-ui {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

.card-komik-item {
    background: #ffffff;
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-komik-item:hover {
    transform: translateY(-5px);
    box-shadow: 0px 15px 35px rgba(0, 0, 0, 0.06);
}

.dashboard-komik-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.dashboard-komik-grid .card-komik-item {
    padding: 18px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
}

.dashboard-komik-grid .card-komik-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.dashboard-komik-grid .cover-wrapper {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    overflow: hidden;
}

.dashboard-komik-grid .cover-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dashboard-komik-grid .cover-wrapper .no-cover {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--primary);
}

.dashboard-komik-grid .stok-badge,
.dashboard-komik-grid .tags-row {
    display: none;
}

.dashboard-komik-grid .details-wrapper {
    margin-top: 0;
    flex: 1;
    min-width: 0;
}

.dashboard-komik-grid .details-wrapper h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-komik-grid .meta-info {
    margin-bottom: 0;
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cover-wrapper {
    height: 190px;
    background: #f4f7fe;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cover-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-cover {
    font-size: 2.8rem;
    color: #8f9bba;
}

.details-wrapper {
    margin-top: 14px;
}

.details-wrapper h4 {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
    color: #1b254b;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meta-info {
    margin: 0 0 12px 0;
    font-size: 0.8rem;
    color: #707ebe;
}

.tags-row {
    display: flex;
    gap: 8px;
}

.tag-kat, 
.tag-rak {
    font-size: 0.73rem;
    padding: 4px 10px;
    border-radius: 6px;
    background: #f4f7fe;
    color: #4318ff;
    font-weight: 600;
}

/* ==========================================================================
   5. TABEL KONTEN
   ========================================================================== */
.content-card,
.table-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    padding: 24px;
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th {
    background-color: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    padding: 14px 18px;
    border-bottom: 1px solid #e2e8f0;
}

.data-table td {
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    color: #334155;
}

.data-table tr:hover {
    background-color: var(--primary-light);
}

.empty-row {
    text-align: center;
    padding: 30px !important;
    color: #94a3b8;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.badge-success { background-color: #dcfce7; color: #15803d; }
.badge-warning { background-color: #fef3c7; color: #b45309; }

.badge-role-siswa {
    background-color: #e0e7ff;
    color: #4318ff;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.btn-action {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    font-size: 12px;
    border: none;
    outline: none;
    padding: 0;
    cursor: pointer;
    transition: filter 0.2s;
}

.btn-action:hover { filter: brightness(1.08); }
.btn-action:focus-visible { box-shadow: 0 0 0 2px rgba(67, 24, 255, 0.35); }

.btn-view { background-color: #3b82f6; }
.btn-edit { background-color: #f59e0b; }
.btn-delete { background-color: #ef4444; }

.table-footer {
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #64748b;
}

.pagination {
    display: flex;
    gap: 4px;
}

.page-btn {
    min-width: 30px;
    height: 30px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    color: #475569;
}

.page-btn.active {
    background-color: #5b46e5;
    color: #ffffff;
    border-color: #5b46e5;
}

/* ==========================================================================
   6. FORM & HALAMAN KATEGORI / USER
   ========================================================================== */
.kategori-body {
    background-color: #f1f5f9;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    min-height: 100vh;
}

.category-card {
    background: #ffffff;
    width: 100%;
    max-width: 820px;
    padding: 32px;
    border-radius: 18px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.category-header {
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid #f1f5f9;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.back-btn:hover {
    color: #2563eb;
    transform: translateX(-3px);
}

.header-title h2 {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-title h2 i {
    color: #2563eb;
}

.header-title p {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
}

.category-form {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
}

.input-wrapper {
    position: relative;
    flex: 1;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 15px;
}

.category-form input {
    width: 100%;
    height: 48px;
    padding: 0 16px 0 44px;
    background-color: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    color: #1e293b;
    outline: none;
    transition: all 0.2s ease;
}

.category-form input:focus {
    background-color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.btn-add {
    height: 48px;
    padding: 0 22px;
    background-color: #2563eb;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-add:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.table-responsive {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.category-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.category-table th {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 18px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.category-table td {
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    color: #334155;
    vertical-align: middle;
}

.category-table tr:last-child td {
    border-bottom: none;
}

.category-table tr:hover {
    background-color: #f8fafc;
}

.col-id {
    font-weight: 600;
    color: #94a3b8;
    font-size: 13px;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #eff6ff;
    color: #1d4ed8;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
}

.empty-state {
    text-align: center;
    padding: 40px !important;
    color: #94a3b8;
}

.empty-state i {
    font-size: 32px;
    margin-bottom: 8px;
}

/* Card Form Tambah Komik/User */
.form-container-card,
.user-form-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px 32px;
    border: 1px solid #e2e8f0;
    max-width: 900px;
    margin: 24px auto 0 auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.form-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.back-link-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s;
}

.back-link-btn:hover { background: #e2e8f0; }

.form-header h2,
.user-form-content .form-title h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.user-form-content .form-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: #2b3674;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group input[type="search"],
.form-group select {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    font-size: 13px;
    color: #1e293b;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #4318ff;
}

.cover-upload-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fafafa;
}

.cover-preview-box {
    width: 80px;
    height: 105px;
    background: #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 24px;
    flex-shrink: 0;
}

.cover-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.btn-select-file {
    background: #e0e7ff;
    color: #4338ca;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-select-file:hover { background: #c7d2fe; }

.file-note {
    font-size: 11px;
    color: #94a3b8;
}

.form-footer-actions,
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
}

.btn-cancel {
    height: 42px;
    background: #f4f7fe;
    color: #2b3674;
    border: 1px solid #e2e8f0;
    padding: 0 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.2s;
}

.btn-cancel:hover { background: #e2e8f0; }

.btn-save {
    height: 42px;
    background: #4318ff;
    color: #ffffff;
    border: none;
    padding: 0 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(67, 24, 255, 0.25);
    transition: background 0.2s;
}

.btn-save:hover { background: #3311db; }

/* ==========================================================================
   7. MODAL COMPONENT
   ========================================================================== */
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    display: none;
    justify-content: center !important;
    align-items: center !important;
    z-index: 999999 !important;
}

.modal-box {
    background: #ffffff !important;
    width: 90% !important;
    max-width: 480px !important;
    padding: 24px !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2) !important;
    position: relative !important;
    margin: auto !important;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
}

.close-btn {
    font-size: 24px;
    cursor: pointer;
    color: #64748b;
}

.close-btn:hover {
    color: #ef4444;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.modal-box-sm {
    max-width: 400px !important;
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.modal-header h3 i {
    color: #ef4444;
}

.confirm-text {
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
    margin: 0;
}

.btn-danger {
    height: 42px;
    background: #ef4444;
    color: #ffffff;
    border: none;
    padding: 0 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
    transition: background 0.2s;
}

.btn-danger:hover {
    background: #dc2626;
}

/* ==========================================================================
   8. RESPONSIVE DESIGN & PRINT
   ========================================================================== */
@media (max-width: 768px) {
    .login-illustration-area { display: none; }
    .login-card { max-width: 420px; }
    .login-form-area { padding: 32px 24px; }

    .sidebar { width: 70px; }
    .sidebar-header h3,
    .brand-text,
    .sidebar-menu span,
    .logout-btn span,
    .btn-logout span,
    .btn-logout-sidebar span { display: none; }

    .main-content {
        margin-left: 70px;
        padding: 20px;
    }

    .stats-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
}

@media print {
    .sidebar,
    .action-bar,
    .no-print {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    body { background-color: #ffffff !important; }
}

/* ==========================================================================
   9. HALAMAN PENGATURAN SISTEM
   ========================================================================== */
.settings-title-area {
    margin-bottom: 24px;
}

.settings-title-area h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px 0;
}

.settings-title-area p {
    color: #64748b;
    font-size: 13px;
    margin: 0;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    align-items: start;
}

.settings-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

/* Tabs Navigation */
.settings-tabs {
    display: flex;
    gap: 28px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 4px 14px 4px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.tab-btn.active {
    color: #4318ff;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2.5px;
    background-color: #4318ff;
    border-radius: 4px 4px 0 0;
}

/* Form Layout Left Side */
.profile-settings-layout {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 24px;
}

.logo-side {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-side label {
    font-size: 12px;
    font-weight: 600;
    color: #2b3674;
    align-self: flex-start;
    margin-bottom: 8px;
}

.logo-preview-box {
    width: 100%;
    height: 190px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    margin-bottom: 8px;
}

.logo-preview-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Sidebar Column Right Side */
.settings-sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.card-subtitle {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table td {
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    color: #64748b;
}

.info-table tr:last-child td {
    border-bottom: none;
}

.info-table td.text-right {
    text-align: right;
    font-weight: 600;
    color: #1e293b;
}

/* Password Form Fields */
.input-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-password-wrapper input {
    width: 100%;
    height: 42px;
    padding: 0 36px 0 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
}

.input-password-wrapper input:focus {
    border-color: #4318ff;
}

.toggle-pass {
    position: absolute;
    right: 12px;
    color: #94a3b8;
    cursor: pointer;
    font-size: 14px;
}

.btn-submit-purple {
    width: 100%;
    height: 44px;
    background-color: #4b12ff;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 10px;
    box-shadow: 0 4px 14px rgba(75, 18, 255, 0.3);
    transition: background-color 0.2s ease;
}

.btn-submit-purple:hover {
    background-color: #3b0ce0;
}

@media (max-width: 1024px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
    .profile-settings-layout {
        grid-template-columns: 1fr;
    }
}
.table-thumb {
    width: 42px;
    height: 58px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    display: block;
}

.table-thumb.no-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    font-size: 1rem;
    color: #94a3b8;
}

/* ==========================================================================
   Tambahan: badge stok, filter, form inline, error page
   ========================================================================== */

.badge-danger { background-color: #fee2e2; color: #b91c1c; }

.text-danger { color: #dc2626; }
.text-muted { color: #94a3b8; }
.text-bold { font-weight: 600; }

.mini-tag {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
}

.card-note {
    margin: 8px 0 0;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.4;
}

.stok-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    backdrop-filter: blur(4px);
}

.stok-ada { background: rgba(220, 252, 231, 0.95); color: #15803d; }
.stok-kosong { background: rgba(254, 226, 226, 0.95); color: #b91c1c; }

.cover-wrapper { position: relative; }

.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.filter-tabs a {
    padding: 8px 16px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.filter-tabs a:hover { border-color: #cbd5e1; }

.filter-tabs a.active {
    background: #4318ff;
    border-color: #4318ff;
    color: #ffffff;
}

.inline-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.inline-label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
    margin: 0;
}

.input-compact {
    height: 42px;
    padding: 0 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    color: #1e293b;
    background: #fff;
    outline: none;
}

.input-compact:focus { border-color: #4318ff; }

.page-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
}

.page-alert-success { background: #dcfce7; color: #166534; }
.page-alert-danger { background: #fee2e2; color: #991b1b; }

.checkbox-list {
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 6px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 13px;
    color: #1e293b;
    cursor: pointer;
}

.checkbox-item:hover { background: #f8fafc; }

.checkbox-item input { width: 16px; height: 16px; accent-color: #4318ff; cursor: pointer; }

.checkbox-item span { flex: 1; }

.checkbox-item small { color: #94a3b8; font-size: 11px; font-weight: 600; }

.checkbox-item.disabled { opacity: 0.45; cursor: not-allowed; }

.logout-btn {
    width: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    text-align: left;
}

.error-body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f7fe;
    font-family: 'Inter', system-ui, sans-serif;
    padding: 24px;
}

.error-card {
    max-width: 440px;
    width: 100%;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
    padding: 38px 32px;
    text-align: center;
}

.error-card .error-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #fee2e2;
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.error-card h2 {
    margin: 0 0 10px;
    font-size: 20px;
    color: #1e293b;
}

.error-card p {
    margin: 0 0 22px;
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
}

.error-card .btn-save { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; }

.icon-red { background: #fee2e2; color: #dc2626; }
.icon-cyan { background: #cffafe; color: #0e7490; }
.icon-rose { background: #ffe4e6; color: #be123c; }
.icon-blue { background: #dbeafe; color: #1d4ed8; }
.icon-green { background: #dcfce7; color: #15803d; }
.icon-orange { background: #ffedd5; color: #c2410c; }
.icon-purple { background: #ede9fe; color: #6d28d9; }
.icon-teal { background: #ccfbf1; color: #0f766e; }
.icon-indigo { background: #e0e7ff; color: #4338ca; }
.icon-lime { background: #ecfccb; color: #4d7c0f; }
.icon-amber { background: #fef3c7; color: #b45309; }

.action-bar input:not([type="hidden"]), .action-bar select {
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font: inherit;
    background: #fff;
}

@media print {
    .sidebar, .content-header, .action-bar, .filter-tabs, .no-print { display: none !important; }
    .main-content { margin-left: 0 !important; width: 100% !important; padding: 0 !important; }
    .table-card { box-shadow: none !important; }
}

