/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:           #f7f3ee;
    --surface:      #faf6f0;
    --card:         #FFFFFF;
    --border:       #e5d8c8;
    --border-light: #f0e8da;
    --text:         #1e1008;
    --text-2:       #2d1f0e;
    --muted:        #8a7060;
    --accent:       #d4890a;
    --accent-h:     #c07800;
    --accent-bg:    #fdf3e0;
    --green:        #1ABC9C;
    --green-h:      #17A589;
    --green-bg:     #E8FAF5;
    --wa:           #25D366;
    --wa-h:         #1dab53;
    --phone:        #1565C0;
    --phone-h:      #0D47A1;
    --danger:       #E74C3C;
    --grad:         linear-gradient(135deg, #d4890a 0%, #f5c842 100%);
    --shadow-xs:    0 1px 2px rgba(80,40,0,0.06);
    --shadow-sm:    0 1px 4px rgba(80,40,0,0.09), 0 1px 2px rgba(80,40,0,0.05);
    --shadow:       0 2px 8px rgba(80,40,0,0.10), 0 1px 3px rgba(80,40,0,0.07);
    --shadow-md:    0 8px 20px rgba(80,40,0,0.13), 0 2px 6px rgba(80,40,0,0.08);
    --r:            12px;
    --r-sm:         8px;
    --r-pill:       999px;
}

body {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    font-size: 16px;
    line-height: 1.6;
}

/* ─── Global Background Animation ─── */
.page-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(160deg, #fdf6ec 0%, #f2ece3 45%, #eef3f8 100%);
    overflow: hidden;
    pointer-events: none;
}

.page-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(170,130,60,0.10) 1px, transparent 1px);
    background-size: 30px 30px;
}

.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.bg-blob-1 {
    width: 420px;
    height: 420px;
    background: rgba(232,160,32,0.12);
    top: -100px;
    right: -100px;
    animation: drift1 26s ease-in-out infinite alternate;
}

.bg-blob-2 {
    width: 380px;
    height: 380px;
    background: rgba(30,111,217,0.06);
    bottom: -80px;
    left: -80px;
    animation: drift2 32s ease-in-out infinite alternate;
}

.bg-blob-3 {
    width: 300px;
    height: 300px;
    background: rgba(26,188,156,0.07);
    top: 40%;
    left: 40%;
    animation: drift3 22s ease-in-out infinite alternate;
}

@keyframes drift1 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(-40px, 30px) scale(1.08); }
}
@keyframes drift2 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(30px, -40px) scale(1.05); }
}
@keyframes drift3 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(-20px, 20px) scale(0.95); }
}

