:root {
    --green: #0b6b50;
    --teal: #147d73;
    --navy: #183b63;
    --gold: #d5a533;
    --red: #a43d4c;
    --ink: #14213d;
    --muted: #66748a;
    --line: #dce4ef;
    --bg: #f5f8fb;
    --surface: #ffffff;
    --shadow: 0 18px 48px rgba(24, 59, 99, .12);
    --radius: 8px;
    --font: "Tajawal", "Inter", "Segoe UI", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
.container { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px clamp(14px, 4vw, 44px);
    border-bottom: 1px solid rgba(220, 228, 239, .9);
    background: rgba(255, 255, 255, .93);
    backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 220px; }
.brand-mark {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--green), var(--navy));
    box-shadow: 0 12px 28px rgba(11, 107, 80, .22);
}
.brand strong { display: block; line-height: 1.2; }
.brand small { display: block; color: var(--muted); font-size: .78rem; }
.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav a, .button, button.button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: var(--ink);
    font-family: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform .2s ease, color .2s ease, background .2s ease, box-shadow .2s ease;
}
.nav a:hover, .nav a.active { color: var(--green); background: rgba(11, 107, 80, .08); }
.button, button.button, .nav .button {
    color: #fff;
    background: linear-gradient(135deg, var(--green), var(--navy));
    box-shadow: 0 12px 28px rgba(24, 59, 99, .18);
}
.button:hover { transform: translateY(-1px); }
.button-secondary { color: var(--green); background: rgba(11, 107, 80, .1); box-shadow: none; }
.button-danger { background: var(--red); }
.button-small { min-height: 34px; padding: 7px 10px; font-size: .88rem; }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; }
.nav-toggle { display: none; }

