﻿/* ================================================== */
/* ملف التصميم الرئيسي - LifeSafer                   */
/* ================================================== */

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

:root {
    --bg-dark: #081f55;
    --bg-light: #f8fafc;
    --primary: #0284c7;
    --accent: #0ea5e9;
    --danger: #ef4444;
    --success: #10b981;
    --glass: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.15);
    --text-white: #ffffff;
    --text-gray: #cbd5e1;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
    background: #081f55;
    color: var(--text-white);
    direction: rtl;
    overflow-x: hidden;
    /* مساحة في الأسفل حتى لا يغطي زر العودة المحتوى */
    padding-bottom: 150px !important;
}

/* --- Container --- */
.ls-container {
    width: min(1100px, 92%);
    margin: 0 auto;
}

/* ================== 1. Hero Section ================== */
.hero-section {
    position: relative;
    padding: 20px 0 60px;
    background: radial-gradient(circle at top, #1e3a8a, #081f55);
    overflow: hidden;
    text-align: center;
}

/* Navbar */
.hero-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--danger), #b91c1c);
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 16px;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.brand-name {
    font-size: 20px;
    font-weight: 800;
}

.status-pill {
    background: rgba(255,255,255,0.1);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    border: 1px solid var(--border);
}

/* Content */
.hero-content h1 {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 900;
    margin-bottom: 15px;
    line-height: 1.2;
}

    .hero-content h1 span {
        color: var(--accent);
        font-weight: 400;
        font-size: 0.6em;
        display: block;
        margin-top: 5px;
    }

.hero-content p {
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

/* Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.stat-card {
    background: var(--glass);
    border: 1px solid var(--border);
    padding: 15px 25px;
    border-radius: 16px;
    min-width: 140px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s;
    text-decoration: none;
    color: white;
}

    .stat-card:hover {
        transform: translateY(-5px);
        background: rgba(255,255,255,0.12);
    }

.stat-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-gray);
}

/* زر المستخدم المميز */
.action-card.logged-in {
    background: rgba(2, 132, 199, 0.15);
    border-color: var(--primary);
}

    .action-card.logged-in .stat-value {
        color: #7dd3fc;
    }

/* ================== 2. Emergency Button ================== */
.emergency-action {
    margin-top: -30px;
    margin-bottom: 50px;
    text-align: center;
    position: relative;
    z-index: 10;
}

.btn-emergency-big {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 15px 30px;
    border-radius: 20px;
    text-decoration: none;
    color: #ef4444;
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.4);
    border: 4px solid #0f172a;
    transition: transform 0.3s;
}

    .btn-emergency-big:hover {
        transform: scale(1.05);
        background: linear-gradient(135deg, #ef4444, #dc2626);
        color: white;
    }

.pulse-icon {
    font-size: 28px;
    animation: pulse 1.5s infinite;
}

.btn-title {
    display: block;
    font-weight: 900;
    font-size: 18px;
}

.btn-sub {
    display: block;
    font-size: 11px;
    opacity: 0.9;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* ================== 3. Services Grid ================== */
.section-head {
    text-align: center;
    margin-bottom: 30px;
}

    .section-head h2 {
        font-size: 24px;
        font-weight: 800;
        margin-bottom: 5px;
    }

    .section-head p {
        color: var(--text-gray);
        font-size: 14px;
    }

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.service-card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 25px;
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

    .service-card:hover {
        transform: translateY(-5px);
        background: rgba(255,255,255,0.1);
    }

    .service-card::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: var(--accent);
    }

.card-icon {
    font-size: 28px;
}

.card-info h3 {
    margin: 0 0 5px;
    font-size: 18px;
}

.card-info p {
    margin: 0;
    font-size: 12px;
    color: var(--text-gray);
    line-height: 1.4;
}

.card-arrow {
    margin-right: auto;
    font-weight: bold;
    opacity: 0.5;
}

/* ================== 4. Ads Ticker ================== */
.ads-section {
    margin-bottom: 60px;
}

.ads-title {
    text-align: center;
    font-weight: bold;
    margin-bottom: 15px;
    color: white !important;
}

.ticker-wrap {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.ticker-move {
    display: inline-block;
    animation: ticker 20s linear infinite;
}

.ticker-wrap:hover .ticker-move {
    animation-play-state: paused;
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(50%);
    }
}

.ticker-item {
    display: inline-block;
    width: 280px;
    margin: 0 10px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
}

.ad-image {
    height: 160px;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #334155;
}

.ad-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    padding: 8px;
    font-size: 12px;
    text-align: center;
}