/* ─── Road lines (perspective) ─── */
.page-bg .road-lines {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 65%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.page-bg .road-line {
    width: 5px;
    margin: 0 auto;
    border-radius: 3px;
    background: rgba(200, 140, 20, 0.45);
    animation: roadMoveBg 1.8s linear infinite;
}

.page-bg .road-line:nth-child(1)  { height: 2px;  opacity: 0.08; animation-delay: 0s;    margin-bottom: 80px; }
.page-bg .road-line:nth-child(2)  { height: 3px;  opacity: 0.12; animation-delay: 0.2s;  margin-bottom: 60px; }
.page-bg .road-line:nth-child(3)  { height: 5px;  opacity: 0.18; animation-delay: 0.4s;  margin-bottom: 45px; }
.page-bg .road-line:nth-child(4)  { height: 8px;  opacity: 0.24; animation-delay: 0.6s;  margin-bottom: 30px; }
.page-bg .road-line:nth-child(5)  { height: 12px; opacity: 0.32; animation-delay: 0.8s;  margin-bottom: 20px; }
.page-bg .road-line:nth-child(6)  { height: 18px; opacity: 0.42; animation-delay: 1.0s;  margin-bottom: 12px; }
.page-bg .road-line:nth-child(7)  { height: 28px; opacity: 0.54; animation-delay: 1.2s;  margin-bottom: 7px;  }
.page-bg .road-line:nth-child(8)  { height: 44px; opacity: 0.65; animation-delay: 1.4s;  margin-bottom: 3px;  }

@keyframes roadMoveBg {
    from { opacity: 0; transform: scaleY(0.5) translateY(-10px); }
    30%  { opacity: inherit; }
    to   { opacity: 0; transform: scaleY(1.1) translateY(5px); }
}

/* ─── Floating particles ─── */
.page-bg .particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0%   { transform: translateY(100vh) scale(0); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 0.3; }
    100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* ─── Header ─── */
header {
    background: #1a1005;
    color: #fff;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}
.logo-img {
    height: 42px;
    width: auto;
    object-fit: contain;
}
.logo-text {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.2px;
    line-height: 1;
}
.logo-text em {
    font-style: normal;
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav { display: flex; gap: .3rem; align-items: center; }
nav a, nav button {
    color: rgba(255,255,255,.65);
    text-decoration: none;
    font-size: .875rem;
    padding: .4rem .85rem;
    border-radius: var(--r-pill);
    border: none;
    background: transparent;
    cursor: pointer;
    transition: background .15s, color .15s;
    font-family: inherit;
    font-weight: 500;
}
nav a:hover, nav button:hover { background: rgba(255,255,255,.12); color: #fff; }
nav .btn-accent {
    background: var(--grad);
    color: #fff;
    font-weight: 700;
    padding: .4rem 1.1rem;
}
nav .btn-accent:hover { opacity: .88; }
nav .user-name {
    color: rgba(255,255,255,.4);
    font-size: .8rem;
    padding-inline-start: .75rem;
    border-inline-start: 1px solid rgba(255,255,255,.15);
    margin-inline-start: .2rem;
}

/* ─── Main ─── */
main { max-width: 860px; margin: 0 auto; padding: 1.75rem 1rem 4rem; }

/* ─── Cards ─── */
.card {
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--r);
    padding: 1.4rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: .85rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: .45rem;
}

/* ─── Search Card ─── */
.search-card {
    border-top: 3px solid transparent;
    border-image: var(--grad) 1;
    box-shadow: var(--shadow-md);
}
.search-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
    user-select: none;
    font-weight: 700;
    font-size: .95rem;
    color: var(--text);
}
.search-summary::-webkit-details-marker { display: none; }
.search-summary__arrow {
    font-size: .7rem;
    color: var(--muted);
    transition: transform .2s;
    flex-shrink: 0;
}

/* ─── Forms ─── */
.form-group { margin-bottom: .9rem; }
label {
    display: block;
    font-size: .78rem;
    color: var(--muted);
    margin-bottom: .3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}
input, select, textarea {
    width: 100%;
    padding: .65rem .9rem;
    border: 1.5px solid var(--border);
    border-radius: var(--r-sm);
    background: #fff;
    font-size: .95rem;
    color: var(--text);
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(212,137,10,.13);
}
textarea { resize: vertical; min-height: 75px; }

.row { display: flex; gap: 1rem; }
.row .form-group { flex: 1; min-width: 0; }

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .48rem 1.1rem;
    border-radius: var(--r-pill);
    border: none;
    cursor: pointer;
    font-size: .875rem;
    font-family: inherit;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, transform .1s, box-shadow .15s;
    white-space: nowrap;
}
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 1px 4px rgba(212,137,10,.3); }
.btn-primary:hover { background: var(--accent-h); box-shadow: 0 3px 8px rgba(212,137,10,.35); }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 1px 4px rgba(26,188,156,.25); }
.btn-green:hover { background: var(--green-h); }
.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 1px 4px rgba(37,211,102,.25); }
.btn-wa:hover { background: var(--wa-h); }
.btn-wa::before {
    content: '';
    display: inline-block;
    width: 1.1em;
    height: 1.1em;
    flex-shrink: 0;
    background-color: #fff;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}
.btn-phone { background: var(--phone); color: #fff; box-shadow: 0 2px 6px rgba(21,101,192,.35); }
.btn-phone:hover { background: var(--phone-h); box-shadow: 0 4px 12px rgba(21,101,192,.4); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-sm { padding: .3rem .75rem; font-size: .8rem; }
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text-2);
    box-shadow: none;
}
.btn-outline:hover { background: var(--surface); border-color: var(--accent); color: var(--accent); }
.btn-full { width: 100%; }

/* ─── Badges ─── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: .18rem .6rem;
    border-radius: var(--r-pill);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .2px;
    white-space: nowrap;
}
.badge-active    { background: #E8FAF5; color: #17A589; }
.badge-scheduled { background: var(--accent-bg); color: var(--accent-h); }
.badge-full      { background: #FEF9C3; color: #854D0E; }
.badge-done      { background: var(--surface); color: var(--muted); }
.badge-open      { background: var(--accent-bg); color: var(--accent-h); }
.badge-cancelled { background: #FDEDEC; color: #C0392B; }

/* ─── Trip Card (my requests) ─── */
.trip-card {
    border: 1px solid var(--border-light);
    border-radius: var(--r);
    padding: 1.1rem 1.25rem;
    background: var(--card);
    margin-bottom: .75rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, transform .15s;
    border-inline-start: 3px solid var(--border);
}
.trip-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.trip-card[data-status="active"]    { border-inline-start-color: var(--green); }
.trip-card[data-status="scheduled"] { border-inline-start-color: var(--accent); }
.trip-card[data-status="full"]      { border-inline-start-color: #F39C12; }
.trip-card[data-status="done"]      { border-inline-start-color: var(--muted); }
.trip-card[data-status="cancelled"] { border-inline-start-color: #E74C3C; }
.trip-card[data-status="open"]      { border-inline-start-color: var(--accent); }
.trip-card[data-status="fulfilled"] { border-inline-start-color: var(--green); }

.trip-route {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: .55rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    color: var(--text);
}
.trip-arrow { color: var(--accent); font-size: 1rem; flex-shrink: 0; }

.trip-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .75rem;
}
.trip-meta span {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--r-pill);
    padding: .18rem .65rem;
    font-size: .8rem;
    color: var(--text-2);
    white-space: nowrap;
}
.trip-meta a { color: var(--accent); text-decoration: none; font-weight: 600; }
.trip-meta a:hover { text-decoration: underline; }

.trip-actions { display: flex; gap: .5rem; margin-top: .6rem; align-items: flex-start; flex-wrap: wrap; }
.trip-actions > form { display: contents; }
.trip-actions > details { flex: 1; min-width: 0; }
.trip-actions > details > summary { width: 100%; }
.trip-actions .btn { flex: 1; min-width: 0; }

/* ─── Trip Card v2 (main listing) ─── */
.tc2 {
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 1.1rem 1.25rem 1rem;
    margin-bottom: .75rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .22s, transform .18s;
    position: relative;
    overflow: hidden;
}
.tc2::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: 0; bottom: 0;
    width: 3px;
    border-radius: 3px 0 0 3px;
    background: var(--border);
}
.tc2:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tc2[data-status="active"]    .tc2::before,
.tc2[data-status="active"]::before    { background: var(--green); }
.tc2[data-status="scheduled"]::before { background: var(--accent); }
.tc2[data-status="full"]::before      { background: #F39C12; }
.tc2[data-status="done"]::before      { background: var(--muted); }
.tc2[data-status="cancelled"]::before { background: var(--danger); }

/* header row */
.tc2-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .8rem;
}
.tc2-driver {
    display: flex;
    align-items: center;
    gap: .45rem;
    min-width: 0;
}
.tc2-avatar { font-size: 1.15rem; line-height: 1; flex-shrink: 0; }
.tc2-name {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tc2-name--hidden { color: var(--border); letter-spacing: .2em; }
.tc2-name--guest  { color: var(--muted); font-size: .82rem; font-weight: 500; }

.tc2-meta-right {
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.tc2-time {
    font-size: .74rem;
    color: var(--muted);
    white-space: nowrap;
}

/* route */
.tc2-route {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .75rem;
    flex-wrap: wrap;
}
.tc2-city {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
}
.tc2-route-arrow {
    display: flex;
    align-items: center;
    gap: .2rem;
    color: var(--accent);
    flex-shrink: 0;
}
.tc2-route-arrow::before,
.tc2-route-arrow::after {
    content: '';
    display: block;
    height: 2px;
    background: var(--border);
    border-radius: 1px;
}
.tc2-route-arrow::before { width: 20px; }
.tc2-route-arrow::after  { width: 20px; }
.tc2-route-arrow-icon {
    font-size: .85rem;
    line-height: 1;
}

/* chips row */
.tc2-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .65rem;
}
.tc2-chip {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .22rem .7rem;
    border-radius: var(--r-pill);
    font-size: .78rem;
    font-weight: 600;
    background: var(--surface);
    border: 1px solid var(--border-light);
    color: var(--text-2);
    white-space: nowrap;
}
.tc2-chip--price {
    background: var(--accent-bg);
    border-color: #f5d98a;
    color: var(--accent-h);
    font-weight: 700;
}
.tc2-chip--time {
    background: #eaf6f6;
    border-color: #b2dfdb;
    color: #00796b;
}
.tc2-chip--map {
    background: var(--green-bg);
    border-color: #A9DFBF;
    color: var(--green);
    text-decoration: none;
}
.tc2-chip--map:hover { text-decoration: underline; }

/* notes */
.tc2-notes {
    font-size: .82rem;
    color: var(--muted);
    font-style: italic;
    padding: .35rem .7rem;
    background: var(--surface);
    border-radius: var(--r-sm);
    border-inline-start: 2px solid var(--border);
    margin-bottom: .75rem;
}

/* actions */
.tc2-actions {
    display: flex;
    gap: .5rem;
    align-items: center;
    flex-wrap: wrap;
    padding-top: .75rem;
    border-top: 1px solid var(--border-light);
}
.tc2-actions > form { display: contents; }
.tc2-actions > details { display: contents; }

/* shared button base — outlined pill like login support buttons */
.tc2-btn-phone,
.tc2-btn-wa,
.tc2-btn-rate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .52rem 1.15rem;
    border-radius: 999px;
    font-size: .88rem;
    font-weight: 700;
    font-family: 'Tajawal', sans-serif;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .15s, box-shadow .2s, background .15s;
    border: 1.5px solid transparent;
}
.tc2-btn-phone:active,
.tc2-btn-wa:active,
.tc2-btn-rate:active { transform: scale(.97); }
.tc2-btn-phone:hover,
.tc2-btn-wa:hover,
.tc2-btn-rate:hover { transform: translateY(-1px); }