.hero {
    position: relative;
    min-height: calc(100vh - 74px);
    display: grid;
    align-items: center;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(8, 45, 50, .93), rgba(24, 59, 99, .72)),
        url("../img/campus.svg") center / cover no-repeat;
}
.hero:after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 92px; background: linear-gradient(to top, var(--bg), transparent); }
.hero-content { position: relative; z-index: 1; width: min(780px, calc(100% - 32px)); margin-inline: auto; padding: 74px 0 128px; }
.eyebrow { color: #ffe7a3; font-weight: 900; }
.hero h1 { margin: 12px 0 16px; font-size: clamp(2.3rem, 7vw, 5.4rem); line-height: 1.05; letter-spacing: 0; }
.hero p { max-width: 720px; color: rgba(255, 255, 255, .9); font-size: clamp(1rem, 2vw, 1.22rem); }
.hero-actions, .export-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.section { padding: 62px 0; }
.section-title, .toolbar { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-title h1, .section-title h2, .toolbar h1 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.25rem); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card, .panel, .stat {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 10px 30px rgba(24, 59, 99, .07);
}
.card { padding: 20px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-3px); border-color: rgba(11, 107, 80, .35); box-shadow: var(--shadow); }
.card h3 { margin: 7px 0; }
.hr-module-card {
    min-height: 150px;
    display: grid;
    align-content: center;
    gap: 12px;
    overflow: hidden;
    position: relative;
}
.hr-module-card:after {
    content: "";
    position: absolute;
    inset-inline-end: -36px;
    bottom: -42px;
    width: 115px;
    height: 115px;
    border-radius: 50%;
    background: rgba(11, 107, 80, .08);
    transition: transform .24s ease, background .24s ease;
}
.hr-module-card:hover:after {
    transform: scale(1.18);
    background: rgba(213, 165, 51, .16);
}
.hr-module-card .uof-service-icon {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: var(--green);
    background: rgba(11, 107, 80, .1);
    font-size: 1.45rem;
}
.hr-module-card h3 {
    position: relative;
    z-index: 1;
    margin: 0;
    line-height: 1.35;
}
.panel { padding: 22px; }
.panel + .panel { margin-top: 18px; }
.stat { padding: 22px; }
.stat strong { display: block; color: var(--green); font-size: 2rem; line-height: 1.1; }
.stats { position: relative; z-index: 2; margin-top: -72px; }
.meta, .muted { color: var(--muted); font-size: .92rem; }
.badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--green);
    background: rgba(11, 107, 80, .1);
    font-weight: 900;
    font-size: .82rem;
}
.badge-warning { color: #805600; background: rgba(213, 165, 51, .2); }
.badge-danger { color: var(--red); background: rgba(164, 61, 76, .12); }

.layout {
    display: grid;
    grid-template-columns: 252px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
    padding: 28px clamp(14px, 4vw, 44px) 64px;
}
.sidebar {
    position: sticky;
    top: 94px;
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}
.sidebar a { padding: 11px 12px; border-radius: var(--radius); color: var(--muted); font-weight: 900; }
.sidebar a:hover, .sidebar a.active { color: #fff; background: linear-gradient(135deg, var(--green), var(--navy)); }

.form-panel:not(.is-open) { display: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: grid; gap: 6px; color: var(--ink); font-weight: 900; }
input, select, textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    font: inherit;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--green); box-shadow: 0 0 0 4px rgba(11, 107, 80, .12); }
.select-search-input {
    min-height: 38px;
    margin-bottom: 6px;
    border-color: rgba(11, 107, 80, .28);
    background: #f8fbf9;
}
.form-subtitle {
    padding: 14px 16px;
    border: 1px solid rgba(11, 107, 80, .14);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(11, 107, 80, .08), rgba(213, 165, 51, .1));
}
.form-subtitle h3 {
    margin: 0;
}
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; min-width: 780px; border-collapse: collapse; background: #fff; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
th { color: var(--muted); background: #f8fafc; font-size: .88rem; }
.inline-form { display: inline; }

.notice, .toast { border: 1px solid rgba(213, 165, 51, .45); background: #fff9e8; color: #6d4b00; border-radius: var(--radius); padding: 16px; }
.toast { position: fixed; inset-inline-start: 22px; top: 88px; z-index: 90; min-width: 250px; box-shadow: var(--shadow); animation: floatIn .35s ease both; }
.login-shell { min-height: calc(100vh - 74px); display: grid; place-items: center; padding: 32px; }
.login-card { width: min(430px, 100%); }

.editor-shell { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.editor-toolbar button { min-width: 34px; min-height: 32px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }
.editor-canvas { min-height: 190px; padding: 12px; outline: 0; }

.footer { margin-top: 40px; padding: 34px 0; color: rgba(255,255,255,.78); background: #10243a; }
.footer-grid { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 14px; flex-wrap: wrap; }

@keyframes floatIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 980px) {
    .nav-toggle { display: inline-grid; place-items: center; }
    .nav {
        display: none;
        position: absolute;
        inset-inline: 14px;
        top: 74px;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: #fff;
        box-shadow: var(--shadow);
    }
    .nav.open { display: grid; }
    .layout { grid-template-columns: 1fr; }
    .sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid, .grid-2, .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 580px) {
    .topbar { padding-inline: 12px; }
    .brand { min-width: 0; }
    .brand small { display: none; }
    .toolbar, .section-title { align-items: stretch; flex-direction: column; }
    .sidebar { grid-template-columns: 1fr; }
    .hero { min-height: 670px; }
}

@media print {
    .topbar, .sidebar, .footer, .button, .export-actions, .nav-toggle { display: none !important; }
    body { background: #fff; }
    .layout { display: block; padding: 0; }
    .panel, .card { box-shadow: none; border-color: #aaa; }
}

/* Public Univet-inspired theme */
.public-topline {
    background: #0a5f45;
    color: rgba(255, 255, 255, .9);
    font-size: .9rem;
}

.public-topline-inner {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.topbar {
    top: 0;
    min-height: 82px;
    background: #fff;
    border-bottom: 0;
    box-shadow: 0 10px 30px rgba(13, 66, 47, .08);
}

.brand-mark {
    border-radius: 50%;
    background: #0a7a52;
}

.nav a {
    color: #163b2e;
}

.nav a:hover {
    color: #0a7a52;
    background: #eef8f3;
}

.nav .button,
.button {
    background: #0a7a52;
    box-shadow: 0 14px 32px rgba(10, 122, 82, .24);
}

.button-light {
    color: #0a7a52;
    background: #fff;
    box-shadow: none;
}

.univet-hero {
    min-height: 760px;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(6, 45, 33, .92), rgba(6, 65, 48, .74)),
        url("../img/campus.svg") center / cover no-repeat;
}

.univet-hero:after {
    display: none;
}

.univet-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) 360px;
    align-items: center;
    gap: 42px;
    padding-block: 88px;
}

.univet-hero .hero-content {
    width: auto;
    margin: 0;
    padding: 0;
}

.univet-hero h1 {
    max-width: 830px;
    font-size: clamp(2.7rem, 7vw, 5.8rem);
}

.hero-admission-card {
    border-radius: 8px;
    padding: 30px;
    color: #173d30;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 30px 70px rgba(0, 0, 0, .18);
}

.hero-admission-card span {
    color: #0a7a52;
    font-weight: 900;
}

.hero-admission-card strong {
    display: block;
    margin: 12px 0 22px;
    font-size: 1.65rem;
    line-height: 1.35;
}

.hero-admission-card a,
.text-link {
    color: #0a7a52;
    font-weight: 900;
}

.feature-strip {
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin-top: -78px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(16, 51, 39, .16);
}

.feature-box {
    min-height: 155px;
    padding: 28px;
    color: #fff;
    background: #0a7a52;
}

.feature-box:nth-child(2) {
    background: #123c2d;
}

.feature-box:nth-child(3) {
    background: #d4a62d;
}

.feature-box span {
    display: block;
    opacity: .65;
    font-weight: 900;
}

.feature-box strong {
    display: block;
    margin: 8px 0 4px;
    font-size: 1.25rem;
}

.feature-box small {
    color: rgba(255, 255, 255, .85);
}

.about-band {
    background: #fff;
}

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: 44px;
}

.about-visual {
    min-height: 470px;
    border-radius: 8px;
    position: relative;
    background:
        linear-gradient(180deg, rgba(10, 122, 82, .08), rgba(10, 122, 82, .16)),
        url("../img/campus.svg") center / cover no-repeat;
}

.about-badge {
    position: absolute;
    inset-inline-start: 28px;
    bottom: 28px;
    width: 150px;
    height: 150px;
    display: grid;
    place-items: center;
    text-align: center;
    border-radius: 50%;
    color: #fff;
    background: #0a7a52;
    box-shadow: 0 18px 42px rgba(10, 122, 82, .28);
}

.about-badge strong {
    display: block;
    font-size: 2.4rem;
    line-height: 1;
}

.about-copy h2 {
    margin: 10px 0 16px;
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1.18;
}

.eyebrow.dark {
    color: #0a7a52;
}

.about-points {
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

.about-points span {
    padding-inline-start: 28px;
    position: relative;
    font-weight: 800;
}

.about-points span:before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: .75em;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d4a62d;
}

.section-title.centered {
    display: grid;
    justify-content: center;
    text-align: center;
}

.section-title.centered span {
    color: #0a7a52;
    font-weight: 900;
}

.course-grid .course-card,
.service-card,
.news-card {
    border: 0;
    padding: 30px;
}

.course-card {
    min-height: 260px;
}

.course-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    border-radius: 50%;
    color: #0a7a52;
    background: #e9f7f1;
    font-weight: 900;
    font-size: 1.3rem;
}

.service-band {
    background: #eef7f2;
}

.news-card .meta {
    color: #0a7a52;
    font-weight: 800;
}

.cta-band {
    margin-block: 26px 70px;
    padding: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, #0a7a52, #123c2d);
    box-shadow: 0 20px 52px rgba(10, 122, 82, .2);
}

.cta-band span {
    color: #ffe8a2;
    font-weight: 900;
}

.cta-band h2 {
    margin: 6px 0 0;
}

@media (max-width: 980px) {
    .public-topline-inner {
        justify-content: center;
        text-align: center;
    }

    .nav {
        top: 82px;
    }

    .univet-hero-grid,
    .about-grid {
        grid-template-columns: 1fr;
    }

    .hero-admission-card {
        max-width: 520px;
    }

    .feature-strip {
        grid-template-columns: 1fr;
        margin-top: 0;
    }

    .cta-band {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 580px) {
    .public-topline {
        display: none;
    }

    .univet-hero {
        min-height: 700px;
    }

    .univet-hero-grid {
        padding-block: 54px;
    }

    .about-visual {
        min-height: 330px;
    }
}
