:root {
    --bg: #f4f6f5;
    --bg-soft: #fbfcfb;
    --surface: #ffffff;
    --surface-soft: #f8fbfa;
    --surface-deep: #0f2433;
    --navy: #11293a;
    --teal: #134f59;
    --teal-deep: #103a44;
    --mint: #2eb5a3;
    --mint-soft: #e7f8f4;
    --gold: #c9a14d;
    --ink: #1d2a31;
    --muted: #687981;
    --line: rgba(17, 41, 58, 0.1);
    --line-strong: rgba(17, 41, 58, 0.18);
    --shadow-sm: 0 10px 26px rgba(16, 34, 46, 0.05);
    --shadow-md: 0 22px 52px rgba(16, 34, 46, 0.08);
    --shadow-lg: 0 30px 80px rgba(16, 34, 46, 0.12);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --container: 1240px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Cairo", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top right, rgba(46, 181, 163, 0.08), transparent 24%),
        linear-gradient(180deg, #fcfdfc 0%, #f4f6f5 42%, #eef2f1 100%);
}

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

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

button,
input,
textarea,
select {
    font: inherit;
}

.page,
.admin-shell,
.shell {
    min-height: 100vh;
}

.container,
.admin-shell,
.shell {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    padding: 18px 0 0;
}

.header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.88);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(18px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.brand-text strong,
.brand-text small {
    display: block;
}

.brand-text strong {
    font-size: 1.75rem;
    line-height: 1;
}

.brand-text small {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.82rem;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 20px;
    background: linear-gradient(145deg, var(--navy), var(--mint));
    color: #fff;
    font-size: 1.5rem;
    font-weight: 900;
    box-shadow: 0 18px 32px rgba(19, 79, 89, 0.18);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.header-actions a:not(.btn) {
    color: var(--muted);
    font-size: 0.98rem;
    font-weight: 700;
    transition: color 0.22s ease, transform 0.22s ease;
}

.header-actions a:not(.btn):hover {
    color: var(--navy);
    transform: translateY(-1px);
}

.hero-section {
    padding: 32px 0 24px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    gap: 28px;
    align-items: center;
    padding: 34px;
    border: 1px solid rgba(255, 255, 255, 0.86);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 250, 0.94)),
        linear-gradient(180deg, rgba(46, 181, 163, 0.04), transparent 70%);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
}

.hero-grid::before {
    content: "";
    position: absolute;
    inset: auto auto -120px -120px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(46, 181, 163, 0.09), transparent 72%);
    pointer-events: none;
}

.hero-copy,
.hero-media,
.section-heading,
.feature-card,
.screen-card,
.action-card {
    position: relative;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid rgba(46, 181, 163, 0.2);
    border-radius: 999px;
    background: var(--mint-soft);
    color: var(--teal);
    font-size: 0.88rem;
    font-weight: 800;
}

.hero-copy h1 {
    margin: 16px 0 12px;
    max-width: 11ch;
    color: var(--navy);
    font-size: clamp(1.85rem, 3vw, 2.95rem);
    line-height: 1.22;
    letter-spacing: -0.03em;
}

.hero-copy p {
    max-width: 60ch;
    margin: 0;
    color: var(--muted);
    font-size: 0.96rem;
    line-height: 1.8;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 26px;
}

.hero-badges span {
    padding: 9px 13px;
    border: 1px solid rgba(17, 41, 58, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.hero-points {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.hero-points article {
    padding: 14px;
    border: 1px solid rgba(17, 41, 58, 0.08);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-sm);
}

.hero-points strong,
.hero-points span {
    display: block;
}

.hero-points strong {
    margin-bottom: 8px;
    color: var(--navy);
    font-size: 0.9rem;
}

.hero-points span {
    color: var(--muted);
    line-height: 1.65;
    font-size: 0.83rem;
}

.hero-media {
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.device-frame {
    position: relative;
    width: min(100%, 700px);
    padding: 16px 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    background: linear-gradient(180deg, #112938 0%, #163948 100%);
    box-shadow: 0 30px 60px rgba(15, 36, 51, 0.24);
}

.device-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    color: #eff7f5;
}

.device-dots {
    display: inline-flex;
    gap: 8px;
}

.device-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.88);
}

.device-label strong,
.device-label span {
    display: block;
}

.device-label strong {
    font-size: 1.05rem;
}

.device-label span {
    margin-top: 4px;
    color: rgba(239, 247, 245, 0.7);
    font-size: 0.82rem;
}

.device-screen {
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #fff;
}

.device-screen img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.hero-stat-card {
    position: absolute;
    max-width: 190px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.88);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
}

.hero-stat-card strong,
.hero-stat-card span {
    display: block;
}

