/* Umrah Package Management System - Mobile-First Responsive Styles */
:root {
    --primary-color: #2e7d32;
    --secondary-color: #388e3c;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    --info-color: #2196f3;
    --dark-color: #1b5e20;
    --light-bg: #f5f5f5;
}

/* Base Styles - Mobile First */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Mobile-friendly text sizes */
h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }

/* Tablet and up */
@media (min-width: 768px) {
    body { font-size: 15px; }
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.875rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    h5 { font-size: 1.1rem; }
}

/* Desktop */
@media (min-width: 992px) {
    body { font-size: 16px; }
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
}

/* Navbar Styles - Mobile First */
.navbar-brand {
    font-weight: 700;
    color: white !important;
    font-size: 1.1rem;
}

.navbar-custom {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 0.75rem 0;
}

.navbar-toggler {
    border-color: rgba(255,255,255,0.3);
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255,255,255,0.25);
}

/* Mobile menu */
.navbar-collapse {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    margin: 0.5rem -1rem 0;
    padding: 1rem;
    border-radius: 0.5rem;
}

@media (min-width: 992px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .navbar-collapse {
        background: none;
        margin: 0;
        padding: 0;
    }
}

/* Card Styles - Mobile First */
.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .card {
        border-radius: 1rem;
        margin-bottom: 1.5rem;
    }
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    font-weight: 600;
    border-radius: 0.75rem 0.75rem 0 0 !important;
    padding: 1rem;
    font-size: 1rem;
}

@media (min-width: 768px) {
    .card-header {
        padding: 1.25rem;
        font-size: 1.1rem;
    }
}

.card-body {
    padding: 1rem;
}

@media (min-width: 768px) {
    .card-body {
        padding: 1.5rem;
    }
}

/* Sidebar Styles - Mobile First (Off-canvas for mobile) */
.sidebar {
    background: white;
    padding: 1rem 0;
}

