/* ================================================
   AMIS - Unified Stylesheet
   الملف الموحد لجميع صفحات نظام أميس
   ================================================ */

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

/* ================================================
   1. CSS Variables
   ================================================ */
:root {
    --primary: #1a3a6b;
    --primary-light: #2456a4;
    --accent: #00b4d8;
    --green: #2d9e5f;
    --green-dark: #1e7a47;
    --green-light: #e6f7ed;
    --green-border: #a3d9b8;
    --danger: #e63946;
    --danger-light: #fff0f0;
    --danger-border: #f5c0c0;
    --warning-bg: #fff8e1;
    --warning-border: #ffe082;
    --warning-light: #fffbeb;
    --warning-text: #7a5c00;
    --bg: #eef3fa;
    --card-bg: #ffffff;
    --border: #d0dff0;
    --text: #1a2640;
    --text-muted: #5a7090;
    --shadow: 0 8px 40px rgba(26,58,107,0.13);
    --radius: 20px;
}

/* ================================================
   2. Page Wrappers
   ================================================ */
.tl-page, .mr-page, .fr-page, .af-page, .fs-page, .sc-page {
    font-family: 'Cairo', sans-serif;
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    direction: rtl;
    padding: 0;
}

.tl-wrapper {
    width: 100%;
    max-width: 900px;
    padding: 24px 16px 40px;
}

.mr-wrapper {
    width: 100%;
    max-width: 960px;
    padding: 24px 16px 40px;
}

.fr-wrapper {
    width: 100%;
    max-width: 860px;
    padding: 24px 16px 40px;
}

.af-wrapper {
    width: 100%;
    max-width: 600px;
    padding: 24px 16px 40px;
}

.fs-wrapper {
    width: 100%;
    max-width: 960px;
    padding: 24px 16px 40px;
}

.sc-wrapper {
    width: 100%;
    max-width: 960px;
    padding: 24px 16px 40px;
}

/* ================================================
   3. Headers
   ================================================ */

/* Blue Header (default) */
.tl-header, .mr-header, .fr-header, .af-header, .fs-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 70%, #1a7fc1 100%);
    border-radius: var(--radius);
    padding: 32px 28px;
    margin-bottom: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 30px rgba(26,58,107,0.25);
}

/* Green Header (success page) */
.sc-header {
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 60%, #4dd68c 100%);
    border-radius: var(--radius);
    padding: 36px 28px;
    margin-bottom: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 30px rgba(45,158,95,0.3);
}

    /* Shared radial overlay */
    .tl-header::before, .mr-header::before, .fr-header::before,
    .af-header::before, .fs-header::before, .sc-header::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.07) 0%, transparent 60%);
        pointer-events: none;
    }

/* Header icon */
.header-icon {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 26px;
}

/* Success icon (larger, animated) */
.success-icon {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.15);
    border: 3px solid rgba(255,255,255,0.35);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 36px;
    animation: popIn 0.5s cubic-bezier(.22,1,.36,1) both;
}

@keyframes popIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Header titles */
.tl-header h1, .mr-header h1, .fr-header h1,
.af-header h1, .fs-header h1, .sc-header h1 {
    color: #fff;
    font-size: 20px;
    font-weight: 900;
    margin: 0 0 6px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.sc-header h1 {
    font-size: 22px;
    margin-bottom: 8px;
}

/* Header subtitles */
.tl-header p, .mr-header p, .fr-header p,
.af-header p, .fs-header p, .sc-header p {
    color: rgba(255,255,255,0.82);
    font-size: 13px;
    margin: 0;
}

.sc-header p {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255,255,255,0.88);
}

/* ================================================
   4. Grids
   ================================================ */
.tl-grid, .mr-grid, .fs-grid, .sc-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.af-two-col {
    display: grid;
    gap: 20px;
}

