/* Admin Panel & Auth — IKN brand (#00abde, #65d14a) */

.admin-body {
    font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
    background-color: #f4f7fb;
    color: #1e293b;
}

/* —— Layout —— */
.admin-card {
    background: #fff;
    border-radius: 1rem;
    border: 1px solid rgb(226 232 240 / 0.9);
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.admin-card-hover:hover {
    box-shadow: 0 4px 14px rgb(15 23 42 / 0.06);
    border-color: rgb(203 213 225);
}

.admin-stat-icon {
    border-radius: 0.75rem;
    padding: 0.75rem;
}

.admin-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #00abde 0%, #0096c7 100%);
    border-radius: 0.75rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    box-shadow: 0 2px 8px rgb(0 171 222 / 0.35);
}

.admin-btn-primary:hover {
    filter: brightness(1.05);
    box-shadow: 0 4px 14px rgb(0 171 222 / 0.4);
}

.admin-btn-success {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #65d14a 0%, #4eb833 100%);
    border-radius: 0.75rem;
    transition: filter 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 2px 8px rgb(101 209 74 / 0.35);
}

.admin-btn-success:hover {
    filter: brightness(1.05);
}

.admin-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.admin-btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.admin-input {
    width: 100%;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    color: #1e293b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.admin-input:focus {
    outline: none;
    background: #fff;
    border-color: #00abde;
    box-shadow: 0 0 0 3px rgb(0 171 222 / 0.15);
}

.password-input-wrap {
    position: relative;
    display: block;
}

.password-input-wrap .password-input-field,
.password-input-wrap .admin-input {
    padding-right: 2.75rem;
}

.password-toggle-btn {
    position: absolute;
    top: 50%;
    right: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    transform: translateY(-50%);
    border-radius: 0.5rem;
    color: #64748b;
    transition: background 0.15s ease, color 0.15s ease;
}

.password-toggle-btn:hover {
    color: #0f172a;
    background: rgb(148 163 184 / 0.15);
}

.admin-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.375rem;
}

.admin-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-data-table__toolbar,
.admin-data-table__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-color: #e2e8f0;
    background: #fff;
}

.admin-data-table__toolbar {
    border-bottom-width: 1px;
}

.admin-data-table__footer {
    border-top-width: 1px;
}

.admin-data-table__controls {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    align-items: end;
    gap: 0.625rem;
}

.admin-data-table__field {
    display: flex;
    min-width: 9rem;
    flex-direction: column;
    gap: 0.25rem;
    color: #64748b;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.admin-data-table__search {
    min-width: min(100%, 14rem);
    flex: 1 1 14rem;
}

.admin-data-table__page-size {
    min-width: 5rem;
    flex: 0 0 auto;
}

.admin-data-table__input {
    height: 2.375rem;
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.625rem;
    background: #fff;
    padding: 0 0.75rem;
    color: #334155;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
}

.admin-data-table__input:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgb(14 165 233 / 0.12);
    outline: none;
}

.admin-data-table__input:disabled {
    cursor: not-allowed;
    background: #f8fafc;
    color: #94a3b8;
}

.admin-data-table__summary,
.admin-data-table__page-info {
    margin: 0;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
}

.admin-data-table__pagination {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
}

.admin-data-table__page-button {
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    background: #fff;
    padding: 0.4rem 0.65rem;
    color: #475569;
    font-size: 0.6875rem;
    font-weight: 700;
    transition: background-color 150ms ease, border-color 150ms ease;
}

.admin-data-table__page-button:hover:not(:disabled) {
    border-color: #94a3b8;
    background: #f8fafc;
}

.admin-data-table__page-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.admin-data-table__empty {
    padding: 2.5rem 1rem;
    text-align: center;
    color: #64748b;
    font-size: 0.875rem;
}

@media (max-width: 639px) {
    .admin-data-table__toolbar,
    .admin-data-table__footer {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-data-table__field {
        min-width: calc(50% - 0.3125rem);
        flex: 1 1 calc(50% - 0.3125rem);
    }

    .admin-data-table__search {
        min-width: 100%;
        flex-basis: 100%;
    }

    .admin-data-table__footer {
        text-align: center;
    }

    .admin-data-table__pagination {
        justify-content: space-between;
    }
}

.admin-badge {
    display: inline-flex;
    padding: 0.25rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 9999px;
}

.admin-banner {
    background: linear-gradient(135deg, #0f172a 0%, #0c4a6e 45%, #0369a1 100%);
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
}

.admin-banner::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgb(101 209 74 / 0.25) 0%, transparent 70%);
    border-radius: 50%;
}

