/* Main Site Styles - Consolidated CSS */

/* ==========================================================================
   Base Styles
   ========================================================================== */

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* ==========================================================================
   Header and Navigation Styles
   ========================================================================== */

.header {
    background-color: #113555;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.site-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0;
    text-decoration: none;
    color: white;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.nav-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Main Content Area
   ========================================================================== */

.main-content {
    margin: 0 auto;
}

/* ==========================================================================
   Dashboard Layout Styles
   ========================================================================== */

/* Full-width dashboard container */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - 80px); /* Subtract header height */
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
}

/* Left Navigation Sidebar */
.dashboard-sidebar {
    width: 250px;
    background-color: #113555;
    color: white;
    flex-shrink: 0;
    box-shadow: 2px 0 4px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid #34495e;
    background-color: #1a252f;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item {
    margin: 0;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.menu-link:hover {
    background-color: #34495e;
    color: white;
    border-left-color: #3498db;
}

.menu-link.active {
    background-color: #3498db;
    color: white;
    border-left-color: #2980b9;
}

.menu-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.menu-link.disabled:hover {
    background-color: transparent;
    border-left-color: transparent;
}

.menu-icon {
    font-size: 1.2rem;
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.menu-text {
    font-weight: 500;
}

/* Main Content Area */
.dashboard-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: white;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background-color: white;
    border-bottom: 1px solid #e9ecef;
}

.content-header h1 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 600;
}

.content-actions {
    display: flex;
    gap: 0.5rem;
}

.content-body {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* ==========================================================================
   Dashboard Main Page Styles
   ========================================================================== */

.dashboard-welcome {
    max-width: 100%;
}

.welcome-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
}

.welcome-card h2 {
    margin: 0 0 1rem 0;
    font-size: 2rem;
    font-weight: 600;
}

.welcome-card p {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.stat-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 50%;
}

.stat-content h3 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 600;
}

.stat-number {
    margin: 0;
    font-size: 1.5rem;
    font-weight: bold;
    color: #3498db;
}

/* ==========================================================================
   Home Page Styles
   ========================================================================== */

.welcome-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.welcome-section h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 2rem;
}

.user-info, .guest-info {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
}

.user-info h2 {
    color: #27ae60;
    margin-bottom: 1rem;
}

.guest-info h2 {
    color: #e74c3c;
    margin-bottom: 1rem;
}

/* ==========================================================================
   Login Page Styles
   ========================================================================== */

.login-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.login-form h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

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

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

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #2c3e50;
    box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.2);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #2c3e50;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 1rem;
}

.btn:hover {
    background-color: #34495e;
}

.btn-primary {
    background-color: #2c3e50;
    color: white;
}

.btn-primary:hover {
    background-color: #34495e;
}

.login-help {
    text-align: center;
    margin-top: 1.5rem;
    color: #666;
    font-size: 0.9rem;
}

/* ==========================================================================
   Alert/Message Styles
   ========================================================================== */

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

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

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

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* ==========================================================================
   Modern Form Styles
   ========================================================================== */

/* Form Container */
.modern-form {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    border: 1px solid #e5e7eb;
    max-width: 600px;
    margin: 0 auto;
}

.modern-form .form-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
}

.modern-form .form-header h2 {
    color: #1f2937;
    font-size: 1.875rem;
    font-weight: 700;
    margin: 0;
}

.modern-form .form-header p {
    color: #6b7280;
    margin: 0.5rem 0 0 0;
    font-size: 0.875rem;
}

/* Form Groups */
.modern-form .form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.modern-form .form-group.row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.modern-form .form-group.row .col {
    flex: 1;
}

/* Labels */
.modern-form .form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modern-form .form-label .required {
    color: #ef4444;
    margin-left: 0.25rem;
}

/* Input Fields */
.modern-form .form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.5;
    color: #1f2937;
    background-color: #ffffff;
    transition: all 0.2s ease-in-out;
    box-sizing: border-box;
}

.modern-form .form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.modern-form .form-control:hover:not(:focus) {
    border-color: #d1d5db;
}

.modern-form .form-control.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.modern-form .form-control.is-valid {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Form Text */
.modern-form .form-text {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.5rem;
    line-height: 1.4;
}

.modern-form .form-text ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.25rem;
}

