/* Base Styles */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --success-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --light-color: #ecf0f1;
    --dark-color: #34495e;
    --text-color: #333;
    --border-radius: 4px;
    --box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

a:hover {
    text-decoration: underline;
}

/* Layout */
header {
    background-color: var(--secondary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--box-shadow);
}

main {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 1rem 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-left {
    text-align: left;
}

.footer-right {
    text-align: right;
}

.language-form {
    display: inline-block;
}

#language-select {
    background-color: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    padding: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
}

#language-select option {
    background-color: var(--secondary-color);
    color: white;
}

/* Navigation */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.logo a {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

.nav-links {
    display: flex;
}

.nav-links a {
    color: white;
    margin-left: 1.5rem;
    text-decoration: none;
}

.nav-links a:hover {
    text-decoration: underline;
}

.nav-links a.highlight-button {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    font-weight: 600;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
}

.nav-links a.highlight-button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.user-menu {
    position: relative;
}

.dropdown-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.5rem;
}

.dropdown-menu {
    position: absolute;
    right: 0;
    background-color: white;
    min-width: 160px;
    box-shadow: var(--box-shadow);
    z-index: 1;
    display: none;
    border-radius: var(--border-radius);
}

.dropdown-menu a {
    color: var(--text-color);
    padding: 0.75rem 1rem;
    display: block;
    text-decoration: none;
}

.dropdown-menu a:hover {
    background-color: var(--light-color);
}

.dropdown:hover .dropdown-menu {
    display: block;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.form-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s;
}

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

.btn-primary:hover {
    background-color: #2980b9;
}

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

.btn-danger:hover {
    background-color: #c0392b;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-form {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 100%;
    max-width: 400px;
}

.login-form h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--secondary-color);
}

.forgot-password {
    font-size: 0.9rem;
}

.register-link {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

/* Alerts */
.messages {
    margin-bottom: 1.5rem;
}

.alert {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    border-color: var(--success-color);
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border-color: var(--danger-color);
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: var(--warning-color);
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: var(--primary-color);
    color: #0c5460;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
    transition: transform 0.3s ease;
}

.mobile-menu-toggle.active {
    transform: rotate(90deg);
}

.mobile-menu-toggle .bar {
    height: 3px;
    width: 100%;
    background-color: white;
    border-radius: 10px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Touch Feedback */
.touch-active {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

/* Responsive Design */
@media (max-width: 992px) {
    main {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-nav {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav-container {
        display: none;
        width: 100%;
    }
    
    .nav-container.active {
        display: block;
    }
    
    .nav-links {
        margin-top: 1rem;
        flex-direction: column;
        width: 100%;
    }
    
    .nav-links a {
        margin: 0;
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        display: block;
    }
    
    .user-menu {
        margin-top: 1rem;
        width: 100%;
    }
    
    .dropdown-toggle {
        width: 100%;
        text-align: left;
        padding: 0.75rem 0;
    }
    
    .dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        margin-top: 0.5rem;
    }
    
    /* Form responsiveness */
    .form-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    /* Table responsiveness */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (max-width: 576px) {
    main {
        padding: 1rem;
    }
    
    .login-form {
        padding: 1.5rem;
    }
    
    /* Smaller touch targets for mobile */
    .btn {
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.8rem;
        font-size: 0.95rem;
    }
    
    /* Adjust spacing for mobile */
    .form-group {
        margin-bottom: 0.8rem;
    }
    
    /* Improve touch targets */
    .nav-links a,
    .dropdown-menu a {
        padding: 0.8rem 0;
    }
}
