* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Noto Kufi Arabic', sans-serif;
    background:
        radial-gradient(circle at top right, rgba(20, 184, 166, .18), transparent 35%),
        radial-gradient(circle at bottom left, rgba(37, 99, 235, .18), transparent 35%),
        #f3f6fb;
    color: #1f2937;
}

a {
    text-decoration: none;
}

.app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #0f172a, #1e3a8a);
    color: #fff;
    padding: 20px;
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 1000;
    overflow-y: auto;
}

body.ltr .sidebar {
    right: auto;
    left: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    position: relative;
}

.brand img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    border-radius: 14px;
    background: #fff;
    padding: 4px;
}

.brand strong {
    display: block;
    font-size: 15px;
}

.brand small {
    opacity: .8;
}

.close-sidebar {
    display: none;
    position: absolute;
    left: 0;
    top: 0;
    border: 0;
    background: rgba(255,255,255,.15);
    color: #fff;
    font-size: 24px;
    border-radius: 10px;
    cursor: pointer;
}

.menu a {
    display: block;
    padding: 13px 15px;
    margin-bottom: 9px;
    border-radius: 16px;
    color: #e5e7eb;
    transition: .25s;
    background: rgba(255,255,255,.06);
}

.menu a:hover,
.menu a.active {
    background: linear-gradient(135deg, #f59e0b, #facc15);
    color: #111827;
    transform: translateX(-4px);
}

body.ltr .menu a:hover,
body.ltr .menu a.active {
    transform: translateX(4px);
}

.language-switch,
.login-language {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.language-switch {
    border-top: 1px solid rgba(255,255,255,.16);
    padding-top: 15px;
}

.language-switch span {
    width: 100%;
    color: rgba(255,255,255,.78);
    font-size: 12px;
}

.language-switch a,
.login-language a {
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: 12px;
}

.language-switch a.active,
.login-language a.active {
    background: #facc15;
    color: #111827;
}

.main-content {
    width: calc(100% - 280px);
    margin-right: 280px;
    min-height: 100vh;
}

body.ltr .main-content {
    margin-right: 0;
    margin-left: 280px;
}

.topbar {
    background: rgba(255,255,255,.75);
    backdrop-filter: blur(16px);
    padding: 18px 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(148,163,184,.25);
    position: sticky;
    top: 0;
    z-index: 500;
}

.topbar h1 {
    margin: 0;
    font-size: 22px;
    color: #0f172a;
}

.topbar p {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 13px;
}

.top-user {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    padding: 10px 14px;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(15,23,42,.08);
}

.top-user small {
    color: #64748b;
}

.logout-btn {
    background: #ef4444;
    color: #fff;
    padding: 8px 13px;
    border-radius: 12px;
    font-size: 13px;
}

.page-body {
    padding: 26px;
}

.grid {
    display: grid;
    gap: 18px;
}

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

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

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

.card {
    background: rgba(255,255,255,.86);
    border: 1px solid rgba(148,163,184,.22);
    border-radius: 26px;
    padding: 22px;
    box-shadow: 0 18px 45px rgba(15,23,42,.08);
}

.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card:before {
    content: "";
    position: absolute;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: rgba(37, 99, 235, .12);
    left: -40px;
    top: -40px;
}

.stat-card h3 {
    margin: 0 0 10px;
    color: #64748b;
    font-size: 14px;
}

.stat-card strong {
    font-size: 24px;
    color: #0f172a;
}

.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
}

.badge-green {
    background: #dcfce7;
    color: #166534;
}

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

.badge-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.form-group {
    margin-bottom: 14px;
}

label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    color: #334155;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 15px;
    font-family: inherit;
    outline: none;
    background: #fff;
}

textarea {
    min-height: 90px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}

.btn {
    border: 0;
    padding: 12px 18px;
    border-radius: 15px;
    font-family: inherit;
    cursor: pointer;
    display: inline-block;
    transition: .25s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #22c55e);
    color: #fff;
}

