@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Cairo:wght@400;500;700;800;900&family=Outfit:wght@500;600;700;800&display=swap');

:root {
    --ink: #12231a;
    --muted: #66756d;
    --line: #d9e4dd;
    --paper: #fdfcf7;
    --soft: #f4f8f5;
    --green: #11633f;
    --green-dark: #0a3d25;
    --gold: #d4af37;
    --gold-dark: #bfa12a;
    --rose: #b42335;
    --white: #ffffff;
    --shadow: 0 24px 70px rgba(10, 61, 37, .15);
    --gold-gradient: linear-gradient(135deg, #f1d675, #d4af37 46%, #bfa12a);
    --islamic-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%23d4af37' stroke-opacity='.22' stroke-width='1.2'%3E%3Cpath d='M48 6l12 30 30 12-30 12-12 30-12-30L6 48l30-12z'/%3E%3Cpath d='M48 22l9 17 17 9-17 9-9 17-9-17-17-9 17-9z'/%3E%3Ccircle cx='48' cy='48' r='21'/%3E%3C/g%3E%3C/svg%3E");
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        linear-gradient(180deg, rgba(244, 248, 245, .82), rgba(253, 252, 247, .96)),
        var(--islamic-pattern),
        var(--paper);
    color: var(--ink);
    font-family: "Cairo", "Outfit", Tahoma, Arial, sans-serif;
    line-height: 1.65;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
video,
audio {
    max-width: 100%;
    display: block;
}

.site-header,
.admin-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px clamp(16px, 4vw, 54px);
    background: rgba(253, 252, 247, .78);
    border-bottom: 1px solid rgba(212, 175, 55, .20);
    box-shadow: 0 14px 40px rgba(10, 61, 37, .08);
    backdrop-filter: blur(18px) saturate(145%);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--green-dark);
    white-space: nowrap;
}

.brand-mark {
    display: inline-grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 8px;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .34), transparent 26%), var(--green-dark);
    box-shadow: inset 0 0 0 1px rgba(212, 175, 55, .36), 0 12px 28px rgba(10, 61, 37, .22);
}

.brand-mark svg {
    width: 34px;
    height: 34px;
    display: block;
}

.brand-mark path {
    fill: rgba(212, 175, 55, .18);
    stroke: var(--gold);
    stroke-width: 1.4;
}

.brand-mark text {
    fill: #f8e7b0;
    font: 800 22px "Amiri", serif;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    place-items: center;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--green-dark);
    border-radius: 2px;
}

.main-nav a,
.lang-switch,
.pwa-install-button {
    padding: 9px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    font-size: 14px;
}

.main-nav a:hover,
.lang-switch:hover,
.pwa-install-button:hover {
    background: rgba(212, 175, 55, .13);
    color: var(--green-dark);
}

.pwa-install-button {
    border: 1px solid rgba(212, 175, 55, .34);
    color: var(--green-dark);
    background: rgba(255, 255, 255, .62);
}

.pwa-install-button[hidden] {
    display: none;
}

.hero {
    position: relative;
    min-height: calc(100vh - 70px);
    display: grid;
    align-items: center;
    padding: clamp(40px, 7vw, 96px) clamp(18px, 5vw, 72px);
    overflow: hidden;
    background:
        linear-gradient(112deg, rgba(10, 61, 37, .96), rgba(17, 99, 63, .82)),
        var(--islamic-pattern),
        radial-gradient(circle at 84% 24%, rgba(212, 175, 55, .28), transparent 30%),
        #0a3d25;
    background-size: cover;
    color: var(--white);
}

.hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 80px;
    background: linear-gradient(to top, var(--paper), transparent);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(760px, 100%);
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--gold);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.hero h1 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(34px, 7vw, 76px);
    line-height: 1.08;
}

.hero p {
    max-width: 700px;
    color: rgba(255, 255, 255, .87);
    font-size: clamp(17px, 2vw, 22px);
}

