/* ============================================
   🏆 PERBATI SUMSEL — Admin Dashboard Stylesheet
   Premium Silicon Valley Standards v2026
   ============================================ */

/* ---------- Core Admin Shell Layout ---------- */
.admin-body {
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---------- Login Panel ---------- */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(30, 30, 30, 0.4) 0%, rgba(10, 10, 10, 0.8) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity var(--duration-base) var(--ease-out);
}

.login-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-xl);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    width: 100%;
    max-width: 440px;
    text-align: center;
    backdrop-filter: var(--glass-blur) var(--glass-saturate);
    -webkit-backdrop-filter: var(--glass-blur) var(--glass-saturate);
    animation: loginReveal 0.6s var(--ease-spring);
}

@keyframes loginReveal {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.login-logo {
    width: 80px;
    height: 80px;
    margin-bottom: var(--space-4);
}

.login-card h2 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.login-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--space-5);
}

.form-group {
    text-align: left;
    margin-bottom: var(--space-4);
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all var(--duration-fast) var(--ease-out);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ---------- Admin Layout Shell ---------- */
.admin-container {
    display: flex;
    flex-grow: 1;
    min-height: calc(100vh - 70px); /* header height */
    padding-top: 70px;
}

/* Sidebar Navigation */
.admin-sidebar {
    width: 260px;
    background: var(--bg-elevated);
    border-right: 1px solid var(--border);
    padding: var(--space-5) var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    position: fixed;
    top: 70px;
    left: 0;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: all var(--duration-fast) var(--ease-out);
}

.nav-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.nav-item:hover {
    color: var(--primary);
    background: var(--surface);
}

.nav-item.active {
    color: var(--text-inverse);
    background: var(--primary);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

/* Main Dashboard Panel */
.admin-main {
    flex-grow: 1;
    margin-left: 260px;
    padding: var(--space-6);
    background: var(--bg);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.dashboard-title h2 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 2rem;
    color: var(--text-primary);
}

.dashboard-title p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ---------- Dashboard Widgets (Stats) ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-5);
    margin-bottom: var(--space-7);
}

.stat-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    box-shadow: var(--shadow-sm);
    transition: transform var(--duration-fast) var(--ease-out),
                box-shadow var(--duration-fast) var(--ease-out);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.red {
    background: hsla(348, 83%, 47%, 0.1);
    color: var(--primary);
}

.stat-icon.blue {
    background: hsla(210, 100%, 50%, 0.1);
    color: var(--info);
}

.stat-icon.green {
    background: hsla(145, 63%, 42%, 0.1);
    color: var(--success);
}