.tc2-btn-phone {
    background: #f5f0ea;
    border-color: #ddd0be;
    color: #3a2810;
}
.tc2-btn-phone:hover { background: #ede5d8; border-color: #c9b89a; box-shadow: 0 3px 10px rgba(80,40,0,.12); }

.tc2-btn-wa {
    background: #f0faf4;
    border-color: #b7e8cc;
    color: #1a7a40;
}
.tc2-btn-wa:hover { background: #e2f5ea; border-color: #8fd4aa; box-shadow: 0 3px 10px rgba(26,122,64,.12); }

.tc2-btn-rate {
    background: #fdf8f0;
    border-color: #e8d8b8;
    color: #7a5010;
}
.tc2-btn-rate:hover { background: #fdf0d8; border-color: #d4a840; box-shadow: 0 3px 10px rgba(212,137,10,.12); }

.tc2-need-sentence {
    font-size: .92rem;
    color: var(--text-2);
    margin: .4rem 0 .6rem;
    line-height: 1.5;
}
.tc2-need-sentence strong { color: var(--text); font-weight: 700; }

.tc2-login-hint {
    display: flex;
    align-items: center;
    gap: .4rem;
}
.tc2-login-hint .btn {
    border-radius: 999px;
    font-weight: 700;
    padding: .52rem 1.15rem;
    font-size: .88rem;
    background: #fdf8f0;
    border: 1.5px solid #e8d8b8;
    color: #7a5010;
    box-shadow: none;
    transition: transform .15s, box-shadow .2s, background .15s;
}
.tc2-login-hint .btn:hover {
    background: #fdf0d8;
    border-color: #d4a840;
    box-shadow: 0 3px 10px rgba(212,137,10,.12);
    transform: translateY(-1px);
}

/* ─── Request Form Card ─── */
.rform-card {
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 1.5rem 1.5rem 1.25rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
}
.rform-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #e8a020, #f5c842, #e8a020);
}

.rform-header {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}
.rform-icon { font-size: 1.6rem; line-height: 1; }
.rform-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
}
.rform-sub {
    font-size: .78rem;
    color: var(--muted);
    margin-top: .18rem;
}

.rform-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .85rem;
    margin-bottom: .85rem;
}
.rform-row-3 { grid-template-columns: 1fr 1fr 1fr; }