/* ================== 5. Hospitals Flip ================== */
.hospitals-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.hospital-flip {
    width: 280px;
    height: 220px;
    perspective: 1000px;
    cursor: pointer;
}

.flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.hospital-flip:hover .flip-inner {
    transform: rotateY(180deg);
}

.flip-front, .flip-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.flip-front {
    background: #fff;
}

.front-img {
    height: 100%;
    width: 100%;
    background-size: cover;
    background-position: center;
}

.status-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    color: white;
}

    .status-badge.open {
        background: var(--success);
    }

    .status-badge.closed {
        background: var(--danger);
    }

.front-title {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 15px 10px 10px;
    text-align: center;
    font-weight: bold;
}

.flip-back {
    background: #1e293b;
    color: white;
    transform: rotateY(180deg);
    padding: 20px;
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid var(--border);
}

    .flip-back h4 {
        color: var(--accent);
        margin-bottom: 10px;
    }

    .flip-back ul {
        list-style: none;
        padding: 0;
        font-size: 13px;
    }

    .flip-back li {
        margin-bottom: 8px;
        display: flex;
        justify-content: space-between;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding-bottom: 4px;
    }

    .flip-back b.open {
        color: var(--success);
    }

    .flip-back b.closed {
        color: var(--danger);
    }

.more-link {
    text-align: center;
    display: block;
    width: fit-content;
    margin: 20px auto 100px !important;
}

    .more-link a {
        color: var(--accent);
        text-decoration: none;
        font-weight: bold;
    }

/* ================== Fab Buttons & Animation ================== */
.fab-wrapper {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 100;
}

.fab-btn {
    pointer-events: auto;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 24px;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: 0.3s;
}

    .fab-btn:hover {
        transform: translateY(-5px);
    }

.fab-ai {
    background: #6366f1;
    color: white;
}

.fab-sos {
    background: #ef4444;
    color: white;
}

/* ===== Reveal (ظهور عند الوصول) ===== */
.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 1.7s ease, transform 1.7s ease;
}

    .reveal.is-show {
        opacity: 1;
        transform: translateY(0);
    }

/* ================== Hospital Page ================== */
.hlist {
    width: 100%;
    display: grid;
    gap: 22px;
    margin-top: 16px;
}

.hrow {
    display: grid;
    grid-template-columns: 1.05fr 1.35fr;
    gap: 18px;
    align-items: center;
}

.hrow-img {
    height: 230px;
    border-radius: 18px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 18px 34px rgba(0,0,0,.20);
    border: 1px solid rgba(255,255,255,.12);
}

.hrow-info {
    color: #fff;
}

.hrow-title {
    font-weight: 1000;
    font-size: 22px;
    margin-bottom: 8px;
}

.hrow-desc {
    opacity: .92;
    line-height: 1.8;
    font-size: 13.5px;
}

.hrow-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.hbadge {
    padding: 7px 12px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 12px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.08);
}

    .hbadge.ok {
        background: #3d960e;
        font-size: 9px;
    }

    .hbadge.no {
        background: #f33f1f;
        font-size: 9px;
    }

.hmeta {
    font-size: 12px;
    opacity: .9;
}

/* التبادل: عكس الاتجاه */
.hrow:nth-child(even) {
    direction: ltr;
}

    .hrow:nth-child(even) .hrow-info {
        direction: rtl;
    }

@media (max-width: 820px) {
    .hrow {
        grid-template-columns: 1fr;
    }

    .hrow-img {
        height: 200px;
    }

    .hrow:nth-child(even) {
        direction: rtl;
    }
}

.trusted2 {
    margin-top: 30px;
    border-radius: 18px;
    padding: 16px 14px 14px;
    max-width: 980px;
    margin-inline: auto;
    margin-bottom: 100px;
}

.section-title2 {
    margin: 0;
    font-size: 18px;
    font-weight: 900;
    margin-top: 50px;
}