.hero-actions,
.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 11px 18px;
    border: 0;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
}

.button.primary {
    background: var(--gold-gradient);
    color: #1d2119;
    box-shadow: 0 12px 26px rgba(191, 161, 42, .28);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.button.primary:hover {
    transform: translateY(-2px);
    filter: saturate(112%);
    box-shadow: 0 18px 34px rgba(191, 161, 42, .36);
}

.button.ghost {
    border: 1px solid rgba(255, 255, 255, .44);
    color: var(--white);
    background: rgba(255, 255, 255, .1);
}

.button.muted {
    background: #e6eee9;
    color: var(--green-dark);
}

.button.danger {
    background: var(--rose);
    color: var(--white);
}

.quick-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.quick-stats span {
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .2);
}

.official-strip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    max-width: min(560px, 100%);
    margin-bottom: 18px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, .42);
    background: rgba(253, 252, 247, .12);
    backdrop-filter: blur(10px);
}

.official-strip img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    border-radius: 999px;
    background: rgba(255, 255, 255, .9);
}

.ministry-mark {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 999px;
    border: 2px solid rgba(212, 175, 55, .72);
    background: rgba(10, 61, 37, .82);
    color: #f8e7b0;
    font: 800 18px "Outfit", sans-serif;
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .08);
}

.official-strip strong,
.official-strip span {
    display: block;
}

.official-strip strong {
    color: #fff8d9;
    font-weight: 900;
}

.official-strip span {
    color: rgba(255, 255, 255, .78);
    font-weight: 700;
}

.hero-media {
    position: absolute;
    inset-inline-end: clamp(20px, 7vw, 90px);
    bottom: 70px;
    width: min(420px, 38vw);
    z-index: 1;
}

.hero-panel {
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, .26);
    border-radius: 8px;
    background: rgba(9, 38, 26, .42);
    box-shadow: var(--shadow);
}

.ayah-line {
    display: block;
    color: #f8e7b0;
    font-size: clamp(26px, 4vw, 48px);
    font-weight: 900;
    text-align: center;
}

.sound-bars {
    height: 90px;
    margin-top: 24px;
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 9px;
}

.sound-bars i {
    width: 13px;
    border-radius: 8px 8px 0 0;
    background: #f2c45f;
    animation: bars 1.35s infinite ease-in-out;
}

.sound-bars i:nth-child(1) { height: 34px; }
.sound-bars i:nth-child(2) { height: 62px; animation-delay: .1s; }
.sound-bars i:nth-child(3) { height: 48px; animation-delay: .2s; }
.sound-bars i:nth-child(4) { height: 84px; animation-delay: .3s; }
.sound-bars i:nth-child(5) { height: 52px; animation-delay: .4s; }
.sound-bars i:nth-child(6) { height: 70px; animation-delay: .5s; }
.sound-bars i:nth-child(7) { height: 38px; animation-delay: .6s; }

@keyframes bars {
    0%, 100% { transform: scaleY(.72); }
    50% { transform: scaleY(1); }
}

.section {
    padding: clamp(48px, 7vw, 86px) clamp(18px, 5vw, 72px);
}

.section-heading {
    max-width: 760px;
    margin-bottom: 28px;
}

.section-heading h2,
.admin-title h1,
.auth-card h1 {
    margin: 0 0 8px;
    font-size: clamp(26px, 4vw, 44px);
    line-height: 1.16;
}

.section-heading p {
    color: var(--muted);
}

