/* =========================================
   RIDER DASHBOARD STYLES
   ========================================= */
:root {
    --primary-color: #f59e0b; /* Orange for rider app */
    --primary-hover: #d97706;
    --dark-blue: #1e293b;
    --text-main: #334155;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --font-main: 'Inter', sans-serif;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-main); background: var(--bg-light); color: var(--text-main); -webkit-font-smoothing: antialiased; }

/* ===== LOGIN SCREEN ===== */
#loginScreen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark-blue) 0%, #0f172a 100%);
    padding: 20px;
}

.login-card {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    text-align: center;
}

.login-logo {
    width: 70px;
    height: 70px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 20px;
}

.login-card h2 { color: var(--dark-blue); font-size: 1.5rem; margin-bottom: 5px; }
.login-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 30px; }

.form-group { text-align: left; margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--dark-blue); margin-bottom: 8px; }
.form-group input { width: 100%; padding: 14px; border: 2px solid var(--border-color); border-radius: 10px; font-family: var(--font-main); font-size: 1rem; outline: none; transition: var(--transition); }
.form-group input:focus { border-color: var(--primary-color); box-shadow: 0 0 0 4px rgba(245,158,11,0.1); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 14px; background: var(--primary-color); color: var(--white); border: none; border-radius: 10px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: var(--transition); font-family: var(--font-main); }
.btn:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(245,158,11,0.3); }

/* ===== DASHBOARD ===== */
#dashboardScreen { display: none; padding-bottom: 80px; }

.topbar { background: var(--dark-blue); padding: 20px; color: var(--white); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow-md); }
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-avatar { width: 45px; height: 45px; background: rgba(255,255,255,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: var(--primary-color); }
.topbar-info h3 { font-size: 1rem; font-weight: 700; margin-bottom: 2px; }
.topbar-info p { font-size: 0.75rem; color: rgba(255,255,255,0.7); display: flex; align-items: center; gap: 4px; }
.topbar-info p.status-dot::before { content: ''; width: 8px; height: 8px; background: #10b981; border-radius: 50%; display: inline-block; }
.logout-btn { background: rgba(255,255,255,0.1); color: var(--white); border: none; width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--transition); font-size: 1.2rem; }
.logout-btn:hover { background: rgba(239,68,68,0.2); color: #ef4444; }

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 20px; }
.stat-card { background: var(--white); padding: 15px; border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); display: flex; align-items: center; gap: 12px; }
.stat-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.stat-icon.active { background: rgba(245,158,11,0.1); color: var(--primary-color); }
.stat-icon.completed { background: rgba(16,185,129,0.1); color: #10b981; }
.stat-info span { display: block; }
.stat-num { font-size: 1.4rem; font-weight: 800; color: var(--dark-blue); }
.stat-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; margin-top: 2px; }

/* Tabs */
.tabs { display: flex; padding: 0 20px; border-bottom: 1px solid var(--border-color); margin-bottom: 20px; }
.tab-btn { flex: 1; padding: 12px 0; text-align: center; background: none; border: none; font-size: 0.95rem; font-weight: 600; color: var(--text-muted); border-bottom: 2px solid transparent; cursor: pointer; transition: var(--transition); }
.tab-btn.active { color: var(--primary-color); border-bottom-color: var(--primary-color); }

/* Deliveries List */
.deliveries-list { padding: 0 20px; display: flex; flex-direction: column; gap: 15px; }

.delivery-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); overflow: hidden; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.delivery-header { padding: 15px; border-bottom: 1px solid var(--bg-light); display: flex; justify-content: space-between; align-items: center; }
.delivery-id { font-weight: 700; color: var(--dark-blue); font-size: 0.95rem; }
.delivery-date { font-size: 0.75rem; color: var(--text-muted); }

.status-badge { padding: 5px 12px; border-radius: 50px; font-size: 0.75rem; font-weight: 600; text-transform: capitalize; }
.status-badge.assigned { background: #dbeafe; color: #1d4ed8; }
.status-badge.in-transit { background: #ede9fe; color: #7c3aed; }
.status-badge.delivered { background: #d1fae5; color: #065f46; }

.delivery-body { padding: 15px; display: flex; flex-direction: column; gap: 12px; }

.info-row { display: flex; gap: 12px; }
.info-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.info-icon.sender { background: rgba(59,130,246,0.1); color: #3b82f6; }
.info-icon.receiver { background: rgba(16,185,129,0.1); color: #10b981; }

.info-content { flex: 1; }
.info-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 2px; }
.info-name { font-weight: 600; font-size: 0.9rem; color: var(--dark-blue); }
.info-contact { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; display: flex; align-items: center; gap: 4px; }
.info-contact a { color: var(--primary-color); text-decoration: none; }

.delivery-footer { padding: 15px; background: var(--bg-light); border-top: 1px solid var(--border-color); display: flex; flex-direction: column; gap: 10px; }

.action-select { width: 100%; padding: 12px; border: 2px solid var(--primary-color); border-radius: 8px; background: var(--white); font-family: var(--font-main); font-size: 0.9rem; font-weight: 600; color: var(--primary-color); outline: none; cursor: pointer; text-align: center; }
.action-select:disabled { border-color: var(--border-color); color: var(--text-muted); background: #f3f4f6; cursor: not-allowed; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state i { font-size: 3rem; opacity: 0.3; margin-bottom: 10px; }