/* ================== Ambulance Request Page ================== */
.req-form {
    margin-top: 14px;
}

.req-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 12px;
    margin-top: 12px;
}

.req-field-full {
    grid-column: 1 / -1;
}

.req-label {
    display: block;
    margin-bottom: 6px;
    color: #fff;
    font-weight: 900;
    font-size: 13px;
    opacity: .95;
}

.req-input {
    width: 100%;
    padding: 12px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.10);
    color: #fff;
    outline: none;
}

    .req-input::placeholder {
        color: rgba(255,255,255,.65);
    }

.req-err {
    color: #ffb4b4;
    font-size: 12px;
    display: block;
    margin-top: 6px;
}

.req-actions {
    margin-top: 20px !important;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.req-btn-primary {
    background-color: #081f55;
    color: #fff !important;
    padding: 10px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    border: 1px solid #081f55;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
}

    .req-btn-primary:hover {
        background: red;
        color: white;
    }

.req-btn-ghost {
    border: 1px solid rgba(255,255,255,.20);
    background: rgba(255,255,255,.08);
    color: #fff;
    border-radius: 999px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 900;
}

    .req-btn-ghost:hover {
        background: rgba(255,255,255,.12);
    }

.req-btn-link {
    background-color: #f3f4f6;
    color: #374151 !important;
    padding: 10px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    border: 1px solid #e5e7eb;
    display: inline-block;
}

    .req-btn-link:hover {
        background-color: #e5e7eb;
    }

.req-help {
    margin-top: 8px;
    color: rgba(255,255,255,.85);
    font-size: 12px;
}

.req-ok {
    margin-top: 14px;
    text-align: center;
    color: #fff;
    background: rgba(46,204,113,.20);
    border: 1px solid rgba(46,204,113,.35);
    padding: 10px 12px;
    border-radius: 14px;
}

@media (max-width: 720px) {
    .req-grid {
        grid-template-columns: 1fr;
    }
}

.pick-wrap {
    margin-top: 16px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.08);
}

.pick-title {
    text-align: center;
    color: #fff;
    font-weight: 1000;
    margin-bottom: 12px;
}

.pick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 12px;
}

.pick-card {
    border-radius: 16px;
    padding: 12px;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(0,0,0,.14);
    color: #fff;
    display: grid;
    gap: 6px;
}

    .pick-card input {
        display: none;
    }

    .pick-card:has(input:checked) {
        outline: 2px solid rgba(46,204,113,.65);
        background: rgba(46,204,113,.12);
    }

.pick-name {
    font-weight: 1000;
}

.pick-meta, .pick-dist {
    opacity: .9;
    font-size: 12px;
}

@media (max-width: 980px) {
    .pick-grid {
        grid-template-columns: 1fr;
    }
}

.req-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 9999;
}

.req-modal-card {
    width: min(520px,100%);
    border-radius: 18px;
    background: rgba(255,255,255,.95) !important;
    padding: 16px;
    box-shadow: 0 18px 34px rgba(0,0,0,.25);
    text-align: center;
}

.req-modal-title {
    font-weight: 1000;
    font-size: 18px;
    color: #081f55;
}

.req-modal-text {
    margin-top: 8px;
    font-size: 13px;
    opacity: .95;
    color: #081f55;
}

/* ================== Track Page ================== */
.track-page {
    width: min(520px, 92%);
    margin: 40px auto;
    color: #fff;
}

.track-header {
    text-align: center;
    margin-bottom: 20px;
}

    .track-header h1 {
        font-size: 22px;
        font-weight: 900;
    }

    .track-header p {
        font-size: 13px;
        opacity: .9;
    }

.track-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

    .track-form input {
        flex: 1;
        padding: 12px;
        border-radius: 12px;
        border: none;
        outline: none;
    }

    .track-form button {
        padding: 12px 16px;
        border-radius: 12px;
        border: none;
        font-weight: 900;
        cursor: pointer;
        background: #ef4444;
        color: #fff;
    }

        .track-form button:hover {
            background: white;
            color: #081f55;
        }

.track-result {
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 18px;
    padding: 16px;
}

.track-row {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
    font-size: 14px;
}

.status {
    color: #22c55e;
}

.cancel-form {
    margin-top: 16px;
}