@media (min-width: 700px) {
    .tl-grid, .mr-grid, .fs-grid, .sc-grid {
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
    }

    .af-wrapper {
        max-width: 900px;
    }

    .af-two-col {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

/* ================================================
   5. Cards
   ================================================ */
.tl-card, .mr-card, .fr-card, .af-card, .fs-card, .sc-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 24px;
}

.fr-card, .af-card {
    margin-bottom: 20px;
}

    .af-card.overflow {
        overflow-x: auto;
    }

    /* Table card always scrollable on mobile */
    .af-card:has(.af-table) {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

.card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 1px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .card-title::after {
        content: '';
        flex: 1;
        height: 1px;
        background: var(--border);
    }

/* ================================================
   6. Form Fields
   ================================================ */
.field-group {
    margin-bottom: 16px;
}

    .field-group label {
        display: block;
        font-size: 12px;
        font-weight: 600;
        color: var(--text-muted);
        margin-bottom: 7px;
    }

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

    .input-wrap .field-icon {
        position: absolute;
        right: 13px;
        color: var(--primary-light);
        font-size: 16px;
        pointer-events: none;
        z-index: 1;
    }

    .input-wrap .form-control,
    .input-wrap select.form-control,
    .input-wrap input {
        font-family: 'Cairo', sans-serif;
        padding: 12px 42px 12px 16px;
        border: 1.5px solid var(--border);
        border-radius: 12px;
        font-size: 14px;
        color: var(--text);
        background: #f8fafd;
        width: 100%;
        transition: border-color 0.2s, box-shadow 0.2s;
        text-align: right;
        direction: rtl;
        appearance: none;
    }

        .input-wrap .form-control:focus,
        .input-wrap select.form-control:focus,
        .input-wrap input:focus {
            border-color: var(--accent);
            background: #fff;
            box-shadow: 0 0 0 3px rgba(0,180,216,0.12);
            outline: none;
        }

        .input-wrap .form-control::placeholder,
        .input-wrap input::placeholder {
            color: #aab8cc;
        }

        .input-wrap .form-control:disabled,
        .input-wrap input:disabled {
            background: #f0f4f8;
            color: #8a9db5;
            cursor: not-allowed;
        }

textarea.form-control {
    font-family: 'Cairo', sans-serif;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    color: var(--text);
    background: #f8fafd;
    width: 100%;
    resize: vertical;
    min-height: 90px;
    direction: rtl;
    text-align: right;
    transition: border-color 0.2s, box-shadow 0.2s;
}

    textarea.form-control:focus {
        border-color: var(--accent);
        background: #fff;
        box-shadow: 0 0 0 3px rgba(0,180,216,0.12);
        outline: none;
    }

/* Delivery select wrapper */
.delivery-select-wrap {
    position: relative;
}

    .delivery-select-wrap .field-icon {
        position: absolute;
        right: 13px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--primary-light);
        font-size: 16px;
        pointer-events: none;
        z-index: 1;
    }

    .delivery-select-wrap select {
        font-family: 'Cairo', sans-serif;
        padding: 13px 42px 13px 16px;
        border: 1.5px solid var(--border);
        border-radius: 12px;
        font-size: 14px;
        color: var(--text);
        background: #f8fafd;
        width: 100%;
        transition: border-color 0.2s, box-shadow 0.2s;
        text-align: right;
        direction: rtl;
        appearance: none;
        cursor: pointer;
    }

        .delivery-select-wrap select:focus {
            border-color: var(--accent);
            background: #fff;
            box-shadow: 0 0 0 3px rgba(0,180,216,0.12);
            outline: none;
        }

/* ================================================
   7. Buttons
   ================================================ */
.tl-btn, .mr-btn, .fr-btn, .af-btn, .fs-btn, .home-btn {
    border: none;
    border-radius: 12px;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, filter 0.15s, box-shadow 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Sizes */
.tl-btn, .mr-btn {
    width: 100%;
    padding: 13px;
    font-size: 14px;
    margin-bottom: 12px;
}

.fr-btn, .af-btn, .fs-btn {
    flex: 1;
    padding: 13px;
    font-size: 14px;
}

.home-btn {
    width: 100%;
    padding: 14px;
    font-size: 15px;
}

    /* Active press */
    .tl-btn:active, .mr-btn:active, .fr-btn:active,
    .af-btn:active, .fs-btn:active, .home-btn:active {
        transform: scale(0.98);
    }

/* Disabled */
.af-btn:disabled, .fs-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Primary (blue gradient) */
.tl-btn-primary, .mr-btn-primary, .fr-btn-primary,
.af-btn-primary, .fs-btn-primary, .home-btn {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: #fff;
    box-shadow: 0 4px 16px rgba(26,58,107,0.28);
}

    .tl-btn-primary:hover, .mr-btn-primary:hover, .fr-btn-primary:hover,
    .af-btn-primary:hover, .home-btn:hover,
    .fs-btn-primary:hover:not(:disabled) {
        filter: brightness(1.08);
        box-shadow: 0 6px 22px rgba(26,58,107,0.38);
    }

/* Green */
.tl-btn-success, .fr-btn-success, .af-btn-green {
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: #fff;
    box-shadow: 0 4px 16px rgba(45,158,95,0.28);
}

    .tl-btn-success:hover, .fr-btn-success:hover, .af-btn-green:hover {
        filter: brightness(1.08);
        box-shadow: 0 6px 22px rgba(45,158,95,0.38);
    }

/* Outline */
.af-btn-outline, .fs-btn-outline {
    background: #fff;
    color: var(--primary-light);
    border: 1.5px solid var(--border);
    box-shadow: none;
}

.fs-btn-outline {
    flex: 0 0 auto;
    padding: 13px 20px;
    color: var(--text-muted);
}

    .af-btn-outline:hover, .fs-btn-outline:hover {
        background: #eef5ff;
        border-color: var(--primary-light);
        color: var(--primary-light);
    }

/* Button row */
.btn-row {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

@media (max-width: 500px) {
    .btn-row {
        flex-direction: column;
    }
}

/* ================================================
   8. Alerts
   ================================================ */
.tl-alert, .mr-alert-danger, .fr-alert-danger,
.af-alert-danger, .fs-alert-danger {
    background: var(--danger-light);
    border: 1.5px solid var(--danger-border);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--danger);
    font-size: 13px;
    font-weight: 600;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fr-alert-danger {
    margin-top: 0;
    margin-bottom: 16px;
}

.mr-alert-warning, .fr-alert-warning, .af-alert-warning,
.fs-alert-warning, .af-alert-warning {
    background: var(--warning-bg);
    border: 1.5px solid var(--warning-border);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--warning-text);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.af-alert-info {
    background: #e8f7ff;
    border: 1.5px solid #b3e4f7;
    border-radius: 10px;
    padding: 12px 16px;
    color: #0077aa;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ================================================
   9. Spinner
   ================================================ */
.tl-spinner, .mr-spinner, .af-spinner, .fs-spinner {
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 12px 0;
}

    .tl-spinner span, .mr-spinner span, .af-spinner span, .fs-spinner span {
        width: 6px;
        height: 28px;
        background: var(--primary-light);
        border-radius: 4px;
        display: inline-block;
        animation: spinnerAnim 1.2s infinite ease-in-out;
    }

        .tl-spinner span:nth-child(2), .mr-spinner span:nth-child(2),
        .af-spinner span:nth-child(2), .fs-spinner span:nth-child(2) {
            animation-delay: -1.1s;
        }

        .tl-spinner span:nth-child(3), .mr-spinner span:nth-child(3),
        .af-spinner span:nth-child(3), .fs-spinner span:nth-child(3) {
            animation-delay: -1.0s;
        }

        .tl-spinner span:nth-child(4), .mr-spinner span:nth-child(4),
        .af-spinner span:nth-child(4), .fs-spinner span:nth-child(4) {
            animation-delay: -0.9s;
        }

        .tl-spinner span:nth-child(5), .mr-spinner span:nth-child(5),
        .af-spinner span:nth-child(5), .fs-spinner span:nth-child(5) {
            animation-delay: -0.8s;
        }

@keyframes spinnerAnim {
    0%, 40%, 100% {
        transform: scaleY(0.4);
        opacity: 0.4;
    }

    20% {
        transform: scaleY(1);
        opacity: 1;
    }
}

/* ================================================
   10. Info Boxes
   ================================================ */
.info-box, .info-notes, .review-notice {
    background: linear-gradient(135deg, #eef5ff, #f0faff);
    border: 1px solid #c8dff5;
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

    .info-box::before, .info-notes::before, .review-notice::before {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: linear-gradient(to bottom, var(--accent), var(--primary-light));
        border-radius: 0 14px 14px 0;
    }

    .info-box p, .info-notes p, .review-notice p {
        font-size: 13px;
        font-weight: 500;
        color: #2d4060;
        margin: 0 0 8px;
        line-height: 1.8;
    }

        .info-box p:last-child,
        .info-notes p:last-child,
        .review-notice p:last-child {
            margin-bottom: 0;
        }

    .info-box .highlight {
        color: var(--primary-light);
        font-weight: 700;
    }

    .info-notes p {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        line-height: 1.7;
        margin-bottom: 6px;
    }

        .info-notes p i {
            color: var(--accent);
            font-size: 13px;
            margin-top: 3px;
            flex-shrink: 0;
        }

/* Inline note (right-bordered) */
.af-note {
    background: #f0f7ff;
    border-right: 3px solid var(--accent);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

    .af-note i {
        color: var(--accent);
        margin-top: 1px;
        flex-shrink: 0;
    }

/* ================================================
   11. Total Badges
   ================================================ */

/* Gradient badge (used in followers/finalize pages) */
.total-badge {
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0,180,216,0.2);
}

    .total-badge .total-label {
        color: rgba(255,255,255,0.9);
        font-size: 13px;
        font-weight: 600;
    }

    .total-badge .total-amount {
        color: #fff;
        font-size: 22px;
        font-weight: 900;
        direction: ltr;
    }

    .total-badge .total-currency {
        color: rgba(255,255,255,0.85);
        font-size: 13px;
        font-weight: 600;
        margin-right: 4px;
    }

/* Subtle box (used in summary sections) */
.total-box {
    background: linear-gradient(135deg, #eef5ff, #f0faff);
    border: 1px solid #c8dff5;
    border-radius: 14px;
    padding: 16px 20px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

    .total-box .total-label {
        font-size: 14px;
        font-weight: 600;
        color: var(--text-muted);
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .total-box .total-amount {
        font-size: 20px;
        font-weight: 900;
        color: var(--primary);
    }

        .total-box .total-amount span {
            font-size: 13px;
            font-weight: 600;
            color: var(--text-muted);
            margin-right: 4px;
        }

/* ================================================
   12. Section Divider
   ================================================ */
.section-divider {
    height: 1px;
    background: var(--border);
    margin: 20px 0;
}

/* ================================================
   13. Upload Area
   ================================================ */
.upload-area {
    border: 1.5px dashed var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    background: #f8fafd;
    margin-bottom: 12px;
    transition: border-color 0.2s;
    cursor: pointer;
}

    .upload-area:hover {
        border-color: var(--accent);
    }

    .upload-area .upload-label {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 13px;
        font-weight: 600;
        color: var(--text-muted);
        margin-bottom: 8px;
    }

        .upload-area .upload-label i {
            color: var(--primary-light);
            font-size: 16px;
        }

    .upload-area .upload-success {
        font-size: 12px;
        font-weight: 700;
        color: var(--green);
        margin-bottom: 6px;
    }

    .upload-area .form-control {
        border: none;
        background: transparent;
        padding: 0;
        font-size: 13px;
    }

/* ================================================
   14. Error List
   ================================================ */
.error-list {
    background: var(--danger-light);
    border: 1.5px solid var(--danger-border);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

    .error-list h6 {
        color: var(--danger);
        font-size: 13px;
        font-weight: 700;
        margin-bottom: 6px;
    }

    .error-list li {
        color: var(--danger);
        font-size: 12px;
    }

/* ================================================
   15. Checkboxes
   ================================================ */

/* Standard check row */
.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f8fafd;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

    .check-row:hover {
        border-color: var(--accent);
        background: #f0faff;
    }

    .check-row input[type="checkbox"] {
        width: 17px;
        height: 17px;
        accent-color: var(--primary-light);
        cursor: pointer;
        flex-shrink: 0;
    }

    .check-row label {
        font-size: 13px;
        font-weight: 600;
        color: var(--text);
        cursor: pointer;
        margin: 0;
        flex: 1;
    }

    .check-row .info-icon {
        color: var(--primary-light);
        font-size: 16px;
        cursor: pointer;
        flex-shrink: 0;
    }

/* Checkbox inside table */
.check-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .check-cell input[type="checkbox"] {
        width: 16px;
        height: 16px;
        accent-color: var(--primary-light);
        cursor: pointer;
    }

    .check-cell .info-icon {
        color: var(--accent);
        font-size: 15px;
        cursor: pointer;
        transition: color 0.2s;
    }

        .check-cell .info-icon:hover {
            color: var(--primary-light);
        }

/* National ID + Newborn row */
.nid-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .nid-row .input-wrap {
        flex: 1;
    }

.newborn-check {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f8fafd;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: border-color 0.2s, background 0.2s;
}

    .newborn-check:hover {
        border-color: var(--accent);
        background: #f0faff;
    }

    .newborn-check input[type="checkbox"] {
        width: 15px;
        height: 15px;
        accent-color: var(--primary-light);
        cursor: pointer;
    }

    .newborn-check label {
        font-size: 12px;
        font-weight: 600;
        color: var(--text);
        cursor: pointer;
        margin: 0;
    }

/* ================================================
   16. Tables
   ================================================ */

/* Standard data table */
.fr-table, .summary-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
}

.summary-table {
    margin-bottom: 20px;
}

    .fr-table thead tr th,
    .summary-table thead tr th {
        background: #f0f5fb;
        color: var(--primary);
        font-weight: 700;
        font-size: 12px;
        padding: 10px 14px;
        border-bottom: 2px solid var(--border);
        text-align: right;
        white-space: nowrap;
    }

        .fr-table thead tr th:first-child,
        .summary-table thead tr th:first-child {
            border-radius: 12px 0 0 0;
        }

        .fr-table thead tr th:last-child,
        .summary-table thead tr th:last-child {
            border-radius: 0 12px 0 0;
        }

.fr-table tbody tr {
    transition: background 0.15s;
}

    .fr-table tbody tr:hover {
        background: #f8fafd;
    }

    .fr-table tbody tr td,
    .summary-table tbody tr td {
        padding: 12px 14px;
        border-bottom: 1px solid var(--border);
        color: var(--text);
        vertical-align: middle;
    }

.summary-table tbody tr td {
    font-weight: 600;
}

.fr-table tbody tr:last-child td,
.summary-table tbody tr:last-child td {
    border-bottom: none;
}

.summary-table .total-cell {
    color: var(--primary);
    font-weight: 900;
    font-size: 15px;
}

/* Status-colored table rows (for letter list) */
.af-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    min-width: 560px;
}

    .af-table thead th {
        font-size: 11px;
        font-weight: 700;
        color: var(--text-muted);
        padding: 6px 12px;
        text-align: center;
        border-bottom: 1.5px solid var(--border);
        white-space: nowrap;
    }

    .af-table tbody tr {
        border-radius: 10px;
        transition: background 0.15s;
    }

        .af-table tbody tr:hover {
            background: #eef5ff;
        }

    .af-table tbody td {
        padding: 11px 12px;
        font-size: 13px;
        font-weight: 600;
        color: var(--text);
        vertical-align: middle;
        text-align: center;
        border-top: 1px solid transparent;
        border-bottom: 1px solid transparent;
    }

        /* RTL: first child = right edge, last = left edge */
        .af-table tbody td:first-child {
            border-right-width: 1px;
            border-right-style: solid;
            border-radius: 0 10px 10px 0;
        }

        .af-table tbody td:last-child {
            border-left-width: 1px;
            border-left-style: solid;
            border-radius: 10px 0 0 10px;
        }

/* Row color variants */
.row-sent td {
    background: var(--green-light);
    border-color: var(--green-border) !important;
}

.row-cancelled td {
    background: var(--danger-light);
    border-color: var(--danger-border) !important;
}

.row-pending td {
    background: var(--warning-light);
    border-color: #fde68a !important;
}

/* Status badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

    .status-badge.sent {
        background: #c6f0d8;
        color: #1a6b3c;
    }

    .status-badge.cancelled {
        background: #fdd;
        color: var(--danger);
    }

    .status-badge.pending,
    .status-badge.ready {
        background: #fef3c7;
        color: #92400e;
    }

/* Action links inside table */
.af-action-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: filter 0.15s;
    border: none;
    background: none;
}

    .af-action-link.download {
        background: var(--green-light);
        color: var(--green);
        border: 1.5px solid var(--green-border);
    }

    .af-action-link.pay {
        background: #e8f4ff;
        color: var(--primary-light);
        border: 1.5px solid var(--border);
    }

        .af-action-link.download:hover,
        .af-action-link.pay:hover {
            filter: brightness(0.95);
            text-decoration: none;
        }

/* Delete button */
.btn-delete {
    background: none;
    border: 1.5px solid var(--danger-border);
    color: var(--danger);
    border-radius: 8px;
    padding: 5px 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

    .btn-delete:hover {
        background: var(--danger);
        color: #fff;
    }

/* Info icon */
.info-icon {
    color: var(--accent);
    font-size: 15px;
    cursor: pointer;
    margin-left: 4px;
}

/* Tooltip */
.viewMassage {
    display: none;
    position: absolute;
    top: 110%;
    right: 0;
    z-index: 9999;
    background: var(--primary);
    color: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 14px 16px;
    min-width: 220px;
    font-size: 12px;
    font-weight: 600;
}

    .viewMassage .close-msg {
        position: absolute;
        top: 8px;
        left: 10px;
        cursor: pointer;
        color: rgba(255,255,255,0.7);
        font-size: 16px;
    }

        .viewMassage .close-msg:hover {
            color: #fff;
        }

/* Last update bar */
.last-update {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #f8fafd;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 4px;
}

    .last-update i {
        color: var(--accent);
    }

/* ================================================
   17. Modal
   ================================================ */
.af-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26,58,107,0.35);
    backdrop-filter: blur(3px);
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto; /* ← scroll if content is taller than screen */
}

.af-modal {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(26,58,107,0.25);
    width: 100%;
    max-width: 420px;
    direction: rtl;
    overflow: hidden;
    animation: modalIn 0.2s ease;
    /* never exceed screen height */
    max-height: calc(100dvh - 32px);
    display: flex;
    flex-direction: column;
}

@keyframes modalIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.af-modal-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0; /* header never shrinks */
}

    .af-modal-header h5 {
        color: #fff;
        font-size: 15px;
        font-weight: 800;
        margin: 0;
    }

    .af-modal-header .close-btn {
        background: rgba(255,255,255,0.15);
        border: none;
        color: #fff;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        font-size: 14px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.15s;
    }

        .af-modal-header .close-btn:hover {
            background: rgba(255,255,255,0.3);
        }

.af-modal-body {
    padding: 22px;
    font-size: 14px;
    color: var(--text);
    line-height: 1.8;
    overflow-y: auto; /* ← body scrolls if content is tall */
    -webkit-overflow-scrolling: touch;
}

    .af-modal-body .price-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: #f8fafd;
        border: 1.5px solid var(--border);
        border-radius: 10px;
        padding: 10px 14px;
        margin-bottom: 10px;
    }

        .af-modal-body .price-row .pr-label {
            font-size: 12px;
            font-weight: 600;
            color: var(--text-muted);
        }

        .af-modal-body .price-row .pr-value {
            font-size: 18px;
            font-weight: 900;
            color: var(--primary);
        }

    .af-modal-body .modal-note {
        font-size: 12px;
        color: var(--text-muted);
        background: #f0f7ff;
        border-right: 3px solid var(--accent);
        border-radius: 8px;
        padding: 10px 12px;
        margin-top: 10px;
    }

.af-modal-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-start;
    flex-shrink: 0; /* footer never shrinks */
}

/* ================================================
   18. Misc Components
   ================================================ */

/* Counter badge (shown in header) */
.counter-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.18);
    border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: 30px;
    padding: 6px 18px;
    margin-top: 14px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

    .counter-badge .count-num {
        background: #fff;
        color: var(--primary);
        border-radius: 50%;
        width: 26px;
        height: 26px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        font-weight: 900;
    }

/* Services toggle */
.services-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.services-header-text p {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 2px;
    line-height: 1.5;
}

.services-header-text small {
    font-size: 11px;
    color: var(--text-muted);
}

.toggle-btn {
    background: #eef5ff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    color: var(--primary-light);
    font-size: 13px;
    flex-shrink: 0;
    transition: background 0.2s;
}

    .toggle-btn:hover {
        background: #dceeff;
    }

/* Delivery note */
.delivery-note {
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--warning-text);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.7;
}

    .delivery-note i {
        color: #e8a000;
        margin-top: 2px;
        flex-shrink: 0;
    }

/* Phone links */
.phone-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.phone-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eef5ff;
    color: var(--primary-light);
    border: 1px solid #c8dff5;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

    .phone-link:hover {
        background: #dceeff;
        border-color: var(--primary-light);
        color: var(--primary);
        text-decoration: none;
    }

/* Side image */
.side-image {
    width: 100%;
    border-radius: 16px;
    object-fit: cover;
    max-height: 480px;
}

/* Image panel (card-style) */
.af-image-panel {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px
}

    .af-image-panel img {
        width: 100%;
        display: block;
        object-fit: cover;
    }

/* Empty state */
.empty-state, .af-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-muted);
}

    .empty-state i, .af-empty i {
        font-size: 40px;
        margin-bottom: 12px;
        color: #c8dff5;
        display: block;
        opacity: 0.5;
    }

    .empty-state p, .af-empty p {
        font-size: 14px;
        font-weight: 600;
    }