.stat-icon.gold {
    background: hsla(45, 100%, 51%, 0.1);
    color: var(--accent);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.85rem;
    line-height: 1.1;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ---------- Action Bar ---------- */
.action-bar {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
    box-shadow: var(--shadow-sm);
}

.search-filter-group {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-grow: 1;
    max-width: 600px;
    width: 100%;
}

.search-input-wrapper {
    position: relative;
    flex-grow: 1;
}

.search-input-wrapper i {
    position: absolute;
    left: var(--space-3);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-input-wrapper input {
    padding-left: var(--space-6);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-body);
    font-weight: 600;
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    border: none;
    font-size: 0.9rem;
    transition: all var(--duration-fast) var(--ease-out);
}

.btn-primary {
    background: var(--primary);
    color: var(--text-inverse);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-light);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-danger {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-danger:hover {
    background: var(--primary);
    color: var(--text-inverse);
}

/* ---------- Data Table ---------- */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.admin-table th {
    background: var(--surface);
    color: var(--text-primary);
    font-weight: 600;
    padding: var(--space-4);
    border-bottom: 2px solid var(--border);
}

.admin-table td {
    padding: var(--space-4);
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: var(--surface);
    color: var(--text-primary);
}

.row-actions {
    display: flex;
    gap: var(--space-2);
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--duration-fast);
}

.btn-icon:hover {
    background: var(--primary);
    color: var(--text-inverse);
    border-color: var(--primary);
}

.btn-icon.delete:hover {
    background: hsl(348, 83%, 47%);
    color: var(--text-inverse);
    border-color: hsl(348, 83%, 47%);
}

/* Status Badges */
.badge {
    display: inline-flex;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.aktif {
    background: hsla(145, 63%, 42%, 0.12);
    color: var(--success);
}

.badge.pending {
    background: hsla(45, 100%, 51%, 0.12);
    color: var(--accent);
}

.badge.nonaktif {
    background: hsla(220, 10%, 40%, 0.12);
    color: var(--text-muted);
}

/* ---------- Modal Dialog styling ---------- */
dialog {
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow-xl);
    padding: var(--space-6);
    width: 90%;
    max-width: 640px;
    margin: auto;
    color: var(--text-primary);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

dialog::backdrop {
    background-color: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

dialog:not([open]) {
    display: none;
}

dialog .form-group textarea {
    width: 100%;
    min-height: 80px;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
    transition: all var(--duration-fast) var(--ease-out);
}

dialog .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Specific larger textareas */
#newsSnippet, 
#syncNewsModal textarea {
    min-height: 140px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-5);
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.4rem;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: color var(--duration-fast);
}

.modal-close-btn:hover {
    color: var(--primary);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
    margin-top: var(--space-5);
}

/* ---------- Skeleton Loader ---------- */
.skeleton-row td {
    padding: var(--space-4);
}

.skeleton-text {
    height: 16px;
    background: var(--border);
    border-radius: 4px;
    animation: shimmer 1.5s infinite linear;
    background-image: linear-gradient(
        90deg,
        var(--border) 0px,
        var(--surface) 50px,
        var(--border) 100px
    );
    background-size: 200% 100%;
}

@keyframes shimmer {
    0% {
        background-position: -150px 0;
    }
    100% {
        background-position: 150px 0;
    }
}

/* ---------- Toast Notification ---------- */
.toast-container {
    position: fixed;
    bottom: var(--space-5);
    right: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    z-index: 1100;
}

.toast {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-5);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    animation: toastSlideIn 0.3s var(--ease-spring);
    transition: all var(--duration-fast);
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.success i {
    color: var(--success);
}

.toast.error {
    border-left: 4px solid var(--primary);
}

.toast.error i {
    color: var(--primary);
}

@keyframes toastSlideIn {
    from {
        transform: translateY(20px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* ---------- Responsive Breakpoints ---------- */
@media (max-width: 1024px) {
    .admin-sidebar {
        width: 70px;
        padding: var(--space-5) var(--space-2);
        align-items: center;
    }
    .sidebar-nav {
        align-items: center;
    }
    .nav-item {
        justify-content: center;
        padding: var(--space-3);
        border-radius: var(--radius-sm);
    }
    .nav-item span {
        display: none; /* Hide labels on tablet */
    }
    .admin-main {
        margin-left: 70px;
    }
}

@media (max-width: 768px) {
    .admin-container {
        flex-direction: column;
        padding-top: 60px;
    }
    .admin-sidebar {
        position: static;
        width: 100%;
        height: auto;
        flex-direction: row;
        justify-content: space-around;
        padding: var(--space-2) var(--space-4);
        border-right: none;
        border-bottom: 1px solid var(--border);
        gap: 0;
    }
    .sidebar-nav {
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
        gap: 0;
    }
    .admin-main {
        margin-left: 0;
        padding: var(--space-4);
    }
    .action-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .search-filter-group {
        flex-direction: column;
        align-items: stretch;
        max-width: none;
    }
    .btn {
        justify-content: center;
    }
}

/* ============================================
   📖 ATHLETE RECORD BOOK WORKSPACE STYLES
   ============================================ */

.athlete-record-badge-wrapper {
    display: flex;
    align-items: center;
}

.stats-badge {
    background: var(--surface);
    color: var(--primary);
    border: 1px solid var(--border);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 1rem;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
}

/* Inner Navigation Tab Buttons */
.record-tabs-nav {
    display: flex;
    gap: var(--space-2);
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--space-5);
    overflow-x: auto;
    padding-bottom: 2px;
}

.record-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--duration-fast) var(--ease-out);
    white-space: nowrap;
}

.record-tab-btn:hover {
    color: var(--text-primary);
}

.record-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Panel Headers */
.panel-action-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
    gap: var(--space-4);
}

.panel-action-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
}

/* Form Styles for Workspace */
.grid-form {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    max-width: 800px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    margin-bottom: var(--space-3);
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: var(--space-2);
    }
}

