/* ============================================
   DASH - DRIVER REGISTRATION UI CSS
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Root Variables - Dash Theme */
:root {
    --primary-purple: #8b5cf6;
    --primary-dark: #4c1d95;
    --primary-light: #a78bfa;
    --accent-indigo: #6366f1;
    --success-color: #10b981;
    --error-color: #ef4444;
    --border-color: #e2e8f0;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Typography */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
}

p {
    color: var(--text-light);
}

a {
    color: inherit;
    text-decoration: none;
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */

.header {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-indigo) 50%, var(--primary-dark) 100%);
    color: white;
    padding: 1.25rem 1rem;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo-section {
    flex-shrink: 0;
}

.logo {
    max-height: 50px;
    width: auto;
    border-radius: 4px;
    transition: var(--transition);
}

.logo:hover {
    opacity: 0.9;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-left: auto;
}

.nav-link {
    color: white;
    font-weight: 500;
    transition: var(--transition);
    font-size: 0.95rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.7);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    opacity: 0.9;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-indigo) 50%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 1rem;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
    color: white;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 400px);
    padding: 3rem 1rem;
}

.container {
    width: 100%;
    max-width: 500px;
}

/* ============================================
   REGISTRATION CARD
   ============================================ */

.registration-card {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-title {
    font-size: 1.75rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-subtitle {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* ============================================
   SUCCESS MODAL / SCREEN
   ============================================ */

.success-modal {
    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;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.success-modal-content {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: slideUpModal 0.4s ease;
}

@keyframes slideUpModal {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-icon {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.success-title {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.success-message {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.success-details {
    background: #f0fdf4;
    border-left: 4px solid var(--success-color);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    text-align: left;
}

.success-details p {
    font-size: 0.95rem;
    margin: 0.5rem 0;
    color: #065f46;
}

.success-details strong {
    color: #15803d;
}

.success-note {
    font-size: 0.85rem;
    color: #059669;
    margin-top: 1rem;
    font-style: italic;
}

.success-btn {
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--accent-indigo) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.3px;
}

.success-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(139, 92, 246, 0.3);
}

.success-btn:active {
    transform: translateY(-1px);
}

/* ============================================
   ALERTS & MESSAGES
   ============================================ */

.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    border-left: 4px solid;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background-color: #ecfdf5;
    color: #065f46;
    border-left-color: var(--success-color);
}

.alert-error {
    background-color: #fef2f2;
    color: #991b1b;
    border-left-color: var(--error-color);
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.registration-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.65rem;
    font-size: 0.95rem;
}

.form-input {
    padding: 0.9rem 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background-color: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
    background-color: white;
}

.form-input:hover {
    border-color: var(--primary-light);
}

.form-input.error {
    border-color: var(--error-color);
}

.form-input.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.error-message {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 0.4rem;
    font-weight: 500;
    display: none;
}

.error-message.show {
    display: block;
}

.field-hint {
    color: var(--text-light);
    font-size: 0.8rem;
    margin-top: 0.4rem;
    display: block;
}

/* ============================================
   SUBMIT BUTTON
   ============================================ */

.submit-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--accent-indigo) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 0.5rem;
    letter-spacing: 0.3px;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(139, 92, 246, 0.3);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.submit-btn:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    opacity: 0.6;
}

/* ============================================
   FORM HELPER
   ============================================ */

.form-helper {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-indigo) 50%, var(--primary-dark) 100%);
    color: white;
    padding: 3rem 1rem 1.5rem;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content {
    display: flex;
    gap: 4rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
}

.footer-section {
    flex: 0 1 auto;
}

.footer-section.footer-nav-right {
    text-align: right;
}

.footer-title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.85);
    transition: var(--transition);
    font-size: 0.95rem;
}

.footer-link:hover {
    color: white;
    transform: translateX(4px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-legal a:hover {
    color: white;
}

.separator {
    color: rgba(255, 255, 255, 0.4);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .header-container {
        flex-direction: row;
    }

    .nav-menu {
        gap: 1rem;
        margin-left: 1rem;
    }

    .nav-link {
        font-size: 0.85rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .registration-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }

    .form-title {
        font-size: 1.5rem;
    }

    .main-content {
        min-height: calc(100vh - 350px);
        padding: 2rem 1rem;
    }

    .footer-content {
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 1rem 0.75rem;
    }

    .header-container {
        gap: 1rem;
    }

    .logo {
        max-height: 40px;
    }

    .nav-menu {
        display: none;
    }

    .hero {
        padding: 2.5rem 1rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 0.9rem;
    }

    .registration-card {
        padding: 1.5rem 1rem;
        margin: 0;
        border-radius: 12px;
    }

    .form-title {
        font-size: 1.3rem;
    }

    .form-subtitle {
        font-size: 0.9rem;
    }

    .form-group {
        gap: 0.3rem;
    }

    .submit-btn {
        padding: 0.85rem 1.5rem;
        font-size: 0.95rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
    }

    .footer-section {
        min-width: 100%;
    }

    .footer-legal {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

a:focus,
button:focus,
input:focus {
    outline: 2px solid var(--primary-purple);
    outline-offset: 2px;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-light: #0f172a;
        --text-dark: #f1f5f9;
        --text-light: #cbd5e1;
    }

    body {
        background-color: var(--bg-light);
    }

    .registration-card {
        background-color: #1e293b;
        border-color: #334155;
    }

    .form-input {
        background-color: #1e293b;
        color: var(--text-dark);
    }
}