/* Recent logins */
.recent-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .recent-title::before, .recent-title::after {
        content: '';
        flex: 1;
        height: 1px;
        background: var(--border);
    }

.recent-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.recent-item {
    position: relative;
    background: #f8fafd;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .recent-item:hover {
        border-color: var(--accent);
        background: #f0faff;
        box-shadow: 0 2px 10px rgba(0,180,216,0.1);
    }

    .recent-item .recent-name {
        font-size: 13px;
        font-weight: 600;
        color: var(--text);
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .recent-item .delete-btn {
        background: none;
        border: none;
        color: #b0bec5;
        cursor: pointer;
        font-size: 13px;
        padding: 2px 4px;
        border-radius: 6px;
        transition: color 0.2s, background 0.2s;
        flex-shrink: 0;
    }

        .recent-item .delete-btn:hover {
            color: var(--danger);
            background: var(--danger-light);
        }

/* Utility */
.text-light-white {
    color: #fff;
}

/* ================================================
   19. Registration Page
   ================================================ */

/* Success alert (green) */
.tl-alert-success {
    background: #f0fdf4;
    border: 1.5px solid var(--green-border);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--green-dark);
    font-size: 13px;
    font-weight: 600;
    margin-top: 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.7;
}

    .tl-alert-success i {
        color: var(--green);
        flex-shrink: 0;
        margin-top: 2px;
    }