.hero-stat-card strong {
    color: var(--navy);
    font-size: 0.88rem;
}

.hero-stat-card span {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.55;
}

.stat-top {
    top: 82px;
    left: -10px;
}

.stat-bottom {
    right: -6px;
    bottom: 26px;
}

.notice,
.empty {
    padding: 16px 18px;
    border-radius: 18px;
}

.notice {
    margin: 0 0 20px;
    border: 1px solid rgba(46, 181, 163, 0.18);
    background: #e9faf6;
    color: #0f786d;
    font-weight: 800;
}

.notice.error {
    border-color: rgba(205, 49, 89, 0.18);
    background: #fff1f4;
    color: #cc3159;
}

.section-block {
    padding: 22px 0 0;
}

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

.section-heading h2 {
    margin: 14px 0 12px;
    color: var(--navy);
    font-size: clamp(1.55rem, 2.6vw, 2.3rem);
    line-height: 1.18;
    letter-spacing: -0.02em;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
    font-size: 0.95rem;
}

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

.feature-card,
.screen-card,
.action-card,
.card,
.login-card,
.stat {
    border: 1px solid rgba(255, 255, 255, 0.86);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-md);
}

.feature-card {
    padding: 24px;
    transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
}

.feature-card:hover,
.screen-card:hover,
.action-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 56px rgba(16, 34, 46, 0.12);
    border-color: rgba(46, 181, 163, 0.18);
}

.feature-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.feature-number {
    color: var(--gold);
    font-size: 0.9rem;
    font-weight: 800;
}

.feature-icon {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(145deg, #effaf8, #e0f5f0);
    color: var(--teal);
}

.feature-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feature-card h3 {
    margin: 0 0 8px;
    color: var(--navy);
    font-size: 1.28rem;
}

.feature-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
    font-size: 0.96rem;
}

.screens-showcase {
    padding-top: 30px;
}

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

.screens-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    align-items: start;
}

.screen-card {
    grid-column: span 4;
    min-width: 0;
    overflow: hidden;
    transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
}

.screens-grid-compact .screen-card {
    grid-column: auto;
    display: flex;
    flex-direction: column;
}

.screen-card img {
    width: 100%;
    height: 270px;
    object-fit: contain;
    object-position: top center;
    background: #f4f7f6;
    padding: 12px;
}

.screen-card figcaption {
    padding: 16px 18px 20px;
    border-top: 1px solid rgba(17, 41, 58, 0.08);
}

.screen-card strong,
.screen-card span {
    display: block;
}

.screen-card strong {
    color: var(--navy);
    font-size: 1rem;
}

.screen-card span {
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.7;
    font-size: 0.88rem;
}

.screen-dashboard img,
.screen-patient img {
    object-position: center top;
}

.screen-odontogram img {
    object-position: center center;
}

.screen-imaging img {
    object-position: center top;
}

.activation-wrap {
    padding-top: 30px;
    padding-bottom: 30px;
}

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

.action-card,
.card,
.login-card {
    padding: 24px;
}

.action-step {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(145deg, var(--navy), var(--mint));
    color: #fff;
    font-weight: 900;
    box-shadow: 0 14px 28px rgba(19, 79, 89, 0.18);
}

.action-card h3,
.card h2,
.login-card h1 {
    margin: 16px 0 10px;
    color: var(--navy);
}

.action-card p,
.card p {
    margin: 0 0 16px;
    color: var(--muted);
    line-height: 1.8;
}

.clean-form {
    display: grid;
    gap: 12px;
}

label {
    display: block;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 700;
}

