/* Driver Panel Styles */
:root {
    --primary: #1a5f2a;
    --primary-dark: #0d3d16;
    --secondary: #f4a024;
    --dark: #1a1a1a;
    --light: #f5f5f5;
    --white: #ffffff;
    --gray: #666666;
    --border: #e0e0e0;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
    --success: #28a745;
    --danger: #dc3545;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Driver Header */
.driver-header {
    background: var(--primary);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.driver-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.driver-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.driver-logo .logo-icon {
    width: 40px;
    height: 40px;
    background: var(--secondary);
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    border-radius: 6px;
}

.driver-logo .logo-text {
    color: var(--white);
    font-size: 20px;
    font-weight: 600;
}

.driver-nav {
    display: flex;
    gap: 20px;
}

.driver-nav a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s;
}

.driver-nav a:hover,
.driver-nav a.active {
    background: rgba(255,255,255,0.2);
    color: var(--white);
}

.driver-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--white);
}

.driver-info a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
}

/* Auth Section */
.auth-section {
    position: relative;
    padding: 120px 20px 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #0f1720;
}

.auth-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../img/Tuck on rode in night.jpg");
    background-size: cover;
    background-position: center center;
    filter: blur(14px) brightness(0.38);
    transform: scale(1.08);
    animation: bgMove 30s linear infinite;
    z-index: 0;
}

.auth-section::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(10, 18, 28, 0.68);
    z-index: 1;
}

@keyframes bgMove {
    0% {
        transform: scale(1.08) translate(0, 0);
    }
    50% {
        transform: scale(1.08) translate(-12px, -16px);
    }
    100% {
        transform: scale(1.08) translate(0, 0);
    }
}

.auth-container {
    position: relative;
    z-index: 2;
    background: rgba(255,255,255,0.95);
    padding: 40px;
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.25);
    max-width: 1100px;
    width: 100%;
}

.auth-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
}

.panel-left,
.panel-right {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.panel-top h1,
.form-card-header h2 {
    font-size: 38px;
    line-height: 1.05;
    color: var(--dark);
    margin: 20px 0 20px;
}

.panel-label {
    display: inline-flex;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(244,160,36,0.15);
    color: var(--secondary);
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 13px;
}

.panel-top p,
.form-card-header p {
    color: var(--gray);
    max-width: 520px;
    line-height: 1.75;
}

.feature-list {
    list-style: none;
    margin-top: 25px;
    padding: 0;
    display: grid;
    gap: 15px;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--dark);
    font-weight: 500;
}

.feature-list li i {
    color: var(--secondary);
    font-size: 18px;
}

.info-box {
    background: #f7fdf5;
    border: 1px solid rgba(34, 115, 41, 0.15);
    padding: 24px;
    border-radius: 16px;
    max-width: 520px;
}

.info-box h3 {
    margin-bottom: 10px;
    color: var(--dark);
    font-size: 20px;
}

.info-box p {
    color: var(--gray);
    line-height: 1.75;
}

.info-box a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

.panel-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.stat-card {
    background: #f7f7f7;
    padding: 24px;
    border-radius: 16px;
    text-align: center;
}

.stat-card strong {
    display: block;
    font-size: 28px;
    color: var(--dark);
    margin-bottom: 8px;
}

.stat-card span {
    color: var(--gray);
    font-size: 14px;
}

.form-card {
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.1);
}

.form-card-header {
    background: linear-gradient(180deg, #ffffff 0%, #f8faf8 100%);
    padding: 30px 30px 20px;
}

.form-card-header h2 {
    margin: 0;
}

.form-card-header p {
    margin-top: 12px;
}

.auth-form {
    padding: 30px;
    display: grid;
    gap: 18px;
}

.auth-form .form-group {
    margin-bottom: 0;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.auth-form input,
.auth-form select,
.auth-form textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.auth-form textarea {
    resize: vertical;
}

.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(26,95,42,0.08);
}

.btn {
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    width: 100%;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.auth-switch {
    text-align: center;
    margin-top: 10px;
    color: var(--gray);
}

.auth-switch a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

@media (max-width: 980px) {
    .auth-grid {
        grid-template-columns: 1fr;
    }

    .panel-stats {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .auth-section {
        padding: 100px 16px 60px;
    }

    .auth-container {
        padding: 24px;
    }

    .panel-top h1,
    .form-card-header h2 {
        font-size: 30px;
    }

    .feature-list {
        gap: 12px;
    }

    .panel-stats {
        grid-template-columns: 1fr;
    }
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.checkbox-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

.btn {
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    width: 100%;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #218838;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: var(--gray);
}

.auth-switch a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.footer {
    background: #09121a;
    color: #cbd5e1;
    padding: 36px 20px 24px;
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
}

.footer-col h4 {
    color: #f8fafc;
    margin-bottom: 14px;
    font-size: 16px;
}

.footer-col p,
.footer-col li,
.footer-col a {
    color: #cbd5e1;
    line-height: 1.8;
}

.footer-col a {
    text-decoration: none;
}

.footer-col a:hover {
    color: #f8fafc;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-copy {
    margin-top: 28px;
    text-align: center;
    color: rgba(248,250,252,0.68);
    font-size: 14px;
}

/* Dashboard Section */
.dashboard-section {
    padding: 100px 20px 50px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-card > i {
    font-size: 40px;
    color: var(--primary);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
}

.stat-label {
    font-size: 14px;
    color: var(--gray);
}

/* Loads Section */
.loads-section {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.section-header {
    margin-bottom: 25px;
}

.section-header h2 {
    font-size: 22px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h2 i {
    color: var(--primary);
}

.section-header p {
    color: var(--gray);
    margin-top: 5px;
    margin-left: 35px;
}

.loads-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Load Card */
.load-card {
    background: var(--light);
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center;
    transition: all 0.3s;
}

.load-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.load-info h4 {
    font-size: 18px;
    color: var(--dark);
    margin-bottom: 10px;
}

.load-route {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.load-route i {
    color: var(--primary);
}

.load-route span {
    font-weight: 600;
    color: var(--dark);
}

.load-route .arrow {
    color: var(--secondary);
}

.load-details {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.load-detail {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: var(--gray);
}

.load-detail i {
    color: var(--primary);
}

.load-distance {
    background: var(--secondary);
    color: var(--dark);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.load-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.load-actions .btn {
    padding: 10px 25px;
    font-size: 14px;
    min-width: 120px;
}

.no-loads {
    text-align: center;
    padding: 40px;
    color: var(--gray);
}

.no-loads i {
    font-size: 50px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Profile Section */
.profile-section {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.profile-card {
    background: var(--light);
    padding: 25px;
    border-radius: 10px;
}

.profile-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.profile-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-item > i {
    width: 45px;
    height: 45px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--white);
}

.profile-item label {
    font-size: 13px;
    color: var(--gray);
    display: block;
}

.profile-item span {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 30px;
    cursor: pointer;
    color: var(--gray);
}

.close-modal:hover {
    color: var(--dark);
}

.modal-content h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--dark);
}

#loadDetailsContent {
    margin-bottom: 25px;
}

#loadDetailsContent p {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
}

#loadDetailsContent p strong {
    color: var(--dark);
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .load-card {
        grid-template-columns: 1fr;
    }
    
    .load-actions {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .profile-info {
        grid-template-columns: 1fr;
    }
}