/* Redirect note inside error alert */
.tl-redirect-note {
    font-size: 12px;
    font-weight: 500;
    color: var(--primary);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--danger-border);
    line-height: 1.8;
}

    .tl-redirect-note a {
        color: var(--primary-light);
        font-weight: 700;
        text-decoration: underline;
    }

        .tl-redirect-note a:hover {
            color: var(--accent);
        }

/* Image panel — stretch to card height on desktop */
.tl-img-panel {
    margin-bottom: 0;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px
}

    .tl-img-panel img {
        min-height: 200px;
        object-fit: cover;
    }

/* ================================================
   20. Requests Login Page — Docs List
   ================================================ */

.rl-docs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 4px;
}

.rl-doc-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #f8fafd;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.6;
    transition: border-color 0.2s, background 0.2s;
}

    .rl-doc-item:hover {
        border-color: var(--accent);
        background: #f0faff;
    }

.rl-doc-num {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 900;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ================================================
   22. Branches Page
   ================================================ */

.branch-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 700px) {
    .branch-card {
        flex-direction: row;
        align-items: stretch;
        gap: 20px;
    }

    .branch-info {
        flex: 1 1 55%;
    }

    .branch-map {
        flex: 1 1 45%;
    }
}

.branch-info {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.branch-num {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    color: #fff;
    border-radius: 50%;
    font-size: 15px;
    font-weight: 900;
    font-family: 'Cairo', sans-serif;
    flex-shrink: 0;
    margin-top: 3px;
}

.branch-details {
    flex: 1;
}

.branch-title {
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
    line-height: 1.5;
}

.branch-address {
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 7px;
}

    .branch-address i {
        color: var(--accent);
        font-size: 13px;
        margin-top: 4px;
        flex-shrink: 0;
    }

.branch-map {
    display: flex;
    align-items: stretch;
}

    .branch-map iframe {
        border-radius: 12px;
        display: block;
        width: 100%;
        min-height: 180px;
        flex: 1;
    }

/* ================================================
   23. Medical Network Search Page (mn-)
   ================================================ */

:root {
    --n0: #0b1e35;
    --n1: #0f2d50;
    --n2: #174a80;
    --n3: #1e6fbe;
    --n4: #2e87d4;
    --n5: #4da3e8;
    --n6: #80bff0;
    --n7: #b8d9f7;
    --n8: #e6f2fc;
    --amis-bg: #f2f7fc;
    --amis-text: #0b1e35;
    --amis-muted: #4a6a8a;
}

.mn-page, .mn-page *, .mn-page *::before, .mn-page *::after {
    box-sizing: border-box;
    font-family: 'Cairo', 'Segoe UI', sans-serif;
}

.mn-page {
    direction: rtl;
    background: var(--amis-bg);
    min-height: 100vh;
    padding-bottom: 60px;
}

/* Hero */
.mn-hero {
    background: linear-gradient(145deg, var(--n0) 0%, var(--n1) 45%, var(--n2) 80%, var(--n3) 100%);
    padding: 32px 24px 84px;
    position: relative;
    overflow: hidden;
}

.mn-hero-deco {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

    .mn-hero-deco span {
        position: absolute;
        border-radius: 50%;
    }

.mhd1 {
    width: 460px;
    height: 460px;
    top: -170px;
    left: -130px;
    border: 1px solid rgba(255,255,255,.05);
}

.mhd2 {
    width: 260px;
    height: 260px;
    bottom: -80px;
    right: 4%;
    background: rgba(77,163,232,.07);
}

.mhd3 {
    width: 90px;
    height: 90px;
    top: 18%;
    right: 18%;
    background: rgba(255,255,255,.04);
}

.mn-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.mn-hero-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .mn-hero-logo img {
        height: 42px;
        filter: brightness(0) invert(1);
        object-fit: contain;
    }

.mn-hero-logo-txt {
    font-size: 1.4rem;
    font-weight: 900;
    color: #fff;
}

    .mn-hero-logo-txt em {
        color: var(--n5);
        font-style: normal;
    }

.mn-hero-sep {
    width: 1px;
    height: 34px;
    background: rgba(255,255,255,.2);
    margin: 0 4px;
}

.mn-hero-title {
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255,255,255,.85);
}

.mn-hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 52px;
    background: var(--amis-bg);
    clip-path: ellipse(54% 100% at 50% 100%);
}