.btn-gold {
    background: linear-gradient(135deg, #f59e0b, #facc15);
    color: #111827;
}

.btn-red {
    background: #ef4444;
    color: #fff;
}

.btn-whatsapp {
    background: #22c55e;
    color: #fff;
    padding: 8px 12px;
    border-radius: 12px;
    display: inline-block;
    font-size: 12px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

th,
td {
    padding: 13px;
    border-bottom: 1px solid #e2e8f0;
    text-align: right;
    font-size: 13px;
}

body.ltr th,
body.ltr td {
    text-align: left;
}

th {
    background: #f8fafc;
    color: #334155;
}

.alert {
    padding: 14px 16px;
    border-radius: 15px;
    margin-bottom: 18px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.mobile-menu-btn {
    display: none;
    background: #1e3a8a;
    color: #fff;
    border: 0;
    border-radius: 12px;
    padding: 10px 13px;
    font-size: 22px;
    cursor: pointer;
}

.sidebar-overlay {
    display: none;
}

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

.login-box {
    width: 100%;
    max-width: 430px;
    background: rgba(255,255,255,.9);
    border-radius: 30px;
    padding: 30px;
    box-shadow: 0 25px 70px rgba(15,23,42,.15);
}

.login-box h1 {
    margin: 10px 0 0;
    text-align: center;
    color: #0f172a;
}

.login-subtitle {
    margin: 6px 0 20px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

.login-logo {
    width: 130px;
    height: 130px;
    object-fit: contain;
    display: block;
    margin: auto;
    border-radius: 20px;
    background: #fff;
    padding: 8px;
    box-shadow: 0 12px 35px rgba(15, 23, 42, .10);
}

.login-language {
    justify-content: center;
}

.login-language a {
    color: #1e3a8a;
    background: #e0ecff;
}

.receipt-page {
    background: #f8fafc;
    padding: 30px;
}

.receipt {
    background: #fff;
    max-width: 850px;
    margin: auto;
    border-radius: 20px;
    padding: 35px;
    border: 1px solid #e2e8f0;
}

.receipt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #1e3a8a;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.receipt-header img {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    object-fit: contain;
    background: #fff;
    padding: 6px;
}

.receipt-title {
    text-align: center;
    font-size: 28px;
    color: #1e3a8a;
    margin: 20px 0;
}

.print-actions {
    text-align: center;
    margin: 25px 0;
}

.settings-image-preview {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 10px;
    text-align: center;
}

.settings-image-preview img {
    max-width: 220px;
    max-height: 130px;
    object-fit: contain;
}

.receipt-signature-area {
    margin-top: 20px;
}

.stamp-signature-box {
    margin: 10px auto 20px;
    text-align: center;
}

.stamp-signature-box img {
    max-width: 260px;
    max-height: 150px;
    object-fit: contain;
    display: inline-block;
}

body.no-stamp-print .stamp-signature-box {
    display: none !important;
}

@media print {
    .print-actions {
        display: none;
    }

    body {
        background: #fff;
    }

    .receipt {
        box-shadow: none;
        border: 0;
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(110%);
        transition: .3s;
    }

    body.ltr .sidebar {
        transform: translateX(-110%);
    }

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

    .sidebar-overlay.show {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15,23,42,.55);
        z-index: 900;
    }

    .close-sidebar {
        display: block;
    }

    .main-content {
        width: 100%;
        margin-right: 0;
    }

    body.ltr .main-content {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .topbar {
        gap: 14px;
    }

    .top-user {
        display: none;
    }

    .grid-4,
    .grid-3,
    .grid-2,
    .form-row {
        grid-template-columns: 1fr;
    }

    .page-body {
        padding: 16px;
    }
}

/* Public website */
.public-site {
    background: #f8fafc;
    color: #0f172a;
}

.public-header {
    position: sticky;
    top: 0;
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 7%;
    background: rgba(255,255,255,.84);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(148,163,184,.25);
}

.public-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #0f172a;
}

.public-brand img,
.public-footer img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    border-radius: 16px;
    background: #fff;
    padding: 4px;
    box-shadow: 0 10px 30px rgba(15,23,42,.08);
}

.public-brand strong {
    display: block;
    font-weight: 800;
}

.public-brand span {
    color: #64748b;
    font-size: 12px;
}

.public-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.public-nav a {
    color: #334155;
    font-weight: 700;
    font-size: 13px;
}

.public-nav a:hover {
    color: #1d4ed8;
}

.public-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.public-login,
.public-lang,
.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
}