/* Badges for Fight Outcomes */
.outcome-badge {
    display: inline-flex;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.outcome-badge.menang {
    background: hsla(145, 63%, 42%, 0.15);
    color: var(--success);
    border: 1px solid hsla(145, 63%, 42%, 0.3);
}

.outcome-badge.kalah {
    background: hsla(348, 83%, 47%, 0.15);
    color: var(--primary);
    border: 1px solid hsla(348, 83%, 47%, 0.3);
}

.outcome-badge.seri {
    background: hsla(0, 0%, 50%, 0.15);
    color: var(--text-secondary);
    border: 1px solid hsla(0, 0%, 50%, 0.3);
}

/* Medical Status Badge */
.med-status-badge {
    display: inline-flex;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
}

.med-status-badge.fit {
    background: hsla(145, 63%, 42%, 0.15);
    color: var(--success);
}

.med-status-badge.unfit {
    background: hsla(35, 100%, 50%, 0.15);
    color: hsl(35, 100%, 45%);
    border: 1px solid hsla(35, 100%, 50%, 0.2);
}

/* Small Buttons */
.btn-sm {
    padding: var(--space-2) var(--space-3);
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

/* Styling alignment for back button and icon spacing */
#backToMembersBtn i {
    margin-right: var(--space-1);
}

/* Custom alignment for record book icon button in row action */
.btn-icon.record-book:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-inverse);
}

/* Wasit / Juri and Sasana Log Book Styles */
.lic-badge {
    display: inline-flex;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.lic-badge.aiba {
    background: hsla(210, 100%, 50%, 0.15);
    color: hsl(210, 100%, 65%);
    border: 1px solid hsla(210, 100%, 50%, 0.3);
}

.lic-badge.nasional {
    background: hsla(145, 63%, 42%, 0.15);
    color: var(--success);
    border: 1px solid hsla(145, 63%, 42%, 0.3);
}

.lic-badge.daerah {
    background: hsla(35, 100%, 50%, 0.15);
    color: hsl(35, 100%, 50%);
    border: 1px solid hsla(35, 100%, 50%, 0.3);
}

/* Specific styling for officiating roles */
.role-badge {
    display: inline-flex;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.role-badge.referee {
    background: hsla(0, 0%, 100%, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.role-badge.judge {
    background: hsla(270, 70%, 50%, 0.15);
    color: hsl(270, 70%, 65%);
    border: 1px solid hsla(270, 70%, 50%, 0.3);
}

/* ============================================
   🪪 MEMBER CARD DIGITAL
   ============================================ */

/* --- Dialog & Wrapper --- */
#memberCardDialog {
    max-width: 560px;
    width: 95vw;
}

.member-card-wrapper {
    padding: var(--space-4);
    display: flex;
    justify-content: center;
    background: var(--surface);
    border-radius: var(--radius-lg);
}

/* --- The Card Itself --- */
.member-card {
    width: 480px;
    height: 302px;
    max-width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, hsl(348, 85%, 22%) 0%, hsl(220, 45%, 10%) 50%, hsl(215, 85%, 20%) 100%);
    color: hsl(0, 0%, 95%);
    box-shadow:
        0 12px 36px hsla(220, 50%, 5%, 0.5),
        0 2px 8px hsla(0, 0%, 0%, 0.3),
        inset 0 1px 0 hsla(0, 0%, 100%, 0.1);
    position: relative;
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.member-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 15%, hsla(348, 85%, 50%, 0.22) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, hsla(215, 85%, 50%, 0.22) 0%, transparent 45%);
    pointer-events: none;
}

/* --- Card Header --- */
.mc-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 8px var(--space-4) 4px;
    border-bottom: 1px solid hsla(0, 0%, 100%, 0.08);
    position: relative;
    z-index: 1;
}

.mc-logo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid hsla(45, 100%, 51%, 0.5);
    object-fit: contain;
    background: hsla(0, 0%, 100%, 0.1);
    padding: 3px;
}

.mc-org {
    display: flex;
    flex-direction: column;
}

.mc-org-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 1.5px;
    color: hsl(45, 100%, 65%);
    text-shadow: 0 0 12px hsla(45, 100%, 51%, 0.3);
}

.mc-org-sub {
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: hsla(0, 0%, 100%, 0.55);
    font-weight: 500;
}

/* --- Card Body --- */
.mc-body {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 12px;
    position: relative;
    z-index: 1;
    flex: 1;
}

.mc-info {
    flex: 1;
    min-width: 0;
}

.mc-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.2;
    margin: 0 0 2px;
    color: hsl(0, 0%, 100%);
    word-break: break-word;
}

