/* Basic Reset & Body */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #333;
    --bg-light: #f4f7f6;
    --border-color: #dee2e6;
    --font-family: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-light);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn:hover {
    background-color: #0056b3;
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-secondary {
    background-color: var(--secondary-color);
}

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

.btn-outline:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-danger {
    color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-danger:hover {
    background-color: var(--danger-color);
    color: #fff;
}

.btn-large {
    padding: 12px 25px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 8px 15px;
    font-size: 0.9rem;
}

.btn-full {
    width: 100%;
}

/* Header */
.header {
    background-color: #fff;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
    text-decoration: none;
}

.nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: var(--text-color);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    font-weight: 500;
    color: var(--text-color);
}

/* Main */
.main {
    flex: 1;
    padding: 2rem 0;
}

/* Page Header */
.page-header {
    background-color: #fff;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.page-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-actions {
    display: flex;
    gap: 10px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(to right, var(--primary-color), #0056b3);
    color: #fff;
    padding: 80px 0;
    text-align: center;
}

.hero-content h1 {
    color: #fff;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Auth */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem 0;
}

.auth-card {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 500px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    margin-bottom: 0.5rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.demo-info {
    background: var(--light-color);
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
    text-align: center;
}

.demo-info p {
    margin: 0.25rem 0;
}

/* Dashboard */
.dashboard {
    padding: 2rem 0;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 3rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-content h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.stat-content p {
    margin: 0;
    color: var(--text-color);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.dashboard-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    margin: 0;
}

.trips-list {
    padding: 1.5rem;
}

.trip-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.trip-item:last-child {
    border-bottom: none;
}

.trip-info {
    flex: 1;
}

.trip-date {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
}

.trip-route {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.trip-vehicle {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.trip-stats {
    text-align: right;
}

.trip-distance {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.trip-indemnity {
    color: var(--success-color);
    font-weight: 600;
}

.vehicles-list {
    padding: 1.5rem;
}

.vehicle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.vehicle-item:last-child {
    border-bottom: none;
}

.vehicle-info {
    flex: 1;
}

.vehicle-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.vehicle-details {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.vehicle-stats {
    text-align: right;
}

.vehicle-distance {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.vehicle-indemnity {
    color: var(--success-color);
    font-weight: 600;
}

.quick-actions {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.quick-actions h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.action-card {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.action-card:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

.action-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.action-card h3 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.action-card p {
    margin: 0;
    color: var(--text-color);
    font-size: 0.9rem;
}

/* Forms */
.form-card {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section h3 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Tables */
.trips-table {
    overflow-x: auto;
}

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

.trips-table th,
.trips-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.trips-table th {
    background-color: var(--light-color);
    font-weight: 600;
    color: var(--dark-color);
}

.trip-route {
    font-weight: 500;
}

.action-buttons {
    display: flex;
    gap: 5px;
}

/* Vehicles Grid */
.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.vehicle-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.vehicle-card:hover {
    transform: translateY(-2px);
}

.vehicle-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.vehicle-icon {
    font-size: 2rem;
}

.vehicle-info h3 {
    margin-bottom: 0.25rem;
}

.vehicle-info p {
    margin: 0;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.vehicle-details {
    margin-bottom: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.detail-label {
    font-weight: 500;
    color: var(--text-color);
}

.detail-value {
    color: var(--secondary-color);
}

.vehicle-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--light-color);
    border-radius: 5px;
}

.vehicle-stats .stat-item {
    text-align: center;
}

.vehicle-stats .stat-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
}

.vehicle-stats .stat-label {
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin: 0;
}

.vehicle-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Settings */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.settings-card {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.account-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 500;
    color: var(--text-color);
}

.info-value {
    color: var(--secondary-color);
}

.settings-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Stats */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-item {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin: 0;
}

/* Filters */
.filters-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.filters-card h3 {
    margin-bottom: 1rem;
}

.filters-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

/* Baremes */
.baremes-card {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.baremes-card h2 {
    margin-bottom: 1rem;
}

.baremes-table {
    overflow-x: auto;
}

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

.baremes-table th,
.baremes-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.baremes-table th {
    background-color: var(--light-color);
    font-weight: 600;
    color: var(--dark-color);
}

.baremes-info {
    margin-bottom: 1rem;
}

.baremes-info ul {
    list-style: none;
    padding: 0;
}

.baremes-info li {
    padding: 0.25rem 0;
    border-bottom: 1px solid var(--border-color);
}

.baremes-info li:last-child {
    border-bottom: none;
}

/* Info Cards */
.info-card {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.info-card h3 {
    margin-bottom: 1rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: inherit;
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 40px 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-section h3,
.footer-section h4 {
    color: #fff;
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: var(--light-color);
    text-decoration: none;
}

.footer-section a:hover {
    text-decoration: underline;
}

.footer-bottom {
    width: 100%;
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

.footer-bottom p {
    margin: 5px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        flex-direction: column;
        gap: 10px;
    }

    .nav-user {
        flex-direction: column;
        gap: 10px;
    }

    .page-header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-actions .btn {
        width: 80%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .vehicles-grid {
        grid-template-columns: 1fr;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .filters-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-section {
        min-width: unset;
    }
}