/* Main card */
.mn-wrap {
    max-width: 1120px;
    margin: -40px auto 0;
    padding: 0 20px;
    position: relative;
    z-index: 3;
}

.mn-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(11,30,53,.1);
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0,1fr) 360px;
    min-height: 560px;
}

/* Search side */
.mn-search-side {
    padding: 36px 40px 40px;
}

.mn-form-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--n8);
    color: var(--n3);
    font-size: .75rem;
    font-weight: 700;
    padding: 4px 13px;
    border-radius: 50px;
    margin-bottom: 10px;
}

.mn-form-head h2 {
    font-size: 1.45rem;
    font-weight: 900;
    color: var(--n0);
    margin: 0 0 5px;
}

.mn-form-head p {
    font-size: .86rem;
    color: var(--amis-muted);
    margin: 0 0 26px;
}

/* Filter fields */
.mf-group {
    margin-bottom: 16px;
}

.mf-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .78rem;
    font-weight: 700;
    color: var(--n1);
    margin-bottom: 6px;
}

    .mf-label i {
        color: var(--n3);
        font-size: .82rem;
        width: 15px;
        text-align: center;
    }

.mf-select, .mf-input {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid var(--n8);
    border-radius: 10px;
    font-family: 'Cairo', sans-serif;
    font-size: .88rem;
    color: var(--amis-text);
    background: var(--amis-bg);
    transition: border-color .22s, box-shadow .22s;
    outline: none;
    direction: rtl;
}

    .mf-select:focus, .mf-input:focus {
        border-color: var(--n4);
        box-shadow: 0 0 0 3px rgba(46,135,212,.12);
        background: #fff;
    }

    .mf-select:disabled {
        opacity: .55;
        cursor: not-allowed;
    }