.cancel-btn {
    width: 100%;
    padding: 12px;
    border-radius: 14px;
    border: none;
    font-weight: 900;
    background: #b91c1c;
    color: #fff;
    cursor: pointer;
}

    .cancel-btn:hover {
        background: white;
        color: #081f55;
    }

.track-notfound {
    margin-top: 16px;
    text-align: center;
    opacity: .9;
}

input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

.track-back {
    text-decoration: none;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.18);
    color: #fff;
    padding: 12px 16px;
    border-radius: 14px;
    font-weight: 900;
    cursor: pointer;
}

    .track-back:hover {
        background: white;
        color: #081f55;
    }

/* أزرار الرجوع الرئيسية */
.back-to-home {
    display: inline-block;
    color: white;
    padding: 10px 20px;
    border-radius: 18px;
    text-decoration: none;
    font-weight: 900;
    text-align: center;
    margin-top: 80px;
    margin-right: 360px;
}

.back-to-home2 {
    bottom: 20px;
    left: 50%;
    display: inline-block;
    color: white;
    padding: 10px 20px;
    border-radius: 18px;
    text-decoration: none;
    font-weight: 900;
    text-align: center;
    margin-top: 9px;
    margin-bottom: 20px;
    margin-right: 410px;
    z-index: 1000;
}

    .back-to-home:hover, .back-to-home2:hover {
        background: white;
    }

@media (max-width: 768px) {
    .back-to-home, .back-to-home2 {
        margin-right: auto !important;
        margin-left: auto !important;
        margin-top: 30px !important;
        margin-bottom: 60px !important;
        display: block !important;
        width: fit-content;
        background: transparent !important;
        color: white !important;
        border: 2px solid white !important;
        padding: 10px 30px;
        border-radius: 50px;
        transition: all 0.3s ease;
    }

        .back-to-home:active, .back-to-home2:active,
        .back-to-home:hover, .back-to-home2:hover {
            background-color: white !important;
            color: #081f55 !important;
        }
}

/* ================== Donors Page ================== */
.donors-page {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 16px;
}

.donors-header {
    text-align: center;
    margin-bottom: 18px;
}

    .donors-header h2 {
        margin: 0;
        font-size: 28px;
        color: white;
    }

    .donors-header p {
        margin: 8px 0 0;
        opacity: .85;
        color: white;
    }

.donor-filters {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: end;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    padding: 14px;
    border-radius: 14px;
    margin: 18px 0 22px;
    color: white;
}

.filter-item label {
    display: block;
    margin-bottom: 6px;
    opacity: .9;
    font-size: 14px;
    color: white;
}

.filter-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(0,0,0,.18);
    color: white;
    outline: none;
}

.filter-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    color: white;
}

.btn-primary, .btn-ghost {
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.16);
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    color: white;
}

.btn-primary {
    background: rgba(81,112,255,.9);
}

.btn-ghost {
    background: rgba(255,255,255,.06);
    color: inherit;
}

.donor-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 14px;
    color: white;
}

.donor-card {
    border-radius: 16px;
    padding: 14px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
}

.donor-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.donor-name {
    font-size: 18px;
    font-weight: 700;
}

.blood-badge {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0, 200, 120, .15);
    border: 1px solid rgba(0, 200, 120, .3);
    font-weight: 700;
}

.donor-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    opacity: .95;
}

.meta-label {
    opacity: .8;
}

.phones-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.phone-pill {
    display: inline-flex;
    margin: 4px 6px 0 0;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.14);
    text-decoration: none;
    color: inherit;
}

.empty-box {
    grid-column: 1/-1;
    text-align: center;
    padding: 24px;
    border-radius: 16px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
}

@media (max-width: 900px) {
    .donor-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    .donor-filters {
        grid-template-columns: 1fr 1fr;
    }

    .filter-actions {
        grid-column: 1/-1;
    }
}

@media (max-width: 560px) {
    .donor-grid {
        grid-template-columns: 1fr;
    }

    .donor-filters {
        grid-template-columns: 1fr;
    }
}

.test-badge {
    display: inline-block;
    padding: 1px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    font-weight: 600;
}

