/* ============================================================
   MISSION BROTHERS - Main Stylesheet
   Modern, Clean, Mobile-First Design
   ============================================================ */

/* ============================================================
   1. IMPORTS & VARIABLES
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&family=PT+Sans+Narrow:wght@400;700&display=swap');

:root {
    --primary-color: #1e3a8a; /* Thick Blue */
    --primary-dark: #1a2f6b;
    --primary-light: #2d5aa8;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-bg: #1f2937;
    --light-bg: #f9fafb;
    --border-color: #e5e7eb;
    --text-dark: #111827;
    --text-light: #6b7280;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* ============================================================
   2. GLOBAL STYLES
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'PT Sans Narrow', 'Poppins', sans-serif;
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-dark);
    background: linear-gradient(45deg, #75b2ff00, #b8fbf4fc);
    background-attachment: fixed;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* ============================================================
   4. PAGE LOADER
   ============================================================ */

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
    color: white;
}

.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 30px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loader-subtext {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 10px;
}

/* ============================================================
   5. HEADER - FIXED
   ============================================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #60a5fa 100%);
    box-shadow: 0 10px 40px rgba(30, 58, 138, 0.3);
    z-index: 1000;
    padding: 1rem;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo-bg {
    background: white;
    border-radius: 12px;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
    }
}

.header-logo img {
    height: 45px;
    width: auto;
}

.header-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.header-brand h1 {
    font-size: 1.4rem;
    margin: 0;
    color: white;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
}

.header-brand p {
    font-size: 0.8rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    letter-spacing: 1px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================================
   NAVIGATION MENU STYLES
   ============================================================ */

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
    display: inline-block;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(30, 58, 138, 0.1);
}

.nav-link i {
    font-size: 1rem;
}

.nav-badge {
    display: inline-block;
    background: var(--danger-color);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 0.3rem;
}

/* Dropdown Menu */
.nav-dropdown > .nav-link::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.75rem;
    margin-left: 0.3rem;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover > .nav-link::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 999;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    color: var(--primary-color);
    background: var(--light-bg);
    padding-left: 1.5rem;
}

.dropdown-item i {
    min-width: 1rem;
}

/* Mega Menu */
.nav-mega .mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    min-width: 700px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.3s ease;
    z-index: 999;
    margin-top: 0.5rem;
}

.nav-mega:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.mega-menu-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    padding: 1.5rem;
    gap: 1rem;
}

.mega-menu-column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mega-menu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.mega-menu-item:hover {
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    padding-left: 1.2rem;
}

.mega-menu-item i {
    min-width: 1.2rem;
    text-align: center;
}

.header-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

/* ============================================================
   6. FOOTER - FIXED NAVIGATION
   ============================================================ */

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(30, 58, 138, 0.95) 0%, rgba(59, 130, 246, 0.95) 100%);
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 -10px 40px rgba(30, 58, 138, 0.3);
    z-index: 1000;
    padding: 0;
    backdrop-filter: blur(10px);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.footer-nav {
    max-width: 100%;
    margin: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 70px;
}

.footer-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.footer-nav-item:hover,
.footer-nav-item.active {
    color: white;
}

.footer-nav-item.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #60a5fa, #93c5fd);
    animation: expandWidth 0.3s ease;
}

@keyframes expandWidth {
    from {
        width: 0%;
        left: 50%;
    }
    to {
        width: 100%;
        left: 0%;
    }
}

.footer-nav-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    transition: transform 0.3s ease;
}

.footer-nav-item:hover .footer-nav-icon,
.footer-nav-item.active .footer-nav-icon {
    transform: scale(1.2) translateY(-2px);
}

