@font-face {
    font-family: "Cairo";
    src: url("https://muzn.ly/medical/fonts/Cairo-VariableFont_slnt\,wght.ttf") format("truetype");
    font-weight: 100 700;
    font-style: normal;
}


:root {
    --bg: #F3F5F4;
    --bg-alt: #E7EDEA;
    --ink: #16262A;
    --ink-soft: #52686A;
    --teal: #FF9B51;
    --teal-dark: #25343F;
    --berry: #9C4058;
    --line: #D7DFDA;
    --white: #FFFFFF;
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Cairo', Arial, Helvetica, sans-serif;
    font-size: 15px;
}

h1,
h2,
h3 {
    font-weight: 500;
    color: var(--teal-dark);
    margin: 0 0 0.4em;
}

a {
    color: var(--teal);
}

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



.admin-main {
    flex: 1;
    padding: 34px 270px 34px 40px;
    width:100%;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 14px;
}

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 24px;
}

.card+.card {
    margin-top: 20px;
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
}

.stat-card .num {
    font-size: 2rem;
    color: var(--teal-dark);
}

.stat-card .lbl {
    font-size: 0.85rem;
    color: var(--ink-soft);
}

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

th,
td {
    text-align: right;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    font-size: 0.92rem;
}

th {
    color: var(--ink-soft);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

tr:last-child td {
    border-bottom: none;
}

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

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 700;
}

.badge-pending {
    background: #FCF1DB;
    color: #8A6416;
}

.badge-paid {
    background: #DEF0E1;
    color: #226B3A;
}

.badge-cancelled {
    background: rgba(255, 0, 0, .2);
    color: #ff0000;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 18px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
}

.btn-primary {
    background: var(--teal);
    color: #fff;
    stroke: #fff;
}

.btn-primary:hover {
    background: var(--teal-dark);
}

.btn-ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--ink);
    stroke: var(--ink);
}

.btn-ghost:hover {
    border-color: var(--teal);
    color: var(--teal);
    stroke: var(--teal);
}

.btn-danger {
    background: #ff0000;
    color: #fff;
}

.btn-sm {
    padding: 2px 12px;
    font-size: 0.82rem;
}

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.88rem;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.94rem;
    background: var(--bg);
}

.field textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.88rem;
    margin-bottom: 20px;
}

.alert-error {
    background: #FBE7E9;
    color: #8B2E3A;
    border: 1px solid #F1C2C9;
}

.alert-success {
    background: #E3F2E7;
    color: #22633B;
    border: 1px solid #B7DEC1;
}

.schedule-grid {
    display: grid;
    gap: 10px;
}

.schedule-row {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr auto;
    gap: 10px;
    align-items: center;
    background: var(--bg);
    padding: 10px;
    border-radius: var(--radius);
}

.schedule-row .rm {
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-bar input {
    flex: 1;
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-family: inherit;
}

.login-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg);
}

.login-card {
    width: 380px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 40px 36px;
}

.login-card .logo {
    display: flex;
    justify-content: center;
    padding-bottom: 32px;
}

.login-card .logo img {
    width: 96px;
}

.empty-note {
    color: var(--ink-soft);
    padding: 30px 0;
    text-align: center;
}

@media (max-width: 860px) {
    .admin-shell {
        flex-direction: column;
    }

    .admin-main {
        padding: 22px 18px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .schedule-row {
        grid-template-columns: 1fr 1fr;
    }
}