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

:root {
    --primary-color: #0056a4;
    --secondary-color: #1a1a1a;
    --accent-color: #e31c25;
    --text-color: #333;
    --bg-color: #f5f5f5;
    --white: #ffffff;
    --gray: #757575;
    --border: #ddd;
    --success: #4caf50;
    --danger: #f44336;
    --shadow: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    background-image: linear-gradient(to bottom, rgba(0, 86, 164, 0.02) 0%, transparent 100%);
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* Login Screen */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.login-box {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px var(--shadow);
    width: 100%;
    max-width: 400px;
}

/* Logo */
.logo img {
    max-width: 100%;
    height: auto;
}

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

.logo i {
    font-size: 60px;
    color: var(--primary-color);
}

.logo h1 {
    font-size: 24px;
    margin: 10px 0;
    color: var(--secondary-color);
}

.logo p {
    color: var(--gray);
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--gray);
    font-size: 12px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    width: 100%;
    justify-content: center;
}

.btn-primary:hover {
    background-color: #004080;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 86, 164, 0.3);
}

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

.btn-secondary:hover {
    background-color: #666;
}

.error-message {
    color: var(--danger);
    font-size: 14px;
    margin-top: 15px;
    text-align: center;
    display: none;
}

.error-message.show {
    display: block;
}

/* Dashboard */
.navbar {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px var(--shadow);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
}

.navbar-brand i {
    color: var(--primary-color);
    font-size: 28px;
}

.navbar-brand img {
    height: 40px;
    width: auto;
}

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

.dashboard-container {
    display: flex;
    min-height: calc(100vh - 60px);
}

.sidebar {
    width: 250px;
    background-color: var(--white);
    box-shadow: 2px 0 5px var(--shadow);
}

.menu {
    list-style: none;
    padding: 20px 0;
}