.footer-nav-label {
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

/* ============================================================
   7. MAIN CONTENT
   ============================================================ */

main {
    padding-top: 80px;
    padding-bottom: 90px;
    min-height: 100vh;
    background: var(--light-bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ============================================================
   8. FORMS & INPUTS
   ============================================================ */

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.form-control:disabled {
    background-color: var(--light-bg);
    cursor: not-allowed;
    opacity: 0.6;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* ============================================================
   9. BUTTONS
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.btn-secondary {
    background: var(--light-bg);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
    box-shadow: var(--shadow);
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    box-shadow: var(--shadow);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ============================================================
   10. CARDS
   ============================================================ */

.card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border-bottom: none;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    background: var(--light-bg);
    border-top: 1px solid var(--border-color);
}

/* ============================================================
   11. ALERTS
   ============================================================ */

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-primary {
    background: rgba(30, 58, 138, 0.1);
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info-color);
    border-left: 4px solid var(--info-color);
}

/* ============================================================
   12. MODALS
   ============================================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    background: var(--light-bg);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    border-top: 1px solid var(--border-color);
}

/* ============================================================
   13. UTILITIES
   ============================================================ */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-column { display: flex; flex-direction: column; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.hidden { display: none !important; }
.visible { display: block !important; }

/* ============================================================
   14. RESPONSIVE DESIGN - Mobile First
   ============================================================ */

/* Extra small devices (phones, 480px and up) */
@media (max-width: 480px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.1rem; }
    
    .header-nav { gap: 1rem; }
    .header-brand h1 { font-size: 1rem; }
    
    .btn { padding: 0.65rem 1.25rem; font-size: 0.9rem; }
    
    main { padding-bottom: 80px; }
    .footer-nav { height: 60px; }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .container { padding: 0 1.5rem; }
    main { padding: 100px 0 90px 0; }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.75rem; }
    h4 { font-size: 1.5rem; }
    
    .container { max-width: 750px; padding: 0 2rem; }
    main { padding: 100px 1rem 100px 1rem; }
    
    .header-menu-toggle { display: none; }
    .header-nav { display: flex; }
    
    .footer-nav { height: 70px; }
    .footer-nav-label { font-size: 0.8rem; }
}

/* Large devices (desktops, 1024px and up) */
@media (min-width: 1024px) {
    .container { max-width: 960px; }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container { max-width: 1140px; }
    main { padding: 100px 2rem 100px 2rem; }
}

/* ============================================================
   15. SWEETALERT2 CUSTOMIZATION
   ============================================================ */

.swal2-popup {
    font-family: 'PT Sans Narrow', 'Poppins', sans-serif !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%) !important;
    border: 1px solid rgba(59, 130, 246, 0.1) !important;
}

.swal2-title {
    font-family: 'PT Sans Narrow', 'Poppins', sans-serif !important;
    font-weight: 800 !important;
    color: #1e3a8a !important;
    font-size: 1.5rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.swal2-html-container {
    font-family: 'PT Sans Narrow', 'Poppins', sans-serif !important;
    color: #6b7280 !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
}

.swal2-confirm {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #60a5fa 100%) !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    padding: 0.75rem 2rem !important;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3) !important;
    border: none !important;
    font-family: 'PT Sans Narrow', 'Poppins', sans-serif !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-size: 0.9rem !important;
    transition: all 0.3s ease !important;
}

.swal2-confirm:hover {
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.4) !important;
    transform: translateY(-3px) !important;
}

.swal2-cancel {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%) !important;
    border: 2px solid #e0e7ff !important;
    color: #1e3a8a !important;
    font-weight: 700 !important;
    font-family: 'PT Sans Narrow', 'Poppins', sans-serif !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: var(--primary-color) !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    padding: 0.75rem 2rem !important;
}

.swal2-icon.swal2-success {
    border-color: var(--success-color) !important;
}

.swal2-icon.swal2-error {
    border-color: var(--danger-color) !important;
}

.swal2-icon.swal2-warning {
    border-color: var(--warning-color) !important;
}

.swal2-icon.swal2-info {
    border-color: var(--info-color) !important;
}