.reader-form,
.success-box,
.auth-card {
    background: var(--white);
    border: 1px solid rgba(212, 175, 55, .22);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.reader-form {
    padding: clamp(18px, 4vw, 34px);
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

label {
    display: grid;
    gap: 7px;
    font-weight: 800;
    color: var(--green-dark);
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 13px;
    background: linear-gradient(180deg, #ffffff, #fbfdfb);
    color: var(--ink);
    font: inherit;
}

input:focus,
textarea:focus,
select:focus {
    outline: 3px solid rgba(200, 148, 50, .24);
    border-color: var(--gold);
}

.wide {
    grid-column: 1 / -1;
}

.photo-capture-field {
    display: grid;
    gap: 12px;
}

.photo-capture-box {
    display: grid;
    gap: 14px;
    padding: clamp(14px, 2.5vw, 20px);
    border: 1px solid rgba(212, 175, 55, .28);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .90), rgba(244, 248, 245, .94)),
        var(--islamic-pattern);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .78), 0 20px 50px rgba(10, 61, 37, .10);
}

.photo-stage {
    position: relative;
    display: grid;
    place-items: center;
    min-height: clamp(260px, 44vw, 420px);
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, .32);
    border-radius: 8px;
    background:
        radial-gradient(circle at 26% 18%, rgba(212, 175, 55, .18), transparent 34%),
        linear-gradient(145deg, #f7fbf8, #e7f1eb);
}

.photo-stage::before,
.photo-stage::after {
    content: "";
    position: absolute;
    width: 72px;
    height: 72px;
    border-color: rgba(10, 61, 37, .42);
    pointer-events: none;
}

.photo-stage::before {
    top: 14px;
    inset-inline-start: 14px;
    border-top: 3px solid;
    border-inline-start: 3px solid;
}

.photo-stage::after {
    right: 14px;
    bottom: 14px;
    border-right: 3px solid;
    border-bottom: 3px solid;
}

[dir="rtl"] .photo-stage::after {
    right: auto;
    left: 14px;
    border-right: 0;
    border-left: 3px solid;
}

.photo-camera-preview,
.photo-preview {
    display: none;
    width: 100%;
    height: 100%;
    max-height: 420px;
    object-fit: contain;
}

.photo-capture-box.is-camera-on .photo-camera-preview,
.photo-capture-box.has-photo .photo-preview {
    display: block;
}

.photo-capture-box.is-camera-on .photo-stage {
    background: #0d1712;
}

.photo-placeholder {
    max-width: 340px;
    padding: 12px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .78);
    color: var(--green-dark);
    font-weight: 900;
    text-align: center;
}

.photo-message {
    min-height: 20px;
    font-weight: 700;
}

.photo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.duration-message {
    min-height: 20px;
    color: var(--rose);
    font-weight: 700;
}

.recorder-field {
    display: grid;
    gap: 12px;
}

.recorder-copy span {
    display: block;
    color: var(--green-dark);
    font-weight: 900;
}

.recorder-copy p {
    margin: 4px 0 0;
    color: var(--muted);
    font-weight: 600;
}

.recorder-box {
    display: grid;
    gap: 14px;
    padding: clamp(14px, 2.5vw, 20px);
    border: 1px solid rgba(212, 175, 55, .28);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .88), rgba(244, 248, 245, .92)),
        var(--islamic-pattern);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .78);
}

.audio-recorder {
    display: grid;
    gap: 14px;
    padding: clamp(14px, 2.5vw, 20px);
    border: 1px solid rgba(212, 175, 55, .28);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .90), rgba(244, 248, 245, .94)),
        var(--islamic-pattern);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .78), 0 20px 50px rgba(10, 61, 37, .10);
}

.audio-stage {
    display: grid;
    place-items: center;
    gap: 14px;
    min-height: 220px;
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, .32);
    background:
        radial-gradient(circle at 50% 42%, rgba(212, 175, 55, .18), transparent 34%),
        linear-gradient(145deg, #092e1d, #0f5b3a);
    color: var(--white);
    overflow: hidden;
}

.mic-orb {
    position: relative;
    display: grid;
    width: 96px;
    height: 96px;
    place-items: center;
    border-radius: 999px;
    background: var(--gold-gradient);
    box-shadow: 0 22px 55px rgba(191, 161, 42, .32);
}