.search-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-login-donor {
    display: inline-block;
    padding: 10px 18px;
    background: linear-gradient(135deg, #22a7c5, #209898);
    color: #fff;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

    .btn-login-donor:hover {
        background: blue;
        transform: translateY(-2px);
        color: white;
    }

/* ================== Donor Profile ================== */
.profile-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Cairo', sans-serif;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.header-text h2 {
    color: #ffffff !important;
    font-weight: 800;
    margin: 0;
}

.header-text p {
    color: #e5e7eb !important;
    margin: 5px 0 0;
    font-size: 14px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.btn-action {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    transition: 0.3s;
    border: none;
    cursor: pointer;
}

.btn-home {
    background-color: #e0f2fe;
    color: #0284c7;
}

    .btn-home:hover {
        background-color: #bae6fd;
    }

.btn-logout {
    background-color: #fee2e2;
    color: #dc2626;
}

    .btn-logout:hover {
        background-color: #fecaca;
    }

.profile-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 30px;
    border: 1px solid #e5e7eb;
}

.section-title {
    color: #0369a1;
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 16px;
    border-right: 4px solid #0369a1;
    padding-right: 10px;
}

.divider {
    border: 0;
    height: 1px;
    background: #e5e7eb;
    margin: 25px 0;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.full-width {
    grid-column: span 2;
}

.form-group label {
    font-size: 14px;
    color: #374151;
    font-weight: 600;
}

.form-input {
    padding: 10px 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: 0.3s;
    background-color: #f9fafb;
    outline: none;
    font-family: inherit;
    height: 48px;
}

    .form-input:focus {
        border-color: #0ea5e9;
        box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
        background-color: white;
    }

.status-section {
    display: flex;
    gap: 30px;
    background: #f0f9ff;
    padding: 20px;
    border-radius: 10px;
    border: 1px dashed #bae6fd;
}

.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    gap: 10px;
}

    .toggle-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: relative;
    width: 46px;
    height: 24px;
    background-color: #ccc;
    border-radius: 34px;
    transition: .4s;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        border-radius: 50%;
        transition: .4s;
    }

input:checked + .slider {
    background-color: #10b981;
}

    input:checked + .slider:before {
        transform: translateX(22px);
    }

.toggle-label {
    font-size: 14px;
    font-weight: bold;
    color: #374151;
}

.form-actions {
    margin-top: 30px;
    text-align: left;
}

.btn-save-main {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3);
    transition: 0.3s;
    width: 100%;
}

    .btn-save-main:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
    }

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .status-section {
        flex-direction: column;
        gap: 15px;
    }

    .profile-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
}

/* Flash Messages */
.flash-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.flash-card {
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    min-width: 300px;
    animation: slideUp 0.3s ease-out;
}

    .flash-card.success {
        border-bottom: 4px solid #10b981;
    }

    .flash-card.error {
        border-bottom: 4px solid #ef4444;
    }

.flash-icon {
    font-size: 24px;
}

.flash-text {
    font-weight: bold;
    color: #374151;
    flex: 1;
}

.flash-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #9ca3af;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ================== Auth (Login/Signup) ================== */
.ls-auth-wrapper {
    min-height: 100vh;
    background: #081f55;
    color: black !important;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Cairo', sans-serif;
    padding: 20px;
    box-sizing: border-box;
}

.ls-auth-container {
    position: relative;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    direction: ltr;
    width: 900px;
    max-width: 100%;
    height: 85vh;
    min-height: 600px;
    box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
}