.mf-search-wrap {
    position: relative;
}

    .mf-search-wrap .mf-input {
        padding-left: 40px;
    }

    .mf-search-wrap .mf-search-icon {
        position: absolute;
        top: 50%;
        left: 13px;
        transform: translateY(-50%);
        color: var(--n4);
        font-size: .9rem;
        pointer-events: none;
    }

/* Autocomplete */
.mf-autocomplete {
    border: 1.5px solid var(--n7);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(11,30,53,.1);
    margin-top: 6px;
    max-height: 280px;
    overflow-y: auto;
    background: #fff;
    position: relative;
}

.mf-autocomplete-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    background: var(--n8);
    border-bottom: 1px solid var(--n7);
    font-size: .78rem;
    font-weight: 700;
    color: var(--n2);
}

    .mf-autocomplete-head button {
        background: none;
        border: none;
        cursor: pointer;
        color: var(--n3);
        font-size: .85rem;
        padding: 0;
        transition: color .2s;
    }

        .mf-autocomplete-head button:hover {
            color: var(--n1);
        }

.mf-result-item {
    padding: 10px 14px;
    border-bottom: 1px solid var(--n8);
    cursor: pointer;
    transition: background .18s;
}

    .mf-result-item:last-child {
        border-bottom: none;
    }

    .mf-result-item:hover {
        background: var(--n8);
    }