.modern-form .form-text li {
    margin-bottom: 0.25rem;
}

/* Invalid Feedback */
.modern-form .invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #ef4444;
    font-weight: 500;
}

/* Buttons */
.modern-form .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    min-height: 48px;
    gap: 0.5rem;
}

.modern-form .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.modern-form .btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.3);
}

.modern-form .btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(59, 130, 246, 0.4);
}

.modern-form .btn-secondary {
    background: #f8fafc;
    color: #475569;
    border: 2px solid #e2e8f0;
}

.modern-form .btn-secondary:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.modern-form .btn-outline-primary {
    background: transparent;
    color: #3b82f6;
    border: 2px solid #3b82f6;
}

.modern-form .btn-outline-primary:hover:not(:disabled) {
    background: #3b82f6;
    color: #ffffff;
    transform: translateY(-1px);
}

.modern-form .btn-outline-danger {
    background: transparent;
    color: #ef4444;
    border: 2px solid #ef4444;
}

.modern-form .btn-outline-danger:hover:not(:disabled) {
    background: #ef4444;
    color: #ffffff;
    transform: translateY(-1px);
}

.modern-form .btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    min-height: 36px;
}

/* Button Groups */
.modern-form .btn-group {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f3f4f6;
}

.modern-form .btn-group .btn {
    flex: 0 0 auto;
}

/* Form Check (Checkboxes/Radio) */
.modern-form .form-check {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    border: 2px solid #f3f4f6;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.modern-form .form-check:hover {
    border-color: #d1d5db;
    background-color: #f9fafb;
}

.modern-form .form-check-input {
    margin: 0;
    margin-right: 0.75rem;
    margin-top: 0.125rem;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background-color: #ffffff;
    cursor: pointer;
}

.modern-form .form-check-input:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.modern-form .form-check-label {
    flex: 1;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    margin: 0;
}

/* Cards */
.modern-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.modern-card .card-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modern-card .card-header h2,
.modern-card .card-header h5 {
    margin: 0;
    color: #1f2937;
    font-weight: 700;
}

.modern-card .card-body {
    padding: 1.5rem;
}

.modern-card .card-body h5 {
    color: #374151;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Alerts */
.modern-form .alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid;
    font-weight: 500;
}

.modern-form .alert-success {
    background-color: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

.modern-form .alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.modern-form .alert-warning {
    background-color: #fffbeb;
    color: #92400e;
    border-color: #fed7aa;
}

.modern-form .alert-info {
    background-color: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}

/* Responsive Design for Forms */
@media (max-width: 768px) {
    .modern-form {
        margin: 1rem;
        padding: 1.5rem;
        border-radius: 12px;
    }
    
    .modern-form .form-group.row {
        flex-direction: column;
        gap: 0;
    }
    
    .modern-form .btn-group {
        flex-direction: column;
    }
    
    .modern-form .btn-group .btn {
        width: 100%;
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.dashboard-main {
    text-align: center;
    padding: 2rem;
}

.dashboard-main h1 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    /* Header responsive */
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    /* Dashboard responsive */
    .dashboard-container {
        flex-direction: column;
    }

    .dashboard-sidebar {
        width: 100%;
        order: 2;
    }

    .dashboard-content {
        order: 1;
        margin: 0;
        border-radius: 0;
    }

    .sidebar-menu {
        display: flex;
        overflow-x: auto;
    }

    .menu-item {
        flex-shrink: 0;
    }

    .menu-link {
        padding: 1rem;
        border-left: none;
        border-bottom: 3px solid transparent;
    }

    .menu-link:hover,
    .menu-link.active {
        border-left: none;
        border-bottom-color: #3498db;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .welcome-card {
        padding: 1.5rem;
    }
    
    .welcome-card h2 {
        font-size: 1.5rem;
    }

    .content-header {
        padding: 1rem;
    }

    .content-body {
        padding: 1rem;
    }
    
    /* Home page responsive */
    .welcome-section {
        padding: 1rem;
    }
    
    /* Login page responsive */
    .login-container {
        margin: 1rem;
        padding: 1.5rem;
    }
}