.ls-auth-forms {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.ls-auth-form {
    position: absolute;
    width: 50%;
    height: 100%;
    top: 0;
    left: 0;
    background: #fff;
    text-align: center;
    transition: transform .6s ease, opacity .6s ease;
    direction: rtl;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

    .ls-auth-form::-webkit-scrollbar {
        width: 6px;
    }

    .ls-auth-form::-webkit-scrollbar-track {
        background: transparent;
    }

    .ls-auth-form::-webkit-scrollbar-thumb {
        background-color: #ccc;
        border-radius: 20px;
    }

.ls-auth-signin {
    z-index: 2;
    justify-content: center;
    padding: 40px;
}

.ls-auth-signup {
    opacity: 0;
    z-index: 1;
    justify-content: flex-start;
    padding: 50px 40px 150px 40px;
}

.ls-auth-container.active .ls-auth-signin {
    transform: translateX(100%);
}

.ls-auth-container.active .ls-auth-signup {
    transform: translateX(100%);
    opacity: 1;
    z-index: 3;
}

.ls-auth-form input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border-radius: 6px;
    border: none;
    background: #eee;
    text-align: right;
    height: 48px;
}

.ls-auth-form select {
    background-color: #eee;
    border: none;
    padding: 12px 15px;
    margin: 8px 0;
    width: 100%;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    color: #333;
    cursor: pointer;
    height: 48px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 15px center;
}

.ls-auth-inline {
    display: flex;
    gap: 10px;
    width: 100%;
}

    .ls-auth-inline > * {
        flex: 1;
    }

.ls-auth-btn {
    margin-top: 20px;
    padding: 12px 36px;
    border-radius: 25px;
    border: none;
    background: #008f88;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
}

.ls-auth-overlay {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform 0.6s ease-in-out;
    z-index: 100;
    background: linear-gradient(to right, #00c9bd, #081f55);
    color: #fff;
}

.ls-auth-container.active .ls-auth-overlay {
    transform: translateX(-100%);
}

.ls-auth-overlay-panel {
    position: absolute;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0 40px;
    text-align: center;
    transition: transform 0.6s ease-in-out;
    direction: rtl;
}

    .ls-auth-overlay-panel.right {
        right: 0;
        transform: translateX(0);
        pointer-events: all;
    }

    .ls-auth-overlay-panel.left {
        right: 0;
        transform: translateX(-20%);
        opacity: 0;
        pointer-events: none;
    }

.ls-auth-container.active .ls-auth-overlay-panel.right {
    transform: translateX(20%);
    opacity: 0;
    pointer-events: none;
}

.ls-auth-container.active .ls-auth-overlay-panel.left {
    transform: translateX(0);
    opacity: 1;
    pointer-events: all;
}

.ls-auth-btn.ghost {
    background: transparent;
    border: 1px solid #fff;
    margin-top: 15px;
}

    .ls-auth-btn.ghost:hover {
        color: black;
    }

.field-validation-error, .text-danger, .ls-auth-error {
    color: #e74c3c;
    font-size: 12px;
    display: block;
    text-align: right;
    width: 100%;
    margin-top: -5px;
    margin-bottom: 5px;
}

.ls-field-label {
    display: block;
    text-align: right;
    font-size: 13px;
    color: #555;
    margin-bottom: 5px;
    margin-right: 5px;
}

.text-danger {
    color: #e74c3c;
    font-size: 11px;
    display: block;
    text-align: right;
    margin-bottom: 8px;
    margin-right: 5px;
}

/* Auth Responsive */
@media (max-width: 768px) {
    .ls-auth-wrapper {
        padding: 0;
        background: linear-gradient(180deg, #ffffff 0%, #e0f2fe 100%);
        align-items: flex-start;
    }

    .ls-auth-container {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        min-height: auto;
        border-radius: 0;
        box-shadow: none;
    }

    .ls-auth-form {
        background: linear-gradient(180deg, #ffffff 50%, #e0f2fe 100%);
        width: 100%;
        height: 70%;
        top: 0;
        left: 0 !important;
        transform: none !important;
        padding: 20px;
        justify-content: center;
    }

    .ls-auth-signup {
        padding-top: 20px;
        padding-bottom: 120px;
        justify-content: flex-start;
    }

    .ls-auth-overlay {
        width: 100%;
        height: 30%;
        top: 70%;
        left: 0 !important;
        right: 0;
        transform: none !important;
        border-radius: 40px 40px 0 0;
    }

    .ls-auth-overlay-panel {
        top: 0;
        flex-direction: column;
        padding: 10px;
        transform: none !important;
    }

        .ls-auth-overlay-panel h1 {
            font-size: 20px;
            margin-bottom: 5px;
        }

        .ls-auth-overlay-panel p {
            font-size: 12px;
            margin: 5px 0 10px 0;
            line-height: 1.2;
        }

    .ls-auth-btn.ghost {
        margin-top: 5px;
        padding: 8px 25px;
        font-size: 14px;
    }

    .ls-auth-signin {
        opacity: 1;
        z-index: 5;
    }

    .ls-auth-signup {
        opacity: 0;
        z-index: 1;
        pointer-events: none;
    }

    .ls-auth-container.active .ls-auth-signin {
        opacity: 0;
        z-index: 1;
        pointer-events: none;
    }

    .ls-auth-container.active .ls-auth-signup {
        opacity: 1;
        z-index: 5;
        pointer-events: all;
    }

    .ls-auth-overlay-panel.left {
        display: none;
    }

    .ls-auth-overlay-panel.right {
        display: flex;
        opacity: 1 !important;
    }

    .ls-auth-container.active .ls-auth-overlay-panel.right {
        display: none;
    }

    .ls-auth-container.active .ls-auth-overlay-panel.left {
        display: flex;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ================== Hospital Dashboard ================== */
.hero-hospital {
    background: linear-gradient(135deg, #0f172a 0%, #1e40af 100%);
    padding: 50px 20px;
    border-radius: 20px;
    color: white;
    box-shadow: 0 10px 30px rgba(30, 64, 175, 0.25);
    position: relative;
    overflow: hidden;
}

    .hero-hospital::after {
        content: '➕';
        position: absolute;
        top: -20px;
        right: -20px;
        font-size: 15rem;
        color: white;
        opacity: 0.03;
        transform: rotate(15deg);
    }

.hospital-name {
    font-weight: 800;
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.status-indicator {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    padding: 10px 25px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.2);
    font-weight: bold;
    font-size: 1.1rem;
}

.status-on {
    color: #4ade80;
    border-color: #4ade80;
}

.status-off {
    color: #f87171;
    border-color: #f87171;
}

.btn-toggle-status {
    background-color: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid white;
    border-radius: 30px;
    padding: 8px 20px;
    transition: 0.3s;
}

    .btn-toggle-status:hover {
        background-color: white;
        color: #1e40af;
    }

.beds-number {
    font-size: 4rem;
    font-weight: 800;
    color: #1e40af;
    line-height: 1;
    margin: 10px 0;
}

.btn-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border: none;
}

    .btn-circle.btn-primary {
        background: #3b82f6;
    }

    .btn-circle.btn-danger {
        background: #ef4444;
    }

    .btn-circle:hover {
        transform: scale(1.1);
    }

    .btn-circle:disabled {
        background: #ccc;
        cursor: not-allowed;
        transform: none;
    }

.section-title2 {
    color: #081f55 !important;
    font-weight: 700;
    border-right: 5px solid #3b82f6;
    padding-right: 15px;
    margin-bottom: 20px;
}

.table-blue-head {
    background-color: #1e40af;
    color: white;
}

    .table-blue-head th {
        padding: 15px;
        font-weight: normal;
        border: none;
    }

.status-pill {
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: normal;
}

.row-pending {
    background-color: #fffbeb;
}

.phone-link {
    text-decoration: none;
    color: #3b82f6;
    font-weight: bold;
}

.empty-state {
    text-align: center;
    padding: 50px;
    background: white;
    border-radius: 15px;
    color: #64748b;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.ls-2 {
    letter-spacing: 2px;
}

/* ================================================== */
/* تنسيقات لوحة تحكم المدير (Admin Dashboard)        */
/* ================================================== */

/* 1. بطاقات الإحصائيات العلوية */
.admin-stat-card {
    border: 0;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); /* shadow-sm */
    height: 100%;
    background-color: white;
    transition: transform 0.3s ease;
}

    .admin-stat-card:hover {
        transform: translateY(-3px);
    }

/* ألوان الحدود الجانبية للبطاقات */
.border-right-blue {
    border-right: 5px solid #0d6efd !important;
}

.border-right-gray {
    border-right: 5px solid #6c757d !important;
}

.border-right-green {
    border-right: 5px solid #198754 !important;
}

.border-right-red {
    border-right: 5px solid #dc3545 !important;
    background-color: #fff5f5; /* خلفية حمراء فاتحة للتنبيه */
}

/* 2. أزرار الإجراءات السريعة (في الأسفل) */
.admin-action-link {
    display: block;
    padding: 1.5rem; /* p-4 */
    background-color: white;
    border-radius: 0.5rem; /* rounded */
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); /* shadow-sm */
    text-decoration: none;
    color: #212529; /* text-dark */
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

    .admin-action-link:hover {
        transform: translateY(-5px);
        border-color: #0d6efd;
        color: #0d6efd;
        box-shadow: 0 10px 20px rgba(13, 110, 253, 0.1);
    }

.admin-icon-large {
    font-size: 1.8rem;
    margin-left: 10px;
}
.form-label fw-bold small{
    color:black !important;
}
.form-label{
    color: black !important;
}

/* تصميم المستشار الطبي ببادئة ls-med-222 */
.ls-med-222-outer-frame {
    display: flex;
    flex-direction: column;
    height: 90vh;
    background-color: #0b141a;
    max-width: 500px;
    margin: 20px auto;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    font-family: 'Cairo', sans-serif;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.ls-med-222-top-nav {
    background-color: #202c33;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #e9edef;
    z-index: 10;
}

.ls-med-222-nav-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ls-med-222-avatar {
    width: 40px;
    height: 40px;
    background: #00a884;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
}

.ls-med-222-status-group {
    display: flex;
    flex-direction: column;
}

.ls-med-222-title-text {
    font-weight: bold;
    font-size: 0.95rem;
}

.ls-med-222-online-dot {
    font-size: 0.75rem;
    color: #00a884;
}

.ls-med-222-exit-btn {
    color: #8696a0;
    text-decoration: none;
    font-size: 0.9rem;
}

.ls-med-222-chat-surface {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #0d1b2a;
    background-image: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png');
    background-blend-mode: overlay;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ls-med-222-msg-item {
    display: flex;
    width: 100%;
    margin-bottom: 4px;
}

.ls-med-222-bubble {
    padding: 8px 12px;
    border-radius: 8px;
    max-width: 85%;
    position: relative;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #e9edef;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.ls-med-222-type-user {
    justify-content: flex-start;
}

    .ls-med-222-type-user .ls-med-222-bubble {
        background-color: #004852;
        border-top-left-radius: 0;
    }

.ls-med-222-type-bot {
    justify-content: flex-end;
}

    .ls-med-222-type-bot .ls-med-222-bubble {
        background-color: #7d1822;
        border-top-right-radius: 0;
    }

.ls-med-222-time {
    display: block;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
    text-align: left;
    margin-top: 4px;
}

.ls-med-222-input-dock {
    background-color: #202c33;
    padding: 10px;
}

.ls-med-222-bar-inner {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ls-med-222-field {
    flex: 1;
    background-color: #2a3942;
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    color: #d1d7db;
    outline: none;
}

.ls-med-222-send-trigger {
    background-color: #00a884;
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ls-med-222-typing-wrap {
    background: rgba(32, 44, 51, 0.8);
    color: #00a884;
    font-size: 0.8rem;
    padding: 5px 20px;
    display: none;
}

/* ================================================== */
/* الحركات والأزرار العائمة (الصفحة الرئيسية) */
/* ================================================== */

/* تصميم زر الطوارئ الذكي وحركته */
.smart-pill-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    animation: softPulse 2s infinite;
}

    .smart-pill-btn:hover {
        background-color: white !important;
        color: #081f55 !important;
        border-color: white;
        transform: scale(1.05);
        animation: none;
        box-shadow: 0 4px 15px rgba(255, 255, 255, 0.4);
    }

@keyframes softPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* نبض زر الروبوت (بنفسجي) */
@keyframes pulse-ai {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(99, 102, 241, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

/* نبض زر الإسعاف (أحمر) */
@keyframes pulse-sos {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* تطبيق الحركات على الأزرار العائمة */
.fab-ai {
    animation: pulse-ai 2s infinite;
}

.fab-sos {
    animation: pulse-sos 2s infinite;
    animation-delay: 1s; /* تأخير ثانية عشان ينبضوا بالتبادل */
}

/* إيقاف النبض وقت التأشير */
.fab-btn:hover {
    animation: none;
}
/* ================================================== */
/* مسافة سفلية عالمية (Global) لكل صفحات المشروع */
/* ================================================== */

/* هذا الكود يضمن إن كل محتوى رئيسي في أي صفحة يترك مسافة بالأسفل */
main, .pb-3, .container {
    padding-bottom: 10px !important;
}

/* عشان نضمن إن الأزرار العائمة ما تغطي على الفوتر (لو عندك فوتر) */
body {
    margin-bottom: 20px;
}