.mf-result-name {
    font-size: .88rem;
    font-weight: 700;
    color: var(--n1);
}

.mf-result-addr {
    font-size: .75rem;
    color: var(--amis-muted);
    margin-top: 2px;
}

/* Submit button */
.mf-submit {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--n2), var(--n3));
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: 'Cairo', sans-serif;
    font-size: .98rem;
    font-weight: 900;
    cursor: pointer;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    box-shadow: 0 6px 20px rgba(30,111,190,.28);
    transition: all .26s ease;
}

    .mf-submit:hover {
        background: linear-gradient(135deg, var(--n1), var(--n2));
        transform: translateY(-2px);
        box-shadow: 0 10px 28px rgba(30,111,190,.34);
    }

/* Alert */
.mf-alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: .84rem;
    margin-top: 14px;
    background: #fff9e6;
    border: 1.5px solid #ffe69c;
    color: #664d03;
}

/* Right panel */
.mn-panel {
    background: linear-gradient(155deg, var(--n0) 0%, var(--n1) 35%, var(--n2) 70%, var(--n3) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 40px 28px 36px;
    position: relative;
    overflow: hidden;
}

    .mn-panel::before {
        content: '';
        position: absolute;
        width: 320px;
        height: 320px;
        border-radius: 50%;
        top: -90px;
        right: -70px;
        border: 1px solid rgba(255,255,255,.06);
    }

    .mn-panel::after {
        content: '';
        position: absolute;
        width: 200px;
        height: 200px;
        border-radius: 50%;
        bottom: -55px;
        left: -35px;
        background: rgba(77,163,232,.08);
    }

.mn-panel-brand {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 22px;
}

.mn-panel-brand-txt {
    font-size: 1.3rem;
    font-weight: 900;
    color: #fff;
}

    .mn-panel-brand-txt em {
        color: var(--n5);
        font-style: normal;
    }

.mn-panel-brand-sub {
    font-size: .72rem;
    color: rgba(255,255,255,.55);
    margin-top: 3px;
}

.mn-panel img {
    width: 100%;
    max-width: 280px;
    border-radius: 16px;
    position: relative;
    z-index: 1;
    box-shadow: 0 16px 48px rgba(0,0,0,.3);
    margin-bottom: 24px;
}

.mn-panel-tips {
    position: relative;
    z-index: 1;
    width: 100%;
}

.mn-panel-tips-title {
    font-size: .72rem;
    color: rgba(255,255,255,.5);
    letter-spacing: .5px;
    margin-bottom: 10px;
    font-weight: 700;
}

.mn-tip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 13px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 10px;
    margin-bottom: 8px;
}

    .mn-tip i {
        color: var(--n5);
        font-size: .95rem;
        margin-top: 2px;
        flex-shrink: 0;
    }