.mc-role-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 100px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.mc-role-badge.atlet {
    background: linear-gradient(135deg, hsla(348, 83%, 47%, 0.3), hsla(348, 83%, 47%, 0.15));
    color: hsl(348, 90%, 72%);
    border: 1px solid hsla(348, 83%, 47%, 0.4);
}

.mc-role-badge.wasit {
    background: linear-gradient(135deg, hsla(210, 100%, 50%, 0.3), hsla(210, 100%, 50%, 0.15));
    color: hsl(210, 100%, 72%);
    border: 1px solid hsla(210, 100%, 50%, 0.4);
}

.mc-role-badge.sasana {
    background: linear-gradient(135deg, hsla(145, 63%, 42%, 0.3), hsla(145, 63%, 42%, 0.15));
    color: hsl(145, 63%, 72%);
    border: 1px solid hsla(145, 63%, 42%, 0.4);
}

.mc-role-badge.pengurus {
    background: linear-gradient(135deg, hsla(45, 100%, 51%, 0.3), hsla(45, 100%, 51%, 0.15));
    color: hsl(45, 100%, 72%);
    border: 1px solid hsla(45, 100%, 51%, 0.4);
}

.mc-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 6px;
}

.mc-detail-row {
    display: flex;
    gap: var(--space-2);
    font-size: 0.75rem;
}

.mc-detail-label {
    color: hsla(0, 0%, 100%, 0.45);
    min-width: 70px;
    flex-shrink: 0;
}

.mc-detail-value {
    color: hsla(0, 0%, 100%, 0.85);
    font-weight: 500;
}

.mc-reg {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

.mc-reg-label {
    font-size: 0.6rem;
    letter-spacing: 1px;
    color: hsla(0, 0%, 100%, 0.35);
}

.mc-reg-value {
    font-family: 'Outfit', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: hsl(45, 100%, 65%);
}

/* --- QR Code --- */
.mc-qr {
    flex-shrink: 0;
    width: 75px;
    height: 75px;
    background: hsl(0, 0%, 100%);
    border-radius: 6px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px hsla(0, 0%, 0%, 0.3);
}

.mc-qr img, .mc-qr canvas {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

/* --- Card Footer --- */
.mc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px var(--space-4);
    border-top: 1px solid hsla(0, 0%, 100%, 0.08);
    position: relative;
    z-index: 1;
}

.mc-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.mc-status.aktif {
    background: hsla(145, 63%, 42%, 0.2);
    color: hsl(145, 63%, 65%);
    border: 1px solid hsla(145, 63%, 42%, 0.3);
}

.mc-status.nonaktif {
    background: hsla(0, 70%, 50%, 0.2);
    color: hsl(0, 70%, 65%);
    border: 1px solid hsla(0, 70%, 50%, 0.3);
}

.mc-validity {
    font-size: 0.55rem;
    letter-spacing: 1.5px;
    color: hsla(0, 0%, 100%, 0.3);
    font-weight: 600;
}

/* --- Member Card Button Style --- */
.btn-icon.member-card-btn {
    color: hsl(45, 100%, 51%);
}

.btn-icon.member-card-btn:hover {
    background: hsla(45, 100%, 51%, 0.12);
}

/* --- Print Styles --- */
@media print {
    body * { visibility: hidden; }
    
    /* CARD MODE PRINTING */
    body.print-card-mode > *:not(#memberCardDialog) {
        display: none !important;
    }
    
    body.print-card-mode #memberCardDialog,
    body.print-card-mode #memberCardDialog * {
        visibility: visible;
    }

    body.print-card-mode #memberCardDialog {
        display: block !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        background: white !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    body.print-card-mode .member-card-wrapper {
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        height: 100vh !important;
        background: white !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    body.print-card-mode .member-card {
        width: 480px !important;
        height: 302px !important;
        transform: scale(0.674) !important;
        transform-origin: center center !important;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    body.print-card-mode #memberCardDialog .modal-header,
    body.print-card-mode #memberCardDialog .modal-footer {
        display: none !important;
    }

    /* REPORT MODE PRINTING */
    body.print-report-mode #printRecordBookContainer,
    body.print-report-mode #printRecordBookContainer * {
        visibility: visible;
    }
    body.print-report-mode #printRecordBookContainer {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        color: #000 !important;
        background: #fff !important;
        font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
        padding: 0 15mm;
        box-sizing: border-box;
        display: block !important;
    }

    /* Report Layout Styling */
    .pr-header {
        display: flex;
        align-items: center;
        gap: 20px;
        border-bottom: 3px double #000;
        padding-bottom: 15px;
        margin-bottom: 25px;
    }
    .pr-logo {
        width: 80px;
        height: 80px;
        object-fit: contain;
    }
    .pr-title-area {
        flex: 1;
    }
    .pr-org {
        font-family: 'Outfit', sans-serif;
        font-size: 1.5rem;
        font-weight: 800;
        text-transform: uppercase;
        color: #000;
        letter-spacing: 1px;
        margin: 0;
    }
    .pr-suborg {
        font-size: 0.9rem;
        font-weight: 600;
        text-transform: uppercase;
        color: #555;
        letter-spacing: 2px;
        margin: 2px 0 5px;
    }
    .pr-doc-type {
        font-size: 1.1rem;
        font-weight: 700;
        text-transform: uppercase;
        color: #c8102e;
        letter-spacing: 3px;
        margin: 0;
    }
    .pr-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 25px;
        margin-bottom: 30px;
    }
    .pr-profile-section, .pr-meta-section {
        background: #fcfcfc;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 15px;
    }
    .pr-section-title {
        font-family: 'Outfit', sans-serif;
        font-size: 1.05rem;
        font-weight: 700;
        text-transform: uppercase;
        border-bottom: 2px solid #c8102e;
        padding-bottom: 5px;
        margin: 0 0 12px;
        color: #000;
        letter-spacing: 1px;
    }
    .pr-row {
        display: flex;
        justify-content: space-between;
        padding: 6px 0;
        border-bottom: 1px dashed #eee;
        font-size: 0.85rem;
    }
    .pr-row:last-child {
        border-bottom: none;
    }
    .pr-label {
        color: #666;
        font-weight: 500;
    }
    .pr-value {
        color: #000;
        font-weight: 600;
        text-align: right;
    }
    .pr-table-section {
        margin-bottom: 30px;
        page-break-inside: avoid;
    }
    .pr-table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 10px;
        font-size: 0.8rem;
    }
    .pr-table th {
        background-color: #f5f5f5 !important;
        color: #000 !important;
        font-weight: 700;
        text-transform: uppercase;
        border: 1px solid #ddd;
        padding: 8px 10px;
        text-align: left;
    }
    .pr-table td {
        border: 1px solid #ddd;
        padding: 8px 10px;
        color: #333;
    }
    .pr-table tr:nth-child(even) {
        background-color: #fafafa;
    }
    .pr-signatures {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 50px;
        margin-top: 50px;
        page-break-inside: avoid;
    }
    .pr-sig-box {
        text-align: center;
        font-size: 0.85rem;
    }
    .pr-sig-title {
        margin-bottom: 60px;
        color: #555;
    }
    .pr-sig-name {
        font-weight: 700;
        text-decoration: underline;
        color: #000;
    }
    .pr-sig-post {
        font-size: 0.75rem;
        color: #666;
    }
}