.sidebar .nav-link {
    color: #333;
    padding: 0.75rem 1rem;
    margin: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.sidebar .nav-link i {
    margin-right: 0.75rem;
    width: 20px;
    font-size: 1.1rem;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

/* Desktop sidebar */
@media (min-width: 768px) {
    .sidebar {
        min-height: calc(100vh - 56px);
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
        position: sticky;
        top: 56px;
    }
    
    .sidebar .nav-link {
        padding: 0.875rem 1.25rem;
        margin: 0.375rem 0.75rem;
    }
}

/* Mobile Sidebar Toggle */
@media (max-width: 767px) {
    .sidebar {
        position: fixed;
        top: 56px;
        left: -100%;
        width: 280px;
        height: calc(100vh - 56px);
        z-index: 1040;
        transition: left 0.3s ease;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .sidebar-backdrop {
        display: none;
        position: fixed;
        top: 56px;
        left: 0;
        width: 100%;
        height: calc(100vh - 56px);
        background: rgba(0, 0, 0, 0.5);
        z-index: 1039;
    }
    
    .sidebar-backdrop.show {
        display: block;
    }
}

/* Dashboard Cards - Mobile First */
.stat-card {
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s;
    min-height: 120px;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-card .stat-icon {
    font-size: 2rem;
    opacity: 0.3;
}

@media (min-width: 768px) {
    .stat-card {
        min-height: 140px;
    }
    
    .stat-card .stat-icon {
        font-size: 2.5rem;
    }
}

@media (min-width: 992px) {
    .stat-card:hover {
        transform: translateY(-5px);
    }
}

/* Form Styles - Mobile First */
.form-control,
.form-select {
    padding: 0.625rem 0.75rem;
    font-size: 0.95rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(46, 125, 50, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .form-control,
    .form-select {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .form-label {
        font-size: 0.95rem;
    }
}

/* Button Styles - Mobile First */
.btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.95rem;
    border-radius: 0.5rem;
    transition: all 0.3s;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

@media (min-width: 768px) {
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 0.875rem 2rem;
        font-size: 1.1rem;
    }
}

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

.btn-primary:hover {
    background-color: var(--dark-color);
    border-color: var(--dark-color);
}

/* Mobile action buttons in a row */
.btn-action {
    padding: 0.375rem 0.625rem;
    font-size: 0.85rem;
    margin: 0.125rem;
}

@media (min-width: 768px) {
    .btn-action {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
        margin: 0.25rem;
    }
}

/* Table Styles - Mobile First */
.table-responsive {
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.table {
    font-size: 0.875rem;
    margin-bottom: 0;
}

.table thead th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    border: none;
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 0.75rem 0.5rem;
    vertical-align: middle;
}

@media (min-width: 768px) {
    .table {
        font-size: 0.95rem;
    }
    
    .table thead th {
        padding: 1rem 0.75rem;
        font-size: 0.95rem;
    }
    
    .table tbody td {
        padding: 1rem 0.75rem;
    }
}

/* Mobile table scrolling */
@media (max-width: 767px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table {
        min-width: 600px;
    }
}

/* Badge Styles - Mobile First */
.badge {
    padding: 0.375rem 0.625rem;
    font-size: 0.8rem;
    font-weight: 500;
}

@media (min-width: 768px) {
    .badge {
        padding: 0.5rem 0.875rem;
        font-size: 0.85rem;
    }
}

.badge-status {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

@media (min-width: 768px) {
    .badge-status {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* Payment Status Colors */
.status-pending {
    background-color: var(--warning-color);
}

.status-partial {
    background-color: var(--info-color);
}

.status-paid {
    background-color: var(--success-color);
}

/* Public Signup Page - Mobile First */
.signup-container {
    max-width: 100%;
    margin: 1rem;
    padding: 0;
}

@media (min-width: 576px) {
    .signup-container {
        max-width: 540px;
        margin: 2rem auto;
    }
}

@media (min-width: 768px) {
    .signup-container {
        max-width: 720px;
        margin: 3rem auto;
    }
}

@media (min-width: 992px) {
    .signup-container {
        max-width: 800px;
        margin: 50px auto;
    }
}

.package-info {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .package-info {
        padding: 2rem;
        border-radius: 1rem;
        margin-bottom: 2rem;
    }
}

@media (min-width: 992px) {
    .package-info {
        padding: 2.5rem;
    }
}

.package-price {
    font-size: 2rem;
    font-weight: 700;
}

@media (min-width: 768px) {
    .package-price {
        font-size: 2.5rem;
    }
}

@media (min-width: 992px) {
    .package-price {
        font-size: 3rem;
    }
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .feature-list li {
        padding: 0.625rem 0;
        font-size: 1rem;
    }
}

.feature-list li i {
    color: var(--success-color);
    margin-right: 0.75rem;
    font-size: 1rem;
}

/* Invoice Styles - Mobile First */
.invoice-box {
    max-width: 100%;
    margin: auto;
    padding: 1rem;
    background: white;
    border-radius: 0.75rem;
}

@media (min-width: 768px) {
    .invoice-box {
        max-width: 750px;
        padding: 2rem;
        border-radius: 1rem;
    }
}

@media (min-width: 992px) {
    .invoice-box {
        max-width: 800px;
        padding: 2.5rem;
    }
}

.invoice-header {
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .invoice-header {
        padding-bottom: 1.5rem;
        margin-bottom: 2rem;
    }
}

.invoice-table {
    width: 100%;
    margin-top: 1rem;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .invoice-table {
        margin-top: 1.5rem;
        font-size: 1rem;
    }
}

.invoice-table th {
    background-color: var(--light-bg);
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
}

.invoice-table td {
    padding: 0.75rem 0.5rem;
}

@media (min-width: 768px) {
    .invoice-table th,
    .invoice-table td {
        padding: 1rem;
        font-size: 1rem;
    }
}

/* Payment Progress - Mobile First */
.payment-progress {
    margin: 1rem 0;
}

.payment-progress .progress {
    height: 25px;
    border-radius: 1rem;
}

@media (min-width: 768px) {
    .payment-progress {
        margin: 1.5rem 0;
    }
    
    .payment-progress .progress {
        height: 30px;
        border-radius: 1.25rem;
    }
}

.payment-progress .progress-bar {
    background-color: var(--success-color);
    font-weight: 600;
    font-size: 0.85rem;
}

@media (min-width: 768px) {
    .payment-progress .progress-bar {
        font-size: 0.95rem;
    }
}

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

.login-card {
    max-width: 100%;
    width: 100%;
}

@media (min-width: 576px) {
    .login-card {
        max-width: 450px;
    }
}

/* Alert Styles - Mobile First */
.alert {
    border-radius: 0.5rem;
    border: none;
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .alert {
        border-radius: 0.75rem;
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }
}

/* Modal Responsive */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
}

/* Utility Classes - Mobile First */
.text-truncate-mobile {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

@media (min-width: 768px) {
    .text-truncate-mobile {
        max-width: 100%;
    }
}

/* Container Padding */
.container,
.container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 768px) {
    .container,
    .container-fluid {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Main Content Area */
main {
    padding: 1rem 0;
}

@media (min-width: 768px) {
    main {
        padding: 1.5rem 0;
    }
}

/* Page Header - Mobile First */
.page-header {
    padding: 1rem 0;
    margin-bottom: 1rem;
    border-bottom: 2px solid #dee2e6;
}

@media (min-width: 768px) {
    .page-header {
        padding: 1.5rem 0;
        margin-bottom: 1.5rem;
    }
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: block;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1050;
    font-size: 1.25rem;
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner-overlay.show {
    display: flex;
}

/* Print Styles */
@media print {
    .no-print,
    .navbar,
    .sidebar,
    .btn,
    .mobile-menu-btn {
        display: none !important;
    }
    
    .invoice-box {
        box-shadow: none;
        max-width: 100%;
    }
    
    body {
        background: white;
    }
    
    .card {
        box-shadow: none;
        page-break-inside: avoid;
    }
}

/* Accessibility Improvements */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Touch-friendly spacing on mobile */
@media (max-width: 767px) {
    .form-group,
    .mb-3 {
        margin-bottom: 1rem !important;
    }
    
    .btn {
        min-height: 44px; /* Touch target size */
    }
    
    .form-control,
    .form-select {
        min-height: 44px;
    }
}

/* Hero Section - Mobile First */
.hero-section {
    padding: 3rem 1rem;
}

@media (min-width: 768px) {
    .hero-section {
        padding: 5rem 2rem;
    }
}

@media (min-width: 992px) {
    .hero-section {
        padding: 100px 0;
    }
}

/* Feature Cards - Mobile First */
.feature-card {
    transition: transform 0.3s;
    height: 100%;
    padding: 1.25rem;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2e7d32;
}

@media (min-width: 768px) {
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-icon {
        font-size: 3rem;
        margin-bottom: 1.25rem;
    }
}

/* Responsive spacing utilities */
.mb-mobile-3 {
    margin-bottom: 1rem !important;
}

@media (min-width: 768px) {
    .mb-mobile-3 {
        margin-bottom: 1.5rem !important;
    }
}

/* Responsive grid gaps */
.row.g-mobile {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
}

@media (min-width: 768px) {
    .row.g-mobile {
        --bs-gutter-x: 1.5rem;
        --bs-gutter-y: 1.5rem;
    }
}