.mn-tip-txt {
    font-size: .8rem;
    color: rgba(255,255,255,.78);
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 920px) {
    .mn-card {
        grid-template-columns: 1fr;
    }

    .mn-panel {
        display: none;
    }

    .mn-search-side {
        padding: 28px 22px;
    }
}

@media (max-width: 480px) {
    .mn-search-side {
        padding: 20px 15px;
    }

    .mn-wrap {
        padding: 0 12px;
    }
}

/* ================================================
   24. Medical Network — tl-page style components
   ================================================ */

/* Autocomplete box */
.mn-autocomplete-box {
    border: 1.5px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(26,58,107,0.1);
    margin-top: 8px;
    max-height: 280px;
    overflow-y: auto;
    background: #fff;
}

.mn-autocomplete-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    background: #f0f5fb;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
}

.mn-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-light);
    font-size: 12px;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    padding: 0;
    transition: color 0.2s;
}

    .mn-close-btn:hover {
        color: var(--danger);
    }

.mn-result-item {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f5fb;
    cursor: pointer;
    transition: background 0.15s;
}

    .mn-result-item:last-child {
        border-bottom: none;
    }

    .mn-result-item:hover {
        background: #f0faff;
    }

.mn-result-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.mn-result-addr {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Tips rows */
.mn-tip-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    background: #f8fafd;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.6;
}

    .mn-tip-row i {
        color: var(--accent);
        font-size: 14px;
        margin-top: 2px;
        flex-shrink: 0;
    }

/* ================================================
   Misc Fixes
   ================================================ */
.tl-btn i,
button[type="submit"]:not(.toggle-btn) i,
.home-btn:not(.toggle-btn) i,
button[type="button"]:not(.toggle-btn) i,
.mr-btn-primary:not(.toggle-btn) i {
    color: #fff;
}

.tl-page, .mr-page, .fr-page, .af-page, .fs-page, .sc-page {
    padding-bottom: 35px;
}

/* ================================================
   MOBILE RESPONSIVE – جدول وPopup
   ================================================ */
@media (max-width: 600px) {

    /* الجدول: كارت scrollable أفقياً */
    .af-card {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 12px 10px;
    }

    /* خلايا أصغر */
    .af-table thead th {
        font-size: 10px;
        padding: 5px 8px;
    }

    .af-table tbody td {
        font-size: 11px;
        padding: 9px 8px;
    }

    /* badges وأزرار أصغر */
    .status-badge {
        font-size: 10px;
        padding: 3px 7px;
    }

    .af-action-link {
        font-size: 11px;
        padding: 4px 8px;
    }

    /* Modal: نفس شكل الديسكتوب بالظبط - بس يتناسب مع الشاشة */
    .af-modal-overlay {
        align-items: center;
        padding: 16px;
    }

    .af-modal {
        width: 100%;
        max-width: 420px;
        max-height: calc(100dvh - 32px);
    }

    /* آخر تحديث */
    .last-update {
        font-size: 11px;
        padding: 8px 10px;
    }
}



.tl-btn i,
button[type="submit"]:not(.toggle-btn) i,
.home-btn:not(.toggle-btn) i,
button[type="button"]:not(.toggle-btn) i,
.mr-btn-primary:not(.toggle-btn) i {
    color: #fff;
}

.tl-page, .mr-page, .fr-page, .af-page, .fs-page, .sc-page, .tl-page {
    padding-bottom: 35px
}