.admin-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: 20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgb(0 171 222 / 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

/* Sidebar */
.admin-sidebar {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #94a3b8;
    border-radius: 0.75rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.admin-nav-link:hover {
    color: #f1f5f9;
    background: rgb(255 255 255 / 0.06);
}

.admin-nav-link--active {
    color: #fff;
    background: linear-gradient(90deg, rgb(0 171 222 / 0.25) 0%, rgb(101 209 74 / 0.12) 100%);
    box-shadow: inset 3px 0 0 #00abde;
}

.admin-nav-link--active svg {
    color: #65d14a;
}

.admin-nav-link--nested {
    margin-left: 0.75rem;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
    font-size: 0.75rem;
    font-weight: 500;
    gap: 0.5rem;
}

.admin-nav-link--nested svg {
    width: 1rem;
    height: 1rem;
}

.admin-nav-section {
    margin-bottom: 1.25rem;
}

.admin-nav-section:last-child {
    margin-bottom: 0;
}

.admin-nav-section__label {
    margin-bottom: 0.4rem;
    padding: 0 0.5rem;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.admin-nav-section__items {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.admin-nav-dot {
    margin-left: auto;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background: #fbbf24;
    box-shadow: 0 0 0 3px rgb(251 191 36 / 0.2);
}

.admin-role-badge {
    display: inline-flex;
    margin-top: 0.2rem;
    padding: 0.1rem 0.4rem;
    border-radius: 9999px;
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #bae6fd;
    background: rgb(14 165 233 / 0.2);
}

/* Sidebar overlay: never intercept clicks unless explicitly open */
.admin-sidebar-overlay {
    pointer-events: none;
}

.admin-sidebar-overlay.is-open {
    pointer-events: auto;
}

/* Mobile sidebar */
@media (max-width: 1023px) {
    .admin-sidebar-panel {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

    .admin-sidebar-panel.is-open {
        transform: translateX(0);
    }

    .admin-sidebar-overlay {
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease, visibility 0.25s ease;
    }

    .admin-sidebar-overlay.is-open {
        opacity: 1;
        visibility: visible;
    }
}

/* Auth login */
.auth-panel-brand {
    background: linear-gradient(160deg, #0f172a 0%, #0369a1 50%, #00abde 100%);
}

.auth-card {
    background: #fff;
    border-radius: 1.25rem;
    border: 1px solid rgb(226 232 240 / 0.8);
    box-shadow: 0 8px 30px rgb(15 23 42 / 0.08);
}

/* —— Audit trail —— */
.audit-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border-radius: 9999px;
    border: 1px solid transparent;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.audit-chip:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.audit-chip.is-active {
    color: #0369a1;
    background: rgb(0 171 222 / 0.12);
    border-color: rgb(0 171 222 / 0.35);
}

.audit-row__summary::-webkit-details-marker {
    display: none;
}

.audit-row__summary {
    transition: background 0.15s ease;
}

.audit-row__summary:hover {
    background: rgb(248 250 252 / 0.9);
}

.audit-row[open] > .audit-row__summary {
    background: rgb(248 250 252);
}

.audit-avatar {
    display: inline-flex;
    height: 2.25rem;
    width: 2.25rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    font-size: 0.7rem;
    font-weight: 700;
}

.audit-tone-create {
    background: rgb(101 209 74 / 0.15);
    color: #15803d;
}

.audit-tone-update {
    background: rgb(0 171 222 / 0.15);
    color: #0369a1;
}

.audit-tone-delete {
    background: rgb(254 226 226);
    color: #b91c1c;
}

.audit-tone-auth {
    background: rgb(241 245 249);
    color: #334155;
}

.audit-tone-export {
    background: rgb(254 243 199);
    color: #b45309;
}

.audit-tone-default {
    background: #f1f5f9;
    color: #475569;
}

.audit-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.65rem;
    font-weight: 700;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #475569;
}

.audit-pill--muted {
    font-weight: 600;
    color: #64748b;
    background: transparent;
}