.mic-orb span {
    width: 34px;
    height: 52px;
    border-radius: 18px;
    background: var(--green-dark);
    box-shadow: inset 0 -16px 0 rgba(255, 255, 255, .10);
}

.audio-recorder.is-recording .mic-orb {
    animation: micPulse 1.3s infinite ease-in-out;
}

@keyframes micPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

.audio-wave {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 54px;
}

.audio-wave i {
    width: 8px;
    height: 18px;
    border-radius: 999px;
    background: #f8e7b0;
    opacity: .62;
}

.audio-recorder.is-recording .audio-wave i {
    animation: audioWave 1s infinite ease-in-out;
}

.audio-wave i:nth-child(2) { animation-delay: .08s; }
.audio-wave i:nth-child(3) { animation-delay: .16s; }
.audio-wave i:nth-child(4) { animation-delay: .24s; }
.audio-wave i:nth-child(5) { animation-delay: .32s; }
.audio-wave i:nth-child(6) { animation-delay: .40s; }
.audio-wave i:nth-child(7) { animation-delay: .48s; }
.audio-wave i:nth-child(8) { animation-delay: .56s; }

@keyframes audioWave {
    0%, 100% { height: 16px; opacity: .48; }
    50% { height: 48px; opacity: 1; }
}

.audio-preview,
.reader-card audio,
.review-card audio,
.manage-reader-card audio,
.edit-preview audio {
    width: 100%;
    min-height: 44px;
    border-radius: 8px;
}

.device-panel,
.settings-panel {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(212, 175, 55, .28);
    border-radius: 8px;
    background: var(--white);
}

.device-panel > strong,
.settings-panel > strong {
    color: var(--green-dark);
    font-size: 17px;
}

.device-choices,
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.settings-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.device-card {
    padding: 12px;
    border: 1px solid rgba(217, 228, 221, .92);
    border-radius: 8px;
    background: #fbfdfb;
}

.setting-check {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 12px;
    border: 1px solid rgba(217, 228, 221, .92);
    border-radius: 8px;
    background: #fbfdfb;
    color: var(--green-dark);
    font-weight: 800;
}

.setting-check input {
    width: 20px;
    height: 20px;
    accent-color: var(--green-dark);
    flex: 0 0 auto;
}

.wide-setting {
    grid-column: span 2;
}

.camera-viewfinder {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #07130d;
    border: 1px solid rgba(212, 175, 55, .45);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05), 0 20px 50px rgba(10, 61, 37, .18);
}

.camera-viewfinder::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
    background-size: 54px 54px;
    opacity: .42;
}

.camera-preview {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 0;
    background: #0d1712;
}

.camera-preview.is-mirrored {
    transform: scaleX(-1);
}

.processed-preview {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: none;
}

.recorder-box.has-virtual-background .processed-preview {
    display: block;
}

.recorder-box.has-virtual-background .camera-preview {
    opacity: 0;
}

.corner {
    position: absolute;
    z-index: 2;
    width: 34px;
    height: 34px;
    border-color: var(--gold);
    opacity: .92;
}

.corner-tl {
    top: 14px;
    left: 14px;
    border-top: 3px solid;
    border-left: 3px solid;
}

.corner-tr {
    top: 14px;
    right: 14px;
    border-top: 3px solid;
    border-right: 3px solid;
}

.corner-bl {
    bottom: 14px;
    left: 14px;
    border-bottom: 3px solid;
    border-left: 3px solid;
}

.corner-br {
    right: 14px;
    bottom: 14px;
    border-right: 3px solid;
    border-bottom: 3px solid;
}

.recording-pill {
    position: absolute;
    top: 14px;
    inset-inline-end: 14px;
    z-index: 3;
    display: none;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(11, 22, 16, .72);
    color: #fff;
    font: 800 12px "Outfit", "Cairo", sans-serif;
}

.recording-pill i {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #e53935;
    box-shadow: 0 0 0 0 rgba(229, 57, 53, .62);
    animation: recPulse 1.2s infinite;
}

