/*
 ASEM ADMIN 444
 Internal admin pages only.
 Public website and dashboard overlay are excluded.
*/

.adminPanel {
    --asem-ink: #193239;
    --asem-border: #e2e8e7;
    --asem-surface: #ffffff;
    --asem-background: #f5f7f6;
    --asem-muted: #6e7f82;
    background: var(--asem-background);
    color: var(--asem-ink);
    min-height: 100vh;
    font-family: inherit;
}

/* Shared React content wrapper */
.adminPanel > div[dir="rtl"] {
    margin-top: 0 !important;
    padding-top: 32px !important;
    padding-right: clamp(18px, 4vw, 64px) !important;
    padding-left: clamp(18px, 4vw, 64px) !important;
    padding-bottom: 48px !important;
    border-radius: 22px 22px 0 0 !important;
    background: #ffffff !important;
    min-width: 0;
}

/* Compact old administrative header */
.adminPanel > div:first-child:not([dir="rtl"]) {
    min-height: 80px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

.adminPanel > div:first-child:not([dir="rtl"])
a[href="/adminPanel"] {
    font-size: clamp(17px, 1.5vw, 23px) !important;
    line-height: 1.6 !important;
}

/* Remove oversized decorative text in admin header */
.adminPanel .allah-mobile-container,
.adminPanel .allah-mobile {
    display: none !important;
}

/* Headings */
.adminPanel h1,
.adminPanel h2,
.adminPanel h3 {
    color: var(--asem-ink);
    line-height: 1.7;
}

.adminPanel h1 {
    font-size: clamp(22px, 2vw, 29px);
}

.adminPanel h2 {
    font-size: clamp(19px, 1.7vw, 24px);
}

/* Inputs */
.adminPanel input:not([type="checkbox"]):not([type="radio"]),
.adminPanel textarea,
.adminPanel select {
    max-width: 100%;
    border-radius: 9px;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.adminPanel input:focus-visible,
.adminPanel textarea:focus-visible,
.adminPanel select:focus-visible {
    outline: 2px solid #8fb2ad;
    outline-offset: 2px;
}

/* Data grids */
.adminPanel .MuiDataGrid-root {
    border: 1px solid var(--asem-border) !important;
    border-radius: 13px !important;
    background: var(--asem-surface);
    font-family: inherit !important;
    min-width: 0;
}

.adminPanel .MuiDataGrid-columnHeaders {
    background: #f4f7f6;
    border-bottom: 1px solid var(--asem-border);
}

.adminPanel .MuiDataGrid-columnHeaderTitle {
    font-weight: 700 !important;
    color: var(--asem-ink);
}

.adminPanel .MuiDataGrid-cell {
    border-color: #edf0ef !important;
}

.adminPanel .MuiDataGrid-row:hover {
    background: #f5f9f8 !important;
}

.adminPanel .MuiDataGrid-footerContainer {
    border-top: 1px solid var(--asem-border);
}

/* Standard HTML tables */
.adminPanel table {
    border-collapse: separate;
    border-spacing: 0;
    max-width: 100%;
}

.adminPanel table th {
    font-weight: 700;
}

.adminPanel table td,
.adminPanel table th {
    vertical-align: middle;
}

/* Preserve existing action button colors and handlers */
.adminPanel button,
.adminPanel a {
    -webkit-tap-highlight-color: transparent;
}

.adminPanel button:focus-visible,
.adminPanel a:focus-visible {
    outline: 2px solid #7ba9a4;
    outline-offset: 3px;
}

/* Cards and forms */
.adminPanel form {
    max-width: 100%;
}

.adminPanel .MuiPaper-root {
    font-family: inherit;
}

.adminPanel .MuiDialog-paper {
    border-radius: 15px;
}

/* Responsive layout */
@media (max-width: 900px) {
    .adminPanel > div[dir="rtl"] {
        padding: 24px 20px 40px !important;
        border-radius: 16px 16px 0 0 !important;
    }

    .adminPanel .MuiDataGrid-root {
        font-size: 12px;
    }
}

@media (max-width: 600px) {
    .adminPanel > div[dir="rtl"] {
        padding: 18px 12px 32px !important;
        border-radius: 12px 12px 0 0 !important;
    }

    .adminPanel h1 {
        font-size: 21px;
    }

    .adminPanel .MuiDataGrid-root {
        border-radius: 9px !important;
    }

    .adminPanel input:not([type="checkbox"]):not([type="radio"]) {
        max-width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .adminPanel input,
    .adminPanel textarea,
    .adminPanel select {
        transition: none !important;
    }
}