.public-login,
.hero-btn {
    background: linear-gradient(135deg, #f59e0b, #facc15);
    color: #111827;
    padding: 12px 18px;
    box-shadow: 0 16px 35px rgba(245,158,11,.24);
}

.public-lang {
    background: #e0f2fe;
    color: #075985;
    padding: 10px 14px;
}

.public-hero {
    position: relative;
    height: min(720px, calc(100vh - 80px));
    min-height: 540px;
    overflow: hidden;
}

.public-slider,
.public-slide,
.slide-bg {
    position: absolute;
    inset: 0;
}

.public-slide {
    opacity: 0;
    transform: scale(1.02);
    transition: opacity .75s ease, transform 1.2s ease;
    pointer-events: none;
}

.public-slide.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.slide-bg {
    background-size: cover;
    background-position: center;
}

.slide-content {
    position: relative;
    z-index: 2;
    width: min(900px, 88%);
    margin-inline: auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
}

.hero-badge,
.section-kicker {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .2px;
}

.hero-badge {
    background: rgba(255,255,255,.16);
    color: #fef9c3;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.18);
}

.slide-content h1 {
    font-size: clamp(34px, 6vw, 72px);
    line-height: 1.25;
    margin: 18px 0 14px;
    max-width: 900px;
}

.slide-content p {
    font-size: clamp(16px, 2vw, 22px);
    line-height: 1.9;
    max-width: 720px;
    color: #e2e8f0;
}

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    gap: 9px;
}

.slider-dots button {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.55);
    cursor: pointer;
}

.slider-dots button.active {
    width: 32px;
    background: #facc15;
}

.public-section {
    width: min(1180px, 90%);
    margin: 0 auto;
    padding: 80px 0;
}

.intro-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: -70px;
    position: relative;
    z-index: 10;
    padding-top: 0;
}

.intro-card,
.public-card,
.event-card {
    background: rgba(255,255,255,.94);
    border: 1px solid rgba(148,163,184,.20);
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(15,23,42,.10);
    overflow: hidden;
}

.intro-card {
    padding: 26px;
}

.intro-card strong {
    display: block;
    font-size: 20px;
    margin-bottom: 8px;
}

.intro-card span,
.public-card p,
.event-card p,
.about-grid p {
    color: #64748b;
    line-height: 1.9;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 42px;
}

.about-image img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 34px;
    box-shadow: 0 28px 70px rgba(15,23,42,.16);
    background: #fff;
}

.section-kicker {
    background: #dbeafe;
    color: #1d4ed8;
}

.section-head {
    text-align: center;
    margin-bottom: 30px;
}

.section-head .section-kicker {
    margin-inline: auto;
}

.public-section h2,
.about-grid h2 {
    font-size: clamp(28px, 3vw, 44px);
    margin: 12px 0 16px;
}

.public-cards,
.events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.public-card img,
.event-card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
}

.public-card div,
.event-card div {
    padding: 22px;
}

.public-card small,
.event-card time {
    color: #1d4ed8;
    font-weight: 800;
    font-size: 12px;
}

.public-card h3,
.event-card h3 {
    margin: 10px 0;
    font-size: 20px;
}

.announcements {
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
    width: 100%;
    max-width: none;
    padding-inline: 7%;
    color: #fff;
}

.announcements .section-head h2,
.announcements .public-card h3 {
    color: #fff;
}

.announcements .public-card {
    background: rgba(255,255,255,.10);
    border-color: rgba(255,255,255,.16);
    color: #fff;
}

.announcements .public-card p {
    color: #dbeafe;
}

.empty-public {
    grid-column: 1 / -1;
    text-align: center;
    color: #64748b;
    background: #fff;
    padding: 28px;
    border-radius: 24px;
}

.public-footer {
    background: #0f172a;
    color: #fff;
    text-align: center;
    padding: 46px 20px;
}

.public-footer strong {
    display: block;
    margin: 12px 0 8px;
    font-size: 20px;
}

.table-thumb {
    width: 74px;
    height: 54px;
    object-fit: cover;
    border-radius: 10px;
    background: #fff;
}

.inner-card {
    box-shadow: none;
    background: #f8fafc;
}

@media (max-width: 992px) {
    .public-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px 5%;
    }

    .public-nav {
        gap: 10px;
    }

    .public-hero {
        height: 620px;
    }

    .intro-cards,
    .about-grid,
    .public-cards,
    .events-grid {
        grid-template-columns: 1fr;
    }

    .about-image img {
        height: 280px;
    }
}
.password-btn {
    background: #dbeafe;
    color: #1d4ed8;
    padding: 8px 13px;
    border-radius: 12px;
    font-size: 13px;
}