.recorder-box.is-recording .recording-pill {
    display: inline-flex;
}

@keyframes recPulse {
    0% { box-shadow: 0 0 0 0 rgba(229, 57, 53, .68); }
    70% { box-shadow: 0 0 0 10px rgba(229, 57, 53, 0); }
    100% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0); }
}


.recorder-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.recording-timer {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--green-dark);
    color: var(--white);
    font-variant-numeric: tabular-nums;
}

.recorder-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.button:disabled {
    cursor: not-allowed;
    opacity: .54;
}

.fallback-upload {
    padding-top: 10px;
    border-top: 1px dashed var(--line);
}

.submit-button {
    margin-top: 22px;
}

.reader-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}

.reader-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 8px;
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.reader-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, var(--gold), var(--green), var(--green-dark));
    opacity: .92;
}

.reader-card:hover {
    transform: translateY(-7px);
    border-color: rgba(200, 148, 50, .52);
    box-shadow: 0 30px 70px rgba(16, 42, 31, .20);
}

.reader-card > img {
    width: 100%;
    height: 300px;
    object-fit: contain;
    padding: 10px;
    background:
        radial-gradient(circle at 20% 10%, rgba(200, 148, 50, .16), transparent 34%),
        linear-gradient(145deg, #f7fbf8, #e8f2ec);
}

.reader-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px;
}

.reader-card h3,
.review-card h2 {
    margin: 0;
    color: var(--green-dark);
}

.reader-card p,
.review-card p,
.bio {
    color: var(--muted);
    margin: 4px 0;
}

dl {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 16px 0;
}

dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

dd {
    margin: 0;
    font-weight: 900;
}

.reader-card video,
.review-card video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    margin-top: auto;
    border-radius: 8px;
    background: #0d1712;
    border: 1px solid rgba(14, 79, 52, .12);
}

.reader-card audio {
    margin-top: auto;
}

.empty-state,
.alert {
    padding: 14px 16px;
    border-radius: 8px;
    background: #fff4d8;
    color: #6d4b08;
    border: 1px solid #f1d28a;
}

.success {
    min-height: 70vh;
    display: grid;
    place-items: center;
}

.success-box {
    width: min(620px, 100%);
    padding: 32px;
    text-align: center;
}

.error-box {
    border-color: #f1c6cc;
    background: #fff8f8;
}

.error-box h1 {
    color: var(--rose);
}

.admin-body {
    background: #f4f7f4;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}

.auth-card {
    width: min(420px, 100%);
    padding: 28px;
    display: grid;
    gap: 16px;
}

.auth-brand {
    margin-bottom: 8px;
}

.inline {
    justify-self: center;
}

.admin-shell {
    padding: clamp(24px, 5vw, 54px);
}

.admin-title {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
}

.status-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 24px 0;
}

.status-tabs a {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 10px 13px;
    border-radius: 8px;
    background: var(--white);
    border: 1px solid var(--line);
    color: var(--green-dark);
    font-weight: 900;
}

.status-tabs a.active {
    background: var(--green-dark);
    color: var(--white);
}

.status-tabs span {
    min-width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(200, 148, 50, .22);
}

.review-list {
    display: grid;
    gap: 18px;
}