.rform-field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .85rem; }
.rform-field:last-child { margin-bottom: 0; }

.rform-label {
    font-size: .7rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
}

.rform-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.rform-input-icon {
    position: absolute;
    right: .85rem;
    font-size: .9rem;
    line-height: 1;
    pointer-events: none;
    z-index: 1;
}
.rform-input-wrap .rform-input { padding-right: 2.4rem; }

.rform-input {
    width: 100%;
    background: #faf7f3;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: .72rem 1rem;
    font-size: .93rem;
    font-family: 'Tajawal', sans-serif;
    color: var(--text);
    outline: none;
    direction: rtl;
    transition: border-color .2s, box-shadow .2s, background .2s;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
}
.rform-input:focus {
    border-color: #e8a020;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(232,160,32,.13);
}
.rform-input::placeholder { color: #c4b4a0; }

/* ── Date input ── */
.rform-date-wrap {
    position: relative;
}
.rform-date-wrap .rform-input {
    appearance: auto;
    -webkit-appearance: auto;
    cursor: pointer;
    padding-left: 2.6rem;
    color-scheme: light;
}
/* Stretch the native calendar button to cover whole input */
.rform-date-wrap .rform-input::-webkit-calendar-picker-indicator {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    margin: 0;
    padding: 0;
}
.rform-date-icon {
    position: absolute;
    left: .9rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    pointer-events: none;
    z-index: 1;
    line-height: 1;
}

/* ── Select ── */
.rform-select-wrap {
    position: relative;
}
.rform-select-wrap .rform-input {
    padding-left: 2.2rem;
    cursor: pointer;
}
.rform-select-wrap::after {
    content: '▾';
    position: absolute;
    left: .9rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: .82rem;
    color: var(--muted);
    pointer-events: none;
    line-height: 1;
}

/* ── Number input ── */
.rform-input[type="number"] {
    -moz-appearance: textfield;
    text-align: center;
}
.rform-input[type="number"]::-webkit-inner-spin-button,
.rform-input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
    cursor: pointer;
    height: 2em;
}

