/* =====================================================
   Simpeg Smensa - Mobile First Responsive CSS
   ===================================================== */

:root {
    --primary: #1a56db;
    --primary-dark: #1e429f;
    --secondary: #0e9f6e;
    --danger: #e02424;
    --warning: #c27803;
    --light: #f3f4f6;
    --dark: #111827;
    --gray: #6b7280;
    --border: #e5e7eb;
    --sidebar-width: 260px;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #f9fafb;
    color: var(--dark);
    line-height: 1.5;
    min-height: 100vh;
}

/* ========== Login Page ========== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #0f172a 0%, #1e3a8a 45%, #0e7490 100%);
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

.login-bg-shapes .shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.35;
    pointer-events: none;
}
.login-bg-shapes .shape-1 {
    width: 320px; height: 320px;
    background: #3b82f6;
    top: -80px; left: -60px;
}
.login-bg-shapes .shape-2 {
    width: 280px; height: 280px;
    background: #06b6d4;
    bottom: -60px; right: -40px;
}
.login-bg-shapes .shape-3 {
    width: 180px; height: 180px;
    background: #8b5cf6;
    top: 40%; left: 55%;
}

.login-wrapper {
    width: 100%;
    max-width: 520px;
    position: relative;
    z-index: 2;
    margin: 0 auto;
}

.login-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.login-brand {
    text-align: center;
    padding: 1.75rem 1.5rem 0.5rem;
}

.login-logo-wrap {
    width: 110px;
    height: 110px;
    margin: 0 auto 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-logo {
    max-width: 110px;
    max-height: 110px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.12));
}

.login-title {
    font-size: 1.55rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.2rem;
    letter-spacing: -0.02em;
}

.login-subtitle {
    font-size: 0.95rem;
    color: #1e40af;
    font-weight: 600;
    margin: 0 0 0.15rem;
}

.login-school {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0 0 0.5rem;
}

.login-body {
    padding: 1rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-form {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.login-form .form-group {
    margin-bottom: 1.15rem;
    width: 100%;
    text-align: left;
}

.login-form .form-group label {
    display: block;
    width: 100%;
}

.login-form .form-control,
.login-form .input-with-icon {
    width: 100%;
    min-height: 48px;
    font-size: 1rem;
}

.input-icon {
    position: relative;
    width: 100%;
}

.input-icon-left {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    opacity: 0.7;
    pointer-events: none;
}

.input-with-icon {
    padding-left: 2.6rem !important;
    padding-right: 1rem !important;
}

.btn-login {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.9rem 1.25rem;
    font-size: 1.05rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #1d4ed8, #0e7490);
    border: none;
    box-shadow: 0 8px 20px rgba(29, 78, 216, 0.35);
}

.btn-login:hover {
    background: linear-gradient(135deg, #1e40af, #0f766e);
    transform: translateY(-1px);
}

.login-hint {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.5;
    width: 100%;
    max-width: 420px;
}

.login-footer {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.75);
}

/* ========== Layout App ========== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: #1e293b;
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
}

.sidebar-header small {
    font-size: 0.75rem;
    opacity: 0.7;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.25rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.sidebar-menu a.active {
    border-left: 3px solid var(--primary);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.sidebar-overlay.show {
    display: block;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
    padding: 0.25rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.user-info .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.content-area {
    padding: 1.25rem;
    flex: 1;
}

.page-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--dark);
}

/* Cards */
.card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 1.25rem;
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.card-body {
    padding: 1.25rem;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-icon.blue { background: #dbeafe; color: #1d4ed8; }
.stat-icon.green { background: #d1fae5; color: #047857; }
.stat-icon.orange { background: #ffedd5; color: #c2410c; }
.stat-icon.red { background: #fee2e2; color: #b91c1c; }

.stat-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-info p {
    font-size: 0.85rem;
    color: var(--gray);
}

/* Table */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--gray);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

tr:hover {
    background: #f9fafb;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #ffedd5;
    color: #9a3412;
}

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

.badge-primary {
    background: #dbeafe;
    color: #1e40af;
}

/* Form inside card */
.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

/* File list */
.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
    gap: 0.75rem;
}

.file-item:last-child {
    border-bottom: none;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.file-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #eff6ff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.file-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    font-size: 0.8rem;
    color: var(--gray);
}

.file-actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

/* Progress bar */
.progress-bar-wrapper {
    background: #e5e7eb;
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
    margin-top: 0.4rem;
}

.progress-bar {
    height: 100%;
    background: var(--secondary);
    border-radius: 999px;
    transition: width 0.3s;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--gray);
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

/* Modal simple */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-backdrop.show {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.1rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
}

.modal-body {
    padding: 1.25rem;
}

.modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* ========== Desktop ========== */
@media (min-width: 768px) {
    .sidebar {
        transform: translateX(0);
    }

    .main-content {
        margin-left: var(--sidebar-width);
    }

    .menu-toggle {
        display: none;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (min-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .content-area {
        padding: 1.5rem 2rem;
    }
}

/* Utility */
.text-muted { color: var(--gray); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
.d-flex { display: flex; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }
.w-100 { width: 100%; }

/* ========== Profile Card ========== */
.profile-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.profile-card-main {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.profile-photo {
    width: 72px;
    height: 96px; /* rasio foto 3x4 */
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #e5e7eb;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #0e9f6e);
}

.profile-info {
    flex: 1;
    min-width: 200px;
}

.profile-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.profile-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

/* Tombol edit profil di kartu siswa — selalu menonjol */
.profile-edit-btn {
    flex-shrink: 0;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.profile-tag {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.profile-tag.tag-status {
    background: #dbeafe;
    color: #1e40af;
    border-color: #bfdbfe;
}

.profile-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
}

@media (min-width: 640px) {
    .profile-stats {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 900px) {
    .profile-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

.profile-stat {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1.5px dashed #e5e7eb;
    background: #fafafa;
}

.profile-stat-icon {
    font-size: 1.1rem;
    line-height: 1.4;
}

.profile-stat-value {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--dark);
    word-break: break-word;
}

.profile-stat-label {
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 0.1rem;
}

@media (min-width: 640px) {
    .profile-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .profile-photo {
        width: 90px;
        height: 120px; /* rasio foto 3x4 */
    }
    .profile-name {
        font-size: 1.4rem;
    }
}

/* ========== Profile & Form tidy ========== */
.profile-form-card .card-body {
    padding: 1.35rem 1.5rem 1.5rem;
}

.profile-form .form-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.profile-form .form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0.5rem;
}

.form-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e40af;
    margin: 0 0 1rem;
    letter-spacing: 0.01em;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem 1.25rem;
}

@media (min-width: 640px) {
    .form-grid-2 {
        grid-template-columns: 1fr 1fr;
    }
}

.profile-form .form-group {
    margin-bottom: 0;
}

.profile-form .form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
}

.profile-form .form-control {
    width: 100%;
    min-height: 44px;
    font-size: 0.95rem;
    padding: 0.65rem 0.9rem;
    border-radius: 8px;
    border: 1.5px solid #e5e7eb;
    font-family: inherit;
    color: #111827;
    background: #fff;
}

.profile-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
    outline: none;
}

.profile-form .form-control:disabled {
    background: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
}

.profile-form select.form-control {
    appearance: auto;
    cursor: pointer;
}

.req {
    color: #dc2626;
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.65rem;
    font-size: 0.875rem;
    color: #4b5563;
    cursor: pointer;
    font-weight: 500;
}

.profile-form .form-actions {
    margin-top: 1.25rem;
    padding-top: 0.5rem;
}

/* Profile photo 3x4 display */
.profile-photo {
    width: 72px !important;
    height: 96px !important;
    border-radius: 8px !important;
    overflow: hidden;
    flex-shrink: 0;
    background: #e5e7eb;
    border: 1px solid #e5e7eb;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #0e9f6e);
}

@media (min-width: 768px) {
    .profile-photo {
        width: 90px !important;
        height: 120px !important;
    }
}

.profile-name {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
}

.profile-stat-value {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.35;
}

.profile-stat-label {
    font-size: 0.72rem;
    color: var(--gray);
}

/* ========== Global form & typography tidy (user pages) ========== */
.content-area .page-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1.15rem;
    letter-spacing: -0.01em;
}

.content-area .card-header {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}

.content-area .form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
    display: block;
}

.content-area .form-control {
    font-family: inherit;
    font-size: 0.95rem;
    color: #111827;
    min-height: 44px;
    padding: 0.65rem 0.9rem;
    border-radius: 8px;
    border: 1.5px solid #e5e7eb;
    width: 100%;
}

.content-area .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
    outline: none;
}

.content-area select.form-control {
    cursor: pointer;
}

.content-area table {
    font-size: 0.9rem;
}

.content-area table th {
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: none;
    color: #475569;
}

.content-area .file-name {
    font-weight: 600;
    font-size: 0.92rem;
}

.content-area .file-meta {
    font-size: 0.78rem;
    color: var(--gray);
}

/* =====================================================
   Button System — bold, colorful (user + admin)
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1.15rem;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    line-height: 1.25;
    text-decoration: none;
    text-align: center;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease, border-color 0.15s ease;
    white-space: nowrap;
    user-select: none;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.1);
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Primary — biru */
.btn-primary {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    color: #fff !important;
    border-color: #1d4ed8;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
    border-color: #1e3a8a;
    color: #fff !important;
}

/* Success — hijau */
.btn-success {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    color: #fff !important;
    border-color: #047857;
}
.btn-success:hover {
    background: linear-gradient(135deg, #065f46 0%, #047857 100%);
    border-color: #064e3b;
    color: #fff !important;
}

/* Danger — merah */
.btn-danger {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
    color: #fff !important;
    border-color: #b91c1c;
}
.btn-danger:hover {
    background: linear-gradient(135deg, #991b1b 0%, #b91c1c 100%);
    border-color: #7f1d1d;
    color: #fff !important;
}

/* Warning — oranye */
.btn-warning {
    background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%);
    color: #fff !important;
    border-color: #c2410c;
}
.btn-warning:hover {
    background: linear-gradient(135deg, #9a3412 0%, #c2410c 100%);
    border-color: #7c2d12;
    color: #fff !important;
}

/* Info — cyan */
.btn-info {
    background: linear-gradient(135deg, #0e7490 0%, #0891b2 100%);
    color: #fff !important;
    border-color: #0e7490;
}
.btn-info:hover {
    background: linear-gradient(135deg, #155e75 0%, #0e7490 100%);
    border-color: #164e63;
    color: #fff !important;
}

/* Outline — netral tebal */
.btn-outline {
    background: #fff;
    color: #1e40af !important;
    border-color: #93c5fd;
    font-weight: 700;
}
.btn-outline:hover {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1e3a8a !important;
}

/* Outline danger */
.btn-outline.btn-danger,
a.btn-outline.btn-danger {
    color: #b91c1c !important;
    border-color: #fca5a5;
    background: #fff;
}
.btn-outline.btn-danger:hover {
    background: #fef2f2;
    border-color: #ef4444;
    color: #991b1b !important;
}

/* Small */
.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 8px;
    font-weight: 700;
}

/* Block full width */
.btn-block {
    display: flex;
    width: 100%;
}

/* Button groups in tables / file actions */
.file-actions .btn,
td .btn,
.form-actions .btn {
    font-weight: 700;
}

td .btn-sm,
.file-actions .btn-sm {
    min-height: 32px;
}

/* Login button override */
.btn-login {
    font-weight: 800 !important;
    letter-spacing: 0.02em;
}

/* ========== Colored table columns (header) ========== */
.content-area table thead th,
table thead th {
    background: linear-gradient(180deg, #dbeafe 0%, #eff6ff 100%) !important;
    color: #1e3a8a !important;
    font-weight: 800 !important;
    font-size: 0.8rem !important;
    text-transform: none !important;
    letter-spacing: 0.01em;
    border-bottom: 2px solid #93c5fd !important;
}

.content-area table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.content-area table tbody tr:hover {
    background: #eff6ff !important;
}

/* Sidebar menu bold active */
.sidebar-menu a {
    font-weight: 600;
}
.sidebar-menu a.active {
    font-weight: 800;
    background: rgba(37, 99, 235, 0.25);
}

/* =====================================================
   Dynamic UI — animations & menu icons
   ===================================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes softPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}
@keyframes iconPop {
    0% { transform: scale(0.85); }
    60% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

.animate-fade-in {
    animation: fadeIn 0.45s ease both;
}
.animate-slide-up {
    animation: slideUp 0.5s ease both;
}
.animate-slide-up-delay-1 { animation: slideUp 0.5s ease 0.08s both; }
.animate-slide-up-delay-2 { animation: slideUp 0.5s ease 0.16s both; }
.animate-slide-up-delay-3 { animation: slideUp 0.5s ease 0.24s both; }

/* Content cards gentle entrance */
.content-area > .card,
.content-area > .profile-card,
.content-area > .stats-grid {
    animation: slideUp 0.5s ease both;
}

.content-area > .card:nth-child(2),
.content-area > .profile-form-card {
    animation-delay: 0.08s;
}
.content-area > .card:nth-child(3) {
    animation-delay: 0.14s;
}

/* Sidebar header with brand icon */
.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.sidebar-brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
    animation: softPulse 2.8s ease-in-out infinite;
}

/* Menu icons — dynamic colored boxes */
.sidebar-menu a {
    gap: 0.85rem;
    border-left: 3px solid transparent;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.sidebar-menu a:hover {
    transform: translateX(3px);
}
.menu-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: rgba(255,255,255,0.08);
}
.sidebar-menu a:hover .menu-icon,
.sidebar-menu a.active .menu-icon {
    transform: scale(1.08);
    animation: iconPop 0.35s ease;
}
.mi-dashboard { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.mi-profil, .mi-users { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.mi-dokumen, .mi-jenis { background: linear-gradient(135deg, #f59e0b, #d97706); }
.mi-password { background: linear-gradient(135deg, #10b981, #047857); }
.mi-laporan { background: linear-gradient(135deg, #06b6d4, #0e7490); }
.mi-brand { background: linear-gradient(135deg, #ec4899, #be185d); }
.mi-logout { background: linear-gradient(135deg, #ef4444, #b91c1c); }

.menu-text {
    font-weight: 600;
}
.sidebar-menu a.active .menu-text {
    font-weight: 800;
}
.menu-logout {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Stat cards hover */
.stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
}

/* Profile form — wider, more dynamic */
.profile-form-card .card-header {
    background: linear-gradient(135deg, #eff6ff, #f0fdfa);
    border-bottom: 1px solid #dbeafe;
    font-size: 1.05rem;
    font-weight: 800;
    color: #1e3a8a;
    letter-spacing: 0.01em;
}

.form-section-title {
    font-size: 1rem !important;
    font-weight: 800 !important;
    color: #1d4ed8 !important;
    margin: 0 0 1.15rem !important;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #dbeafe;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-grid-2 {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.15rem 1.5rem !important;
    align-items: start;
}

@media (min-width: 640px) {
    .form-grid-2 {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* Satu kolom penuh di dalam grid 2 */
.form-grid-2 .form-group.full-width {
    grid-column: 1 / -1;
}

.profile-form .form-control {
    min-height: 48px !important;
    font-size: 1rem !important;
    padding: 0.75rem 1rem !important;
    box-sizing: border-box;
}

.profile-form .form-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.profile-form .form-group label {
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin-bottom: 0.5rem !important;
}

.profile-form-card {
    max-width: 920px;
}

.profile-form .form-section {
    margin-bottom: 1.75rem;
    padding-bottom: 1.35rem;
}

.profile-form .form-actions {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
}

/* Alert animation */
.alert {
    animation: slideUp 0.35s ease both;
}

/* Button slight bounce on hover already exists; enhance */
.btn {
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease !important;
}
.btn:hover {
    transform: translateY(-2px) !important;
}

/* Page title accent */
.page-title {
    position: relative;
    padding-left: 0.85rem;
}
.page-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.15em;
    bottom: 0.15em;
    width: 4px;
    border-radius: 4px;
    background: linear-gradient(180deg, #3b82f6, #06b6d4);
}