.review-card {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 18px;
    padding: 18px;
    border-radius: 8px;
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: 0 14px 36px rgba(16, 42, 31, .08);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.review-card:hover {
    transform: translateY(-4px);
    border-color: rgba(21, 115, 71, .28);
    box-shadow: 0 22px 52px rgba(16, 42, 31, .13);
}

.review-main {
    display: grid;
    grid-template-columns: 118px 1fr;
    gap: 15px;
}

.review-main img {
    width: 118px;
    height: 118px;
    object-fit: contain;
    padding: 5px;
    background:
        radial-gradient(circle at 20% 10%, rgba(200, 148, 50, .16), transparent 34%),
        linear-gradient(145deg, #f7fbf8, #e8f2ec);
    border-radius: 8px;
}

.review-actions {
    grid-column: 1 / -1;
    display: grid;
    gap: 12px;
}

.site-footer {
    padding: 24px clamp(18px, 5vw, 72px);
    color: var(--muted);
    border-top: 1px solid var(--line);
}

.offline-page {
    min-height: 100vh;
    display: grid;
}

.offline-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: clamp(22px, 5vw, 64px);
    background:
        linear-gradient(145deg, rgba(10, 61, 37, .96), rgba(17, 99, 63, .84)),
        var(--islamic-pattern);
}

.offline-card {
    width: min(520px, 100%);
    padding: clamp(22px, 5vw, 40px);
    border: 1px solid rgba(212, 175, 55, .32);
    border-radius: 8px;
    background: rgba(253, 252, 247, .94);
    box-shadow: var(--shadow);
    text-align: center;
}

.offline-card img {
    width: 96px;
    height: 96px;
    margin: 0 auto 14px;
}

.offline-card h1 {
    margin: 0 0 10px;
    color: var(--green-dark);
    font-size: clamp(26px, 5vw, 42px);
    line-height: 1.2;
}

.offline-card p:not(.eyebrow) {
    color: var(--muted);
    font-weight: 700;
}

.admin-form,
.admin-table,
.manage-reader-card {
    background: var(--white);
    border: 1px solid rgba(212, 175, 55, .22);
    border-radius: 8px;
    box-shadow: 0 14px 36px rgba(16, 42, 31, .08);
    padding: clamp(16px, 3vw, 24px);
}

.admin-form {
    display: grid;
    gap: 18px;
    margin-bottom: 22px;
}

.admin-form h1,
.admin-form h2 {
    margin: 0;
    color: var(--green-dark);
}

.admin-table {
    display: grid;
    gap: 12px;
}

.admin-row {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(180px, 1fr) minmax(180px, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.admin-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.management-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
}

.manage-reader-card {
    display: grid;
    gap: 12px;
}

.manage-reader-card > img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    border-radius: 8px;
    background: var(--soft);
}

.manage-reader-card h2 {
    margin: 0;
    color: var(--green-dark);
}

.manage-reader-card p {
    margin: 4px 0;
    color: var(--muted);
}

.manage-reader-card video,
.edit-preview video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    border-radius: 8px;
    background: #0d1712;
}

.edit-preview {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 16px;
    align-items: start;
}

.edit-preview img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    border-radius: 8px;
    background: var(--soft);
}

@media (max-width: 860px) {
    .site-header,
    .admin-header {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
    }

    .menu-toggle {
        display: grid;
    }

    .main-nav {
        display: none;
        grid-column: 1 / -1;
        width: 100%;
        padding-top: 10px;
        justify-content: stretch;
    }

    .site-header.nav-open .main-nav,
    .admin-header.nav-open .main-nav {
        display: grid;
    }

    .main-nav a,
    .lang-switch,
    .pwa-install-button {
        width: 100%;
        padding: 12px 14px;
        background: var(--white);
        border: 1px solid var(--line);
        text-align: inherit;
    }

    .hero {
        min-height: auto;
        padding-top: 58px;
    }

    .hero-media {
        display: none;
    }

    .field-grid,
    .review-card,
    .device-choices,
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .wide-setting {
        grid-column: auto;
    }

    .admin-row,
    .edit-preview {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .hero-actions .button,
    .action-row .button,
    .recorder-actions .button,
    .photo-actions .button {
        width: 100%;
    }

    .quick-stats span {
        width: 100%;
    }

    .review-main {
        grid-template-columns: 1fr;
    }

    .review-main img {
        width: 100%;
        height: 240px;
        object-fit: contain;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reader-card,
    .review-card {
        transition: none;
    }

    .reader-card:hover,
    .review-card:hover {
        transform: none;
    }
}