.rform-textarea {
    resize: none;
    min-height: 80px;
}

.rform-hint {
    font-size: .74rem;
    color: var(--muted);
    margin-top: .2rem;
}
.rform-error {
    font-size: .76rem;
    color: #c0392b;
    display: flex;
    align-items: center;
    gap: .3rem;
}
.rform-error::before { content: '⚠'; font-size: .68rem; }

/* Toggle button */
.rform-toggle {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--surface);
    border: 1.5px solid var(--border-light);
    border-radius: 999px;
    padding: .4rem 1rem;
    font-size: .8rem;
    font-weight: 700;
    font-family: 'Tajawal', sans-serif;
    color: var(--muted);
    cursor: pointer;
    margin-bottom: .85rem;
    transition: border-color .2s, color .2s, background .15s;
}
.rform-toggle:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }
.rform-toggle-arrow { font-size: .72rem; transition: transform .2s; }
.rform-toggle-badge {
    font-size: .65rem;
    font-weight: 600;
    background: var(--border-light);
    color: var(--muted);
    padding: .1rem .45rem;
    border-radius: 999px;
}

/* Extra fields container */
.rform-extra {
    flex-direction: column;
    gap: 0;
    animation: fadeInUp .18s ease;
    padding-top: .1rem;
}

/* Map */
.rform-map {
    height: 240px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

/* Footer / Submit */
.rform-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    margin-top: .5rem;
}
.rform-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .62rem 1.6rem;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #d4890a 0%, #f0b020 50%, #d4890a 100%);
    background-size: 200% 100%;
    color: #fff;
    font-size: .95rem;
    font-weight: 800;
    font-family: 'Tajawal', sans-serif;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(212,137,10,.3), 0 1px 2px rgba(0,0,0,.08);
    transition: background-position .4s, transform .15s, box-shadow .2s;
}
.rform-submit:hover {
    background-position: 100% 0;
    box-shadow: 0 4px 16px rgba(212,137,10,.4);
    transform: translateY(-1px);
}
.rform-submit:active { transform: scale(.97); }

