/* =========================================
   HALAMAN ADMIN - MAHIR AKUNTANSI ACADEMY
   ========================================= */
body {
    background-color: #f3f4f6;
}

.admin-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* --- SIDEBAR ADMIN --- */
.admin-sidebar {
    width: 260px;
    background-color: var(--primary-blue);
    color: white;
    padding: 24px 0;
    flex-shrink: 0;
    overflow-y: auto;
}

.admin-brand {
    padding: 0 24px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 24px;
}

.admin-brand h2 {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    line-height: 1.4;
    margin: 0;
    white-space: normal;
}

.admin-brand span {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: #93c5fd;
}

.admin-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: #d1d5db;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    gap: 12px;
    transition: all 0.2s;
}

.admin-menu li a:hover, 
.admin-menu li a.active {
    background-color: rgba(255,255,255,0.1);
    color: white;
    border-left: 4px solid var(--light-blue);
}

/* --- MAIN CONTENT --- */
.admin-content {
    flex-grow: 1;
    padding: 32px 40px;
    background-color: #f8fafc;
    overflow-y: auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.admin-header h1 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin: 0;
}

/* --- TABLE STYLES --- */
.admin-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background-color: #f9fafb;
    padding: 16px;
    text-align: left;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
}

.admin-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-dark);
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover {
    background-color: #f8fafc;
}

/* --- BUTTONS --- */
.btn-tambah {
    background-color: var(--light-blue);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
}

.btn-tambah:hover {
    background-color: var(--primary-blue);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    border: none;
}

.btn-edit { background-color: #fef3c7; color: #92400e; }
.btn-edit:hover { background-color: #fde68a; }
.btn-delete { background-color: #fee2e2; color: #991b1b; }
.btn-delete:hover { background-color: #fecaca; }

/* --- FORMS --- */
.form-section-title {
    font-size: 1.1rem;
    color: var(--primary-blue);
    margin: 24px 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--light-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Badge Status */
.badge {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
}
.badge-active { background: #d1fae5; color: #065f46; }

/* =========================================
   TOAST POP-UP NOTIFICATION (ANIMASI)
   ========================================= */
#toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}
.toast-popup {
    background: white;
    border-left: 5px solid #10b981;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.15);
    padding: 16px 24px;
    border-radius: 8px;
    font-weight: 700;
    color: #1f2937;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, toastFadeOut 0.4s ease 2.5s forwards;
    opacity: 0;
    transform: translateX(100%);
}
.toast-popup.error {
    border-left-color: #ef4444;
}
@keyframes toastSlideIn {
    to { opacity: 1; transform: translateX(0); }
}
@keyframes toastFadeOut {
    to { opacity: 0; transform: translateY(-20px); }
}

/* =========================================
   DASHBOARD STATS & DYNAMIC ROWS (RESTORATION)
   ========================================= */
.dashboard-stats { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
    gap: 24px; 
    margin-bottom: 32px; 
}
.stat-card { 
    background: #ffffff; 
    border-radius: 16px; 
    padding: 24px; 
    display: flex; 
    align-items: center; 
    gap: 20px; 
    border: 1px solid #e5e7eb; 
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); 
    transition: all 0.3s ease; 
}
.stat-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 12px 20px -3px rgba(0,0,0,0.1); 
    border-color: #bfdbfe; 
}
.stat-icon { 
    width: 64px; 
    height: 64px; 
    border-radius: 16px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    flex-shrink: 0; 
}
.stat-icon svg { 
    width: 32px; 
    height: 32px; 
}
.stat-details { 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
}
.stat-details h3 { 
    margin: 0 0 6px 0; 
    font-size: 0.8rem; 
    color: #6b7280; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    font-weight: 700; 
}
.stat-details p { 
    margin: 0; 
    font-size: 1.8rem; 
    font-weight: 800; 
    color: #111827; 
    line-height: 1; 
}
.dashboard-grid { 
    display: grid; 
    grid-template-columns: 1.5fr 1fr; 
    gap: 24px; 
    align-items: start; 
}
@media (max-width: 1000px) { 
    .dashboard-grid { grid-template-columns: 1fr; } 
}

/* Row Dinamis Kelola Kelas */
.dynamic-row { 
    background: #f9fafb; 
    padding: 16px; 
    border-radius: 8px; 
    margin-bottom: 12px; 
    position: relative; 
    border: 1px solid #e5e7eb; 
}
.btn-remove-row { 
    position: absolute; 
    right: 16px; 
    top: 16px; 
    background: #fee2e2; 
    color: #991b1b; 
    border: none; 
    padding: 4px 10px; 
    border-radius: 4px; 
    cursor: pointer; 
    font-size: 0.8rem; 
    font-weight: bold; 
}
.btn-add-row { 
    background: transparent; 
    color: #3b82f6; 
    border: 2px dashed #3b82f6; 
    padding: 10px 16px; 
    border-radius: 8px; 
    cursor: pointer; 
    font-weight: bold; 
    width: 100%; 
    text-align: center; 
    margin-bottom: 24px; 
    transition: 0.2s; 
}
.btn-add-row:hover { 
    background: #eff6ff; 
}

/* Info Box & CKEditor */
.img-info-box { 
    background: #ecfdf5; 
    border: 1px solid #a7f3d0; 
    padding: 12px; 
    border-radius: 6px; 
    margin-top: 10px; 
    display: none; 
}
.img-info-box span { 
    color: #047857; 
    font-weight: 600; 
    font-size: 0.85rem; 
}
.ck-editor__editable_inline { 
    min-height: 200px; 
}
.ck-content ul { 
    list-style-type: disc !important; 
    padding-left: 30px !important; 
    margin-bottom: 15px !important; 
}
.ck-content ol { 
    list-style-type: decimal !important; 
    padding-left: 30px !important; 
    margin-bottom: 15px !important; 
}
.ck-content li { 
    display: list-item !important; 
    margin-bottom: 5px; 
}
.card-trxaktif-item {
    animation: fadeIn 0.3s ease-in-out;
}
.card-trxaktif-item tbody tr:hover {
    background-color: #f8fafc;
    transition: background-color 0.2s;
}