/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Immigration Header Styles (Shared across all pages) */
.immigration-body {
    margin: 0;
    padding: 0;
    background: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.immigration-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.immigration-logo-img {
    height: 100px;
    width: auto;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-btn {
    background: #4a5568;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.search-btn:hover {
    background: #2d3748;
}

.logout-btn {
    background: #dc2626;
    color: white;
    text-decoration: none;
    padding: 0.875rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.logout-btn:hover {
    background: #b91c1c;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* Immigration Navigation Styles (Shared across all pages) */
.immigration-nav {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.immigration-nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

.nav-tab-item {
    margin: 0;
}

.nav-tab {
    display: block;
    padding: 1.25rem 2rem;
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    position: relative;
    font-size: 0.95rem;
}

.nav-tab:hover {
    color: #374151;
    text-decoration: none;
    background: #f9fafb;
}

.nav-tab.active {
    color: #1f2937;
    border-bottom-color: #dc2626;
    background: #ffffff;
    font-weight: 600;
}

.nav-tab.placeholder {
    cursor: default;
    opacity: 0.7;
}

.nav-tab.placeholder:hover {
    background: transparent;
    color: #6b7280;
}

/* Common Navigation */
.back-navigation {
    text-align: right;
    margin-bottom: 2rem;
}

.back-link {
    color: #D74308;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: #b8350a;
    text-decoration: underline;
}

/* Common Page Containers */
.page-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 0;
    border-radius: 0;
}

/* Common Page Titles */
.page-title {
    color: #D74308;
    font-size: 2.2rem;
    font-weight: 400;
    margin: 0 0 2.5rem 0;
    line-height: 1.2;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

/* Common Error Styles */
.error-section {
    margin-bottom: 2rem;
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* Common Form Elements */
.form-field {
    margin-bottom: 1.5rem;
}

.form-section {
    margin-bottom: 3rem;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    background: white;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #d73502;
    box-shadow: 0 0 0 3px rgba(215, 53, 2, 0.1);
    background: #fff;
}

.form-control:hover {
    border-color: #d73502;
}

.form-control::placeholder {
    color: #6c757d;
    opacity: 0.7;
}

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

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(215, 53, 2, 0.2);
}

.btn-primary {
    background: #D74308;
    color: white;
    border-color: #D74308;
}

.btn-primary:hover {
    background: #B8360B;
    border-color: #B8360B;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(215, 67, 8, 0.3);
}

.btn-secondary {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #D74308;
}

.btn-secondary:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
    color: #b8350a;
}

.btn-success {
    background: #22c55e;
    border-color: #22c55e;
    color: white;
}

.btn-success:hover {
    background: #16a34a;
    border-color: #16a34a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
    font-weight: 600;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    border-color: #d73502;
    color: #d73502;
    font-weight: 600;
}

.btn-outline:hover {
    background-color: #d73502;
    border-color: #d73502;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(215, 53, 2, 0.2);
}

/* Common Alert Messages */
.alert {
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 6px;
    border: 1px solid transparent;
    font-size: 0.95rem;
    line-height: 1.4;
}

.alert-error {
    background-color: #f8d7da;
    border-color: #f1aeb5;
    color: #721c24;
}

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

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.alert-info {
    background-color: #cce7ff;
    border-color: #b3d7ff;
    color: #0c5460;
}

/* Common Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.main-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin: 2rem 0;
    overflow: hidden;
    padding: 2rem;
}

/* Common Responsive Utilities */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .main-content {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Responsive Styles for Immigration Header */
@media (max-width: 1024px) {
    .immigration-header-content {
        padding: 1rem 1.5rem;
    }
    
    .immigration-nav-content {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .immigration-header-content {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .immigration-logo-img {
        height: 90px;
    }
    
    .header-actions {
        gap: 0.75rem;
    }
    
    .logout-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.8125rem;
    }
    
    .search-btn {
        padding: 0.625rem;
    }
    
    .immigration-nav-content {
        padding: 0 1rem;
    }
    
    .nav-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-tab {
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .immigration-header-content {
        padding: 0.75rem;
    }
    
    .immigration-logo-img {
        height: 70px;
    }
    
    .header-actions {
        gap: 0.5rem;
    }
    
    .logout-btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    .search-btn {
        padding: 0.5rem;
    }
    
    .nav-tab {
        padding: 0.875rem 1rem;
        font-size: 0.85rem;
    }
}