.rform-section-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-2);
    margin: 1.25rem 0 .7rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.rform-section-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 1em;
    background: var(--accent);
    border-radius: 3px;
}

@media (max-width: 600px) {
    .rform-card { padding: 1.2rem 1rem 1rem; border-radius: 16px; }
    .rform-row   { grid-template-columns: 1fr; gap: 0; }
    .rform-row-3 { grid-template-columns: 1fr; }
    .rform-submit { width: 100%; }
}

/* ─── Rating Form ─── */
.tc2-rate-form {
    flex-basis: 100%;
    margin-top: .85rem;
    background: #fdf8f2;
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 1rem 1.1rem;
    animation: fadeInUp .2s ease;
}

.tc2-rate-label {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .45rem;
}

/* Stars */
.tc2-rate-stars {
    margin-bottom: .85rem;
}
.tc2-stars {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: .2rem;
    margin-bottom: .3rem;
}
.tc2-star {
    background: none;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    color: #e0d0b8;
    transition: color .12s, transform .1s;
    padding: 0;
    font-family: inherit;
}
.tc2-star:hover,
.tc2-star.active { color: #f0b020; }
.tc2-star:hover ~ .tc2-star,
.tc2-stars:has(.tc2-star:hover) .tc2-star { color: #f0b020; }
.tc2-stars:has(.tc2-star:hover) .tc2-star ~ .tc2-star { color: #e0d0b8; }
.tc2-star:active { transform: scale(.88); }

.tc2-rate-hint {
    display: block;
    font-size: .72rem;
    color: var(--muted);
}

/* Note textarea */
.tc2-rate-note { margin-bottom: .85rem; }
.tc2-rate-textarea {
    width: 100%;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: .65rem .85rem;
    font-size: .9rem;
    font-family: 'Tajawal', sans-serif;
    color: var(--text);
    resize: none;
    min-height: 72px;
    outline: none;
    direction: rtl;
    transition: border-color .2s, box-shadow .2s;
}
.tc2-rate-textarea:focus {
    border-color: #e8a020;
    box-shadow: 0 0 0 3px rgba(232,160,32,.13);
}
.tc2-rate-textarea::placeholder { color: #c4b4a0; }

/* Footer / Submit */
.tc2-rate-footer {
    display: flex;
    justify-content: flex-end;
}
.tc2-rate-submit {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem 1.3rem;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #d4890a 0%, #f0b020 50%, #d4890a 100%);
    background-size: 200% 100%;
    color: #fff;
    font-size: .88rem;
    font-weight: 800;
    font-family: 'Tajawal', sans-serif;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(212,137,10,.3);
    transition: background-position .4s, transform .15s, box-shadow .2s;
}
.tc2-rate-submit:hover {
    background-position: 100% 0;
    box-shadow: 0 4px 14px rgba(212,137,10,.4);
    transform: translateY(-1px);
}
.tc2-rate-submit:active { transform: scale(.97); }

@media (max-width: 600px) {
    .tc2 { padding: .9rem 1rem .85rem; }
    .tc2-city { font-size: 1rem; }
    .tc2-actions .tc2-btn-phone,
    .tc2-actions .tc2-btn-wa,
    .tc2-actions .tc2-btn-rate { flex: 1; }
    .tc2-rate-submit { width: 100%; justify-content: center; }
}

/* ─── Alert / Flash ─── */
.alert {
    padding: .85rem 1.1rem;
    border-radius: var(--r-sm);
    margin-bottom: 1.1rem;
    font-weight: 600;
    font-size: .92rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    animation: slideDown .25s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.alert-success { background: var(--green-bg); color: #17A589; border: 1px solid #A9DFBF; }
.alert-error   { background: #FDEDEC;         color: #C0392B; border: 1px solid #F5B7B1; }

.error-text { color: var(--danger); font-size: .82rem; margin-top: .3rem; }

/* ─── Tabs ─── */
.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.1rem;
    border-bottom: 2px solid var(--border-light);
    position: relative;
}
.tab {
    flex: 1;
    padding: .6rem .5rem .55rem;
    cursor: pointer;
    font-weight: 600;
    font-size: .875rem;
    color: var(--muted);
    border: none;
    background: transparent;
    transition: color .18s;
    font-family: inherit;
    text-align: center;
    position: relative;
    letter-spacing: .01em;
}
.tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 10%;
    left: 10%;
    height: 2px;
    background: var(--grad);
    border-radius: 2px 2px 0 0;
    transform: scaleX(0);
    transition: transform .22s ease;
}
.tab.active {
    color: var(--accent);
    font-weight: 700;
}
.tab.active::after { transform: scaleX(1); }
.tab:not(.active):hover { color: var(--text-2); }

.tab__icon { font-size: 1em; line-height: 1; }

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeInUp .18s ease; }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Filter Pills ─── */
.filter-pills {
    display: flex;
    gap: .4rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

/* ─── Section title ─── */
.section-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .45rem;
}

/* ─── Empty State ─── */
.empty-state {
    text-align: center;
    color: var(--muted);
    padding: 2.5rem 1rem;
    font-size: .95rem;
    background: var(--card);
    border: 1.5px dashed var(--border);
    border-radius: var(--r);
    line-height: 1.8;
}
.empty-state small { display: block; font-size: .85rem; color: #9a8070; margin-top: .3rem; }

/* ─── Request Card (driver view) ─── */
.req-card {
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--r);
    border-inline-start: 3px solid var(--border);
    padding: 1.1rem 1.25rem;
    margin-bottom: .75rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, transform .15s;
}
.req-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.req-card[data-status="open"]      { border-inline-start-color: var(--accent); }
.req-card[data-status="active"]    { border-inline-start-color: var(--green); }
.req-card[data-status="done"]      { border-inline-start-color: var(--muted); }
.req-card[data-status="cancelled"] { border-inline-start-color: #E74C3C; }
.req-card[data-status="fulfilled"] { border-inline-start-color: var(--green); }

.req-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .75rem;
}
.req-card__identity {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.req-card__avatar {
    font-size: 1.3rem;
    line-height: 1;
}
.req-card__name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}
.req-card__name--hidden {
    color: var(--border);
    letter-spacing: .15em;
}
.req-card__header-meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}
.req-card__time {
    font-size: .75rem;
    color: var(--muted);
}

.req-card__body { margin-bottom: .75rem; }
.req-card__sentence {
    font-size: .98rem;
    color: var(--text-2);
    line-height: 1.7;
    margin-bottom: .5rem;
}
.req-card__sentence strong {
    color: var(--text);
    font-weight: 700;
}

.req-card__details {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .4rem;
}
.req-card__detail {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--r-pill);
    padding: .18rem .65rem;
    font-size: .8rem;
    color: var(--text-2);
    white-space: nowrap;
    text-decoration: none;
}
.req-card__detail--time { background: var(--accent-bg); border-color: #f0d490; color: var(--accent-h); }
.req-card__detail--map  { background: var(--green-bg); border-color: #A9DFBF; color: var(--green); font-weight: 600; }
.req-card__detail--map:hover { text-decoration: underline; }

.req-card__notes {
    font-size: .83rem;
    color: var(--muted);
    font-style: italic;
    margin-top: .35rem;
    padding: .4rem .65rem;
    background: var(--surface);
    border-radius: var(--r-sm);
    border-inline-start: 2px solid var(--border);
}

/* ─── Pagination ─── */
.pagination-info {
    text-align: center;
    font-size: .8rem;
    color: var(--muted);
    margin: .5rem 0 .25rem;
}

/* ─── Details / Rating ─── */
details summary { list-style: none; }
details summary::-webkit-details-marker { display: none; }

/* ─── Divider ─── */
.divider {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 1rem 0;
}

/* ─── Plan Widget ─── */
.plan-widget {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 1.1rem;
    border-radius: var(--r);
    margin-bottom: .75rem;
    border: 1.5px solid var(--border-light);
    background: var(--card);
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}
.plan-widget--paid { border-color: #A9DFBF; background: var(--green-bg); }
.plan-widget--free { border-color: var(--border); background: var(--surface); }

.plan-widget__info { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.plan-badge {
    display: inline-flex;
    align-items: center;
    padding: .18rem .7rem;
    border-radius: var(--r-pill);
    font-size: .75rem;
    font-weight: 700;
}
.plan-badge--paid { background: var(--green-bg); color: var(--green); }
.plan-badge--free { background: var(--accent-bg); color: var(--accent); }

.plan-widget__balance { font-size: 1.05rem; font-weight: 800; color: var(--text); }
.plan-widget__meta    { font-size: .78rem; color: var(--muted); }

.voucher-box {
    background: var(--card);
    border: 1.5px solid var(--border-light);
    border-radius: var(--r);
    padding: .85rem 1.1rem;
    margin-bottom: .75rem;
}
.voucher-box.hidden { display: none; }
.voucher-form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.voucher-form input { flex: 1; min-width: 140px; max-width: 220px; }

/* ─── Terms Page ─── */
.terms-section {
    margin-bottom: 1.4rem;
    padding-bottom: 1.4rem;
    border-bottom: 1px solid var(--border-light);
}
.terms-section:last-of-type { border-bottom: none; }
.terms-section h2 {
    font-size: .95rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: .5rem;
}
.terms-section p {
    font-size: .9rem;
    color: var(--text-2);
    line-height: 1.75;
}
.terms-section ul {
    padding-inline-start: 1.4rem;
    margin-top: .35rem;
}
.terms-section ul li {
    font-size: .9rem;
    color: var(--text-2);
    line-height: 1.75;
    margin-bottom: .2rem;
}

/* ─── Responsive ─── */
@media (max-width: 600px) {
    .row { flex-direction: column; gap: 0; }
    header { height: 54px; padding: 0 .9rem; }
    .logo { font-size: 1.1rem; }
    main { padding: 1rem .65rem 3rem; }
    .tabs { padding: .2rem; gap: .15rem; }
    nav a.nav-label { display: none; }

    .btn    { padding: .5rem 1rem; font-size: .875rem; }
    .btn-sm { padding: .32rem .75rem; font-size: .8rem; }

    .trip-actions { gap: .35rem; }
    .trip-actions .btn { flex: none; }

    .filter-pills { gap: .3rem; }
    .filter-pills .btn { font-size: .8rem; padding: .32rem .75rem; }

    .search-card form > .btn { width: 100%; margin-top: .25rem; }

    nav .btn-accent { padding: .35rem .8rem; font-size: .82rem; }
    nav button      { padding: .35rem .6rem;  font-size: .82rem; }
    nav .user-name  { display: none; }
}
