:root {
    --primary: #facc15;
    --primary-hover: #eab308;
    --primary-dark: #ca8a04;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --success: #16a34a;
    --success-bg: #dcfce7;
    --danger: #dc2626;
    --danger-bg: #fee2e2;
    --warning: #d97706;
    --warning-bg: #fef3c7;
    --border: #e2e8f0;
    --radius: 18px;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Header */
.app-header {
    background-color: var(--primary);
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-emoji {
    font-size: 32px;
}

.brand h1 {
    font-size: 18px;
    font-weight: 800;
    color: #18181b;
    line-height: 1.1;
}

.subtext {
    font-size: 11px;
    font-weight: 600;
    color: #713f12;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-logout {
    text-decoration: none;
    background: rgba(0,0,0,0.08);
    color: #18181b;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.2s;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

/* Tickets Card */
.tickets-card {
    text-align: center;
    background: linear-gradient(180deg, #ffffff 0%, #fffbeb 100%);
    border: 2px solid #fef08a;
}

.tickets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tickets-header h2 {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.badge-tag {
    background: #fef3c7;
    color: #b45309;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
}

.tickets-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 10px 0 20px 0;
}

.tickets-number {
    font-size: 72px;
    font-weight: 900;
    line-height: 1;
    color: #18181b;
}

.tickets-unit {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Progress bar */
.progress-section {
    border-top: 1px solid #fef08a;
    padding-top: 14px;
    text-align: left;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 6px;
    color: #475569;
}

.progress-bar-bg {
    background: #e2e8f0;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    background: linear-gradient(90deg, #facc15, #eab308);
    height: 100%;
    transition: width 0.4s ease;
}

.progress-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Active Ride Card */
.active-ride-card {
    border-left: 5px solid var(--warning);
}

.ride-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.ride-card-header h3 {
    font-size: 15px;
    font-weight: 700;
}

.status-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 16px;
}

.status-pending {
    background: #fef3c7;
    color: #b45309;
}

.status-confirmed {
    background: #dcfce7;
    color: #15803d;
}

.status-canceled {
    background: #fee2e2;
    color: #b91c1c;
}

.ride-details {
    font-size: 13px;
    color: #334155;
    margin-bottom: 12px;
}

.ride-notes-box {
    background: #f8fafc;
    border-radius: 8px;
    padding: 10px;
    margin-top: 8px;
    font-style: italic;
    border: 1px dashed #cbd5e1;
}

.pulsing-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fffbeb;
    padding: 12px;
    border-radius: 10px;
    font-size: 13px;
    color: #92400e;
}

.pulse-dot {
    width: 12px;
    height: 12px;
    background: #f59e0b;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 1.5s infinite;
    flex-shrink: 0;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.success-box {
    background: var(--success-bg);
    color: #14532d;
    padding: 14px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.4;
}

.cancel-box {
    background: var(--danger-bg);
    color: #7f1d1d;
    padding: 14px;
    border-radius: 10px;
    font-size: 14px;
}

/* Taxi Button */
.booking-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-taxi {
    background: linear-gradient(180deg, #facc15 0%, #eab308 100%);
    color: #18181b;
    border: none;
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(250, 204, 21, 0.35);
    transition: transform 0.15s, box-shadow 0.15s;
    width: 100%;
}

.btn-taxi:active {
    transform: scale(0.98);
}

.btn-taxi:disabled {
    background: #cbd5e1;
    color: #64748b;
    box-shadow: none;
    cursor: not-allowed;
}

.taxi-btn-icon {
    font-size: 38px;
}

.taxi-btn-text {
    text-align: left;
    display: flex;
    flex-direction: column;
}

.taxi-btn-text strong {
    font-size: 18px;
    font-weight: 800;
}

.taxi-btn-text small {
    font-size: 12px;
    opacity: 0.85;
}

/* History */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.history-header h3 {
    font-size: 14px;
    font-weight: 700;
}

.history-list {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    background: #f8fafc;
    border-radius: 10px;
    padding: 10px;
    font-size: 12px;
    border: 1px solid #f1f5f9;
}

.history-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 700;
}

.history-notes {
    color: var(--text-muted);
    font-style: italic;
    margin-top: 4px;
}

.empty-state {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    padding: 10px;
}

/* Modals */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 999;
}

.modal-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    animation: modalPop 0.2s ease-out;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    text-align: center;
    margin-bottom: 16px;
}

.modal-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 8px;
}

.modal-body {
    font-size: 14px;
    color: #334155;
    line-height: 1.5;
}

.modal-body textarea {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    font-size: 13px;
    resize: none;
    margin-top: 6px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-actions button {
    flex: 1;
}

/* Buttons */
.btn {
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.btn-secondary {
    background: #e2e8f0;
    color: #334155;
}

.btn-primary {
    background: #facc15;
    color: #18181b;
}

.btn-dark {
    background: #18181b;
    color: #ffffff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-outline-danger {
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
}

.btn-block {
    width: 100%;
}

/* Login */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fef08a 0%, #fef9c3 100%);
    padding: 20px;
}

.login-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 32px 24px;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 20px 30px rgba(0,0,0,0.07);
    border: 2px solid #facc15;
}

.taxi-badge {
    text-align: center;
    margin-bottom: 24px;
}

.taxi-icon {
    font-size: 52px;
    display: block;
    margin-bottom: 8px;
}

.login-form .form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
}

.login-footer {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 20px;
}

/* Notification banner */
.notification-banner {
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    color: #0369a1;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.hidden {
    display: none !important;
}

.notice {
    font-size: 12px;
    padding: 10px;
    border-radius: 10px;
}

.notice-warning {
    background: #fffbeb;
    color: #b45309;
}

.notice-info {
    background: #f1f5f9;
    color: #475569;
}

.alert-error {
    background: #fee2e2;
    color: #b91c1c;
    padding: 10px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
}

/* Action Result Page */
.action-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #f1f5f9;
    padding: 20px;
}

.action-card {
    background: #ffffff;
    max-width: 440px;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.action-header {
    padding: 24px;
    text-align: center;
    color: #ffffff;
}

.header-success {
    background-color: var(--success);
}

.header-danger {
    background-color: var(--danger);
}

.action-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 8px;
}

.action-content {
    padding: 24px;
}

.action-lead {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 20px;
    text-align: center;
}

.action-info-box {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.action-hint {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

.badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }

/* In-app Toast Banner */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 440px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    padding: 16px 18px;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    pointer-events: auto;
    animation: toastSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-success {
    background: #15803d;
    color: #ffffff;
    border: 2px solid #86efac;
}

.toast-danger {
    background: #b91c1c;
    color: #ffffff;
    border: 2px solid #fca5a5;
}

.toast-info {
    background: #0369a1;
    color: #ffffff;
    border: 2px solid #7dd3fc;
}

@keyframes toastSlideDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}