.menu-item {
    padding: 15px 25px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.menu-item i {
    width: 20px;
    color: var(--gray);
}

.menu-item:hover {
    background-color: var(--bg-color);
    border-left: 4px solid var(--primary-color);
    padding-left: 21px;
}

.menu-item.active {
    background-color: var(--bg-color);
    border-left: 4px solid var(--primary-color);
    color: var(--primary-color);
    padding-left: 21px;
}

.menu-item.active i {
    color: var(--primary-color);
}

.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.section-header h2 {
    color: var(--secondary-color);
}

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

.stat-card {
    background: var(--white);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px var(--shadow);
    text-align: center;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px var(--shadow);
}

.stat-card i {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-card:hover i {
    color: var(--accent-color);
    transition: color 0.3s;
}

.stat-card h3 {
    font-size: 36px;
    margin: 10px 0;
    color: var(--secondary-color);
}

.stat-card p {
    color: var(--gray);
    font-size: 14px;
}

/* Lists */
.list-container {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 2px 10px var(--shadow);
    overflow: hidden;
}

.list-item {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.list-item:hover {
    background-color: var(--bg-color);
}

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

.item-info h3 {
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.item-info p {
    color: var(--gray);
    font-size: 14px;
}

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

.btn-icon {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    background-color: transparent;
    color: var(--gray);
}

.btn-icon:hover {
    background-color: var(--bg-color);
}

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

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

/* Filters */
.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.search-box i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 18px;
    z-index: 1;
}

.search-box input[type="text"] {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.search-box input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(0, 86, 164, 0.15);
    transform: translateY(-1px);
}

.filters select {
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    min-width: 200px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filters select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(0, 86, 164, 0.15);
}

/* Modern User Cards */
.user-card-modern {
    position: relative;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.5s ease-out;
}

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

.user-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.user-card-modern:hover .user-card-glow {
    opacity: 1;
}

.user-card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0056A4, #00D4FF, #0056A4);
    background-size: 200% 100%;
    animation: gradientMove 3s ease infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.user-card-header-modern {
    display: flex;
    gap: 24px;
    padding: 28px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #f0f0f0;
}

.user-avatar-modern {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.user-card-modern:hover .user-avatar-modern {
    transform: scale(1.05) rotate(2deg);
}

.user-avatar-modern span {
    font-size: 32px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.user-main-info-modern {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.user-main-info-modern h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
    color: #1a1a1a;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.user-username-modern {
    margin: 0 0 12px 0;
    color: #666;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge-modern {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.badge-modern i {
    font-size: 12px;
}

.badge-primary {
    background: linear-gradient(135deg, #0056A4, #0077cc);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 86, 164, 0.3);
}

.badge-danger {
    background: linear-gradient(135deg, #E31C25, #ff4757);
    color: white;
    box-shadow: 0 2px 8px rgba(227, 28, 37, 0.3);
}

.badge-info {
    background: linear-gradient(135deg, #17a2b8, #20c9e3);
    color: white;
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
}

.badge-modern:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.user-card-body-modern {
    padding: 24px 28px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.user-info-section {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.user-info-section:hover {
    background: #f0f0f0;
    transform: translateX(4px);
}

.info-icon-modern {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.user-info-section:hover .info-icon-modern {
    transform: scale(1.1);
}

.info-icon-modern i {
    font-size: 20px;
}

.info-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 12px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 15px;
    color: #1a1a1a;
    font-weight: 500;
    word-break: break-word;
}

.user-card-footer-modern {
    display: flex;
    gap: 12px;
    padding: 20px 28px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
}

.btn-modern {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-modern:hover::before {
    width: 300px;
    height: 300px;
}

.btn-modern i {
    font-size: 16px;
    position: relative;
    z-index: 1;
}

.btn-modern span {
    position: relative;
    z-index: 1;
}

.btn-edit {
    background: linear-gradient(135deg, #0056A4, #0077cc);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 86, 164, 0.3);
}

.btn-edit:hover {
    box-shadow: 0 6px 20px rgba(0, 86, 164, 0.4);
    transform: translateY(-2px);
}

.btn-delete {
    background: linear-gradient(135deg, #E31C25, #ff4757);
    color: white;
    box-shadow: 0 4px 12px rgba(227, 28, 37, 0.3);
}

.btn-delete:hover {
    box-shadow: 0 6px 20px rgba(227, 28, 37, 0.4);
    transform: translateY(-2px);
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    font-weight: 700;
}

.section-header .badge {
    font-size: 16px;
    padding: 8px 16px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Responsive */
@media (max-width: 768px) {
    .user-card-header-modern {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .user-main-info-modern h3 {
        font-size: 20px;
    }
    
    .user-card-body-modern {
        grid-template-columns: 1fr;
    }
}

/* Upcoming Races */
.upcoming-races {
    background: var(--white);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px var(--shadow);
}

.upcoming-races h3 {
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.race-item {
    padding: 15px;
    border-left: 4px solid var(--accent-color);
    background-color: var(--bg-color);
    border-radius: 5px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.race-item:hover {
    border-left-width: 6px;
    box-shadow: 0 2px 8px var(--shadow);
}

.race-item h4 {
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.race-item p {
    color: var(--gray);
    font-size: 14px;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.modal-overlay.show {
    display: block;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    z-index: 1000;
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 10px 40px var(--shadow);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    display: none;
}

.modal.show {
    display: block;
    animation: modalShow 0.3s forwards;
}

@keyframes modalShow {
    to {
        transform: translate(-50%, -50%) scale(1);
    }
}

.modal-content {
    padding: 0;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    color: var(--secondary-color);
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--gray);
    cursor: pointer;
    transition: color 0.3s;
}

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

.modal form {
    padding: 25px;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    margin-top: 20px;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

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

.badge-warning {
    background-color: var(--accent-color);
    color: var(--secondary-color);
}

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

.badge-info {
    background-color: #2196f3;
    color: var(--white);
}

/* Document Type Icons */
.doc-icon {
    font-size: 32px;
    margin-right: 15px;
}

.doc-icon.travel_plan {
    color: #2196f3;
}

.doc-icon.ticket {
    color: #ff9800;
}

.doc-icon.itinerary {
    color: #9c27b0;
}

.doc-icon.other {
    color: var(--gray);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state h3 {
    margin-bottom: 10px;
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .navbar {
        flex-direction: column;
        gap: 15px;
    }

    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

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

    .filters {
        flex-direction: column;
    }

    .filters select {
        width: 100%;
    }

    .list-item {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}
