:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --success-color: #2ec4b6;
    --danger-color: #e63946;
    --warning-color: #ffbe0b;
    --dark-color: #1d3557;
    --light-color: #f8f9fa;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.page {
    display: none;
    min-height: 100vh;
}

.page.active {
    display: block;
}

/* Landing Page */
.landing-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.logo-section {
    text-align: center;
    margin-bottom: 60px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: white;
    font-size: 3.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.logo i {
    font-size: 4rem;
    animation: carDrive 2s ease-in-out infinite;
}

@keyframes carDrive {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

.motto {
    color: rgba(255,255,255,0.9);
    font-size: 1.3rem;
    margin-top: 15px;
    font-style: italic;
}

.role-selection {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.role-selection .btn {
    width: 180px;
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.role-selection .btn i {
    font-size: 3rem;
}

.role-selection .btn small {
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.9;
}

.btn-client {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-client:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(67, 97, 238, 0.4);
    color: white;
}

.btn-driver {
    background: linear-gradient(135deg, var(--success-color), #20a39e);
    color: white;
}

.btn-driver:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(46, 196, 182, 0.4);
    color: white;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    margin-bottom: 20px;
    background: white;
    border-radius: 15px;
    padding: 15px 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.page-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--dark-color);
}

.page-header .btn-link {
    color: var(--dark-color);
    font-size: 1.5rem;
    padding: 0;
    text-decoration: none;
}

/* Forms */
.order-form {
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.form-control, .form-select {
    border-radius: 10px;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

/* Waiting Page */
.waiting-info {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.waiting-info .spinner-border {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
}

.waiting-info p {
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.timer {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Responses & Orders Lists */
.responses-list, .orders-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.response-card, .order-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
}

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

.response-card:hover, .order-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.response-card.awarded, .order-card.awarded {
    border: 3px solid var(--success-color);
    animation: flashBorder 0.5s ease 3;
}

@keyframes flashBorder {
    0%, 100% { border-color: var(--success-color); }
    50% { border-color: var(--warning-color); }
}

.card-header-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.driver-name, .client-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-color);
}

.driver-phone, .client-phone {
    color: var(--primary-color);
    font-weight: 600;
}

.car-info {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 10px;
    margin: 10px 0;
}

.car-info span {
    display: block;
    margin: 3px 0;
}

.order-details {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 10px;
    margin: 10px 0;
}

.order-details div {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 5px 0;
}

.order-details i {
    color: var(--primary-color);
    width: 20px;
}

.price-tag {
    background: linear-gradient(135deg, var(--success-color), #20a39e);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.1rem;
}

.price-modified {
    text-decoration: line-through;
    opacity: 0.6;
    margin-right: 10px;
}

.timestamp {
    font-size: 0.8rem;
    color: #6c757d;
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.card-actions .btn {
    flex: 1;
    padding: 12px;
    font-weight: 600;
    border-radius: 10px;
}

.btn-add-price {
    background: var(--warning-color);
    color: var(--dark-color);
    border: none;
}

.btn-add-price:hover {
    background: #e5ab00;
    color: var(--dark-color);
}

.btn-accept {
    background: linear-gradient(135deg, var(--success-color), #20a39e);
    color: white;
    border: none;
}

.btn-accept:hover {
    background: linear-gradient(135deg, #20a39e, var(--success-color));
    color: white;
}

/* Ride Card */
.ride-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.ride-card .status-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--success-color), #20a39e);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Driver Controls */
.driver-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 15px 20px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.form-check-input:checked {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
}

.stat-card.success {
    background: linear-gradient(135deg, var(--success-color), #20a39e);
}

.stat-card.warning {
    background: linear-gradient(135deg, var(--warning-color), #ffa600);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.rides-table {
    width: 100%;
    border-collapse: collapse;
}

.rides-table th, .rides-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.rides-table th {
    background: #f8f9fa;
    font-weight: 600;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 10px;
    padding: 12px 25px;
    font-weight: 600;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #20a39e);
    border: none;
    border-radius: 10px;
    padding: 12px 25px;
    font-weight: 600;
}

.btn-success:hover {
    background: linear-gradient(135deg, #20a39e, var(--success-color));
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #c1121f);
    border: none;
    border-radius: 10px;
    padding: 12px 25px;
    font-weight: 600;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c1121f, var(--danger-color));
}

/* Responsive */
@media (max-width: 576px) {
    .logo {
        font-size: 2.5rem;
    }
    
    .logo i {
        font-size: 3rem;
    }
    
    .role-selection .btn {
        width: 150px;
        height: 150px;
    }
    
    .role-selection .btn i {
        font-size: 2.5rem;
    }
    
    .page-header h2 {
        font-size: 1.1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Modal styles */
.modal-content {
    border-radius: 20px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 20px;
}

.modal-body {
    padding: 20px;
}

.nav-tabs .nav-link {
    border: none;
    color: var(--dark-color);
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 10px;
    margin-right: 5px;
}

.nav-tabs .nav-link.active {
    background: var(--primary-color);
    color: white;
}