/* ---------- Admin Header Override ---------- */
.admin-body .header {
    height: 70px !important;
    background: var(--bg-elevated) !important;
    border-bottom: 1px solid var(--border) !important;
    box-shadow: var(--shadow-sm) !important;
}

.admin-body .header.scrolled {
    height: 70px !important;
}

.admin-body .logo-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
}

.admin-body .logo-img {
    height: 44px !important;
    width: auto;
}

.admin-body .logo-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.admin-body .logo-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.admin-body .nav-wrapper {
    height: 70px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-body .admin-header-right {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.admin-body #viewWebsiteBtn {
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--duration-fast);
}

.admin-body #viewWebsiteBtn:hover {
    background: var(--surface);
    border-color: var(--primary);
}

.admin-body .theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: background-color var(--duration-fast);
}

.admin-body .theme-toggle:hover {
    background-color: var(--surface);
}

/* On tablet (max-width: 1024px) */
@media (max-width: 1024px) {
    .admin-body .admin-sidebar {
        top: 70px;
        height: calc(100vh - 70px);
    }
}

/* On mobile (max-width: 768px) */
@media (max-width: 768px) {
    .admin-body .header {
        height: 60px !important;
    }
    .admin-body .header.scrolled {
        height: 60px !important;
    }
    .admin-body .nav-wrapper {
        height: 60px !important;
    }
    .admin-body .logo-img {
        height: 36px !important;
    }
    .admin-body .logo-text {
        font-size: 1rem;
    }
    .admin-body .logo-badge {
        font-size: 0.65rem;
        padding: 1px 4px;
    }
}