input,
textarea,
select {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid rgba(17, 41, 58, 0.12);
    border-radius: 16px;
    background: #fbfcfb;
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(46, 181, 163, 0.4);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(46, 181, 163, 0.1);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.status-panel {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid rgba(17, 41, 58, 0.1);
    border-radius: 18px;
    background: var(--surface-soft);
}

.status-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.status-panel small,
.status-panel p {
    color: var(--muted);
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff7df;
    color: #ba7b00;
    font-size: 0.85rem;
    font-weight: 800;
}

.pill.active {
    background: #e6faf5;
    color: #127c70;
}

.pill.rejected {
    background: #fff1f4;
    color: #cc3159;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 18px;
    border: 0;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

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

.btn-primary {
    background: linear-gradient(145deg, var(--mint), #25a592);
    color: #fff;
    box-shadow: 0 18px 34px rgba(46, 181, 163, 0.22);
}

.btn-primary:hover {
    box-shadow: 0 22px 40px rgba(46, 181, 163, 0.28);
}

.btn-secondary {
    border: 1px solid rgba(17, 41, 58, 0.12);
    background: rgba(255, 255, 255, 0.9);
    color: var(--navy);
}

.btn.primary {
    background: linear-gradient(145deg, var(--mint), #25a592);
    color: #fff;
    box-shadow: 0 18px 34px rgba(46, 181, 163, 0.22);
}

.btn.danger {
    background: #fff1f4;
    color: #cc3159;
}

.btn.small {
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 0.92rem;
}

.btn.large {
    min-height: 56px;
    padding-inline: 24px;
    font-size: 1rem;
}

.btn-small {
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 0.92rem;
}

.btn-large {
    min-height: 56px;
    padding-inline: 24px;
    font-size: 1rem;
}

.btn-disabled {
    background: rgba(17, 41, 58, 0.08);
    color: var(--muted);
    cursor: not-allowed;
}

.empty {
    border: 1px solid rgba(17, 41, 58, 0.08);
    background: #f7faf9;
    color: var(--muted);
}

.site-footer {
    padding: 18px 0 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.84);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-sm);
}

.site-footer strong {
    display: block;
    color: var(--navy);
    font-size: 1.2rem;
}

.site-footer p,
.footer-copy span {
    margin: 6px 0 0;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
}

.footer-links a {
    color: var(--muted);
    font-weight: 700;
}

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

.login-card {
    width: min(460px, 100%);
}

.admin-shell {
    padding: 24px 0 42px;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px;
    border-radius: 28px;
    background: linear-gradient(145deg, var(--navy), var(--teal) 58%, var(--mint));
    color: #fff;
    box-shadow: var(--shadow-lg);
}

.admin-header h1 {
    margin: 10px 0 0;
}

.admin-header nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 18px 0;
}

.stat {
    padding: 22px;
}

.stat span {
    color: var(--muted);
}

.stat b {
    display: block;
    margin-top: 8px;
    color: var(--teal);
    font-size: 2rem;
}

.inline-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.inline-form input[type="file"] {
    width: auto;
    flex: 1;
}

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

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 13px;
    border-bottom: 1px solid rgba(17, 41, 58, 0.1);
    text-align: right;
    vertical-align: top;
}

th {
    color: var(--muted);
    background: #eff8f5;
}

code {
    white-space: nowrap;
    direction: ltr;
}

.actions {
    display: grid;
    grid-template-columns: 90px 100px repeat(3, auto);
    gap: 8px;
    align-items: center;
    min-width: 520px;
}

.actions input {
    min-height: 40px;
}

.reveal {
    opacity: 0;
    transform: translateY(28px);
    animation: fade-up 0.82s ease forwards;
}

.reveal-delay-1 {
    animation-delay: 0.12s;
}

.reveal-delay-2 {
    animation-delay: 0.22s;
}

.reveal-delay-3 {
    animation-delay: 0.32s;
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

@media (max-width: 1160px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .hero-copy h1 {
        max-width: none;
    }

    .hero-media {
        min-height: auto;
    }

    .device-frame {
        width: min(100%, 760px);
    }

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

    .activation-grid {
        grid-template-columns: 1fr;
    }

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

    .screen-card,
    .screen-large,
    .screens-grid-compact .screen-card {
        grid-column: auto;
    }
}

@media (max-width: 860px) {
    .header-bar,
    .admin-header,
    .footer-grid {
        border-radius: 24px;
    }

    .header-bar,
    .admin-header {
        flex-direction: column;
        align-items: stretch;
    }

    .header-actions,
    .admin-header nav {
        justify-content: center;
    }

    .hero-grid {
        padding: 28px;
    }

    .hero-points,
    .stats,
    .features-grid,
    .screens-grid,
    .screens-grid-compact {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-stat-card {
        position: static;
        max-width: none;
        margin-top: 12px;
    }

    .screen-card img {
        height: 250px;
    }

    .actions {
        grid-template-columns: 1fr;
        min-width: 0;
    }
}

@media (max-width: 640px) {
    .container,
    .admin-shell,
    .shell {
        width: min(var(--container), calc(100% - 18px));
    }

    .site-header {
        padding-top: 10px;
    }

    .header-bar {
        padding: 14px;
    }

    .brand {
        justify-content: center;
    }

    .brand-text strong {
        font-size: 1.55rem;
    }

    .hero-section {
        padding-top: 18px;
    }

    .hero-grid {
        padding: 22px;
        border-radius: 26px;
    }

    .hero-copy h1 {
        font-size: 1.95rem;
        max-width: none;
    }

    .hero-copy p,
    .section-heading p {
        font-size: 0.96rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn,
    .btn-large {
        width: 100%;
    }

    .site-footer {
        padding-top: 10px;
    }

    .screen-card img {
        height: 220px;
    }
}
