/* ===============================
   ROOT VARIABLES
=============================== */
:root {
    --primary-blue: #0a2463;
    --primary-light: #1e3a8a;
    --secondary-blue: #2563eb;
    --accent-gold: #f59e0b;
    --bg-light: #f8fafc;
    --text-dark: #1e293b;
    --text-light: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
}

/* ===============================
   PAGE BACKGROUND & TYPOGRAPHY
=============================== */
body {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8edf5 100%);
    color: var(--text-dark);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.custom-title {
    color: #ffffff;
}

/* ===============================
   HEADER STYLES
=============================== */
.bg-custom {
    background: linear-gradient(135deg, #0a2463 0%, #1e3a8a 50%, #2563eb 100%);
    color: var(--text-light);
}

/* ===============================
   TITLES
=============================== */
.title-main {
    font-size: clamp(1.6rem, 4vw, 2.3rem);
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.title-secondary {
    font-size: clamp(0.9rem, 3vw, 1.5rem);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
}

.title-tertiary {
    font-size: clamp(1.4rem, 8vw, 1.8rem);
    font-weight: 600;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===============================
   LOGO
=============================== */
.logo-img {
    height: 70px;
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

/* ===============================
   CARDS
=============================== */
.card {
    background: #ffffff;
    border: none;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: var(--bg-light);
    color: var(--primary-blue);
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    padding: 0.75rem 1.25rem;
    border-radius: 16px 16px 0 0 !important;
}

.card-body {
    background: #ffffff;
    padding: 1.25rem;
    color: var(--text-dark);
}

/* ===============================
   BUTTONS
=============================== */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: #ffffff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-blue) 100%);
}

.btn-success {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    color: #ffffff;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-warning {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    color: #ffffff;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: #64748b;
    color: #ffffff;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: #475569;
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-outline-primary:hover {
    background: var(--primary-blue);
    color: #ffffff;
}

.btn-outline-success {
    background: transparent;
    color: #059669;
    border: 2px solid #059669;
}

.btn-outline-success:hover {
    background: #059669;
    color: #ffffff;
}

.btn-outline-warning {
    background: transparent;
    color: #d97706;
    border: 2px solid #d97706;
}

.btn-outline-warning:hover {
    background: #d97706;
    color: #ffffff;
}

.btn-sm {
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 6px;
}

/* ===============================
   TABLES
=============================== */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    color: var(--text-dark);
}

.table thead th {
    background: #f1f5f9;
    color: var(--primary-blue) !important;
    font-weight: 700;
    padding: 0.5rem 0.75rem;
    border-bottom: 2px solid var(--border-color);
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table thead th a {
    color: var(--primary-blue) !important;
    text-decoration: none;
    font-weight: 700;
}

.table thead th a:hover {
    color: var(--secondary-blue) !important;
}

.table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f8fafc;
}

.table tbody td {
    padding: 0.4rem 0.75rem;
    color: var(--text-dark);
    vertical-align: middle;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #fafbfc;
}

.table-striped tbody tr:nth-of-type(odd):hover {
    background-color: #f1f5f9;
}

.table-hover tbody tr:hover {
    background-color: #f1f5f9 !important;
}

.table-sm td,
.table-sm th {
    padding: 0.3rem 0.6rem;
}

/* ===============================
   BADGES
=============================== */
.badge {
    padding: 0.3rem 0.8rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 50px;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-primary {
    background: #dbeafe;
    color: #1e3a8a;
}

.badge-secondary {
    background: #e2e8f0;
    color: #475569;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* ===============================
   FORMS
=============================== */
.form-control,
.form-select {
    border-radius: 8px;
    border: 2px solid var(--border-color);
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    color: var(--text-dark);
    background: #ffffff;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--secondary-blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    outline: none;
}

.form-control-sm,
.form-select-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-dark);
}

.form-text {
    color: #64748b;
    font-size: 0.75rem;
}

/* ===============================
   MODALS
=============================== */
.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: var(--bg-light);
    border-bottom: 2px solid var(--border-color);
    border-radius: 16px 16px 0 0 !important;
    padding: 0.75rem 1.25rem;
}

.modal-header .modal-title {
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 0.95rem;
}

.modal-body {
    color: var(--text-dark);
    padding: 1.25rem;
}

.modal-footer {
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 16px 16px !important;
    padding: 0.75rem 1.25rem;
}

/* ===============================
   PAGINATION
=============================== */
.pagination {
    gap: 0.25rem;
}

.pagination .page-link {
    border: none;
    border-radius: 8px;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    color: var(--primary-blue);
    background: transparent;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background: var(--bg-light);
    color: var(--secondary-blue);
}

.pagination .page-item.active .page-link {
    background: var(--primary-blue);
    color: #ffffff;
}

.pagination .page-item.disabled .page-link {
    color: #94a3b8;
    cursor: not-allowed;
}

/* ===============================
   ALERTS
=============================== */
.alert {
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-weight: 500;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
}

.alert-info {
    background: #dbeafe;
    color: #1e3a8a;
}

/* ===============================
   MISC ELEMENTS
=============================== */
.display-6 {
    font-size: 1.75rem;
    font-weight: 500;
}

.text-muted {
    color: #64748b !important;
}

.text-primary {
    color: var(--primary-blue) !important;
}

.text-success {
    color: #059669 !important;
}

.text-danger {
    color: #dc2626 !important;
}

.text-warning {
    color: #d97706 !important;
}

/* ===============================
   SECURITY OVERLAY
=============================== */
#securityOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 9999;
    display: none;
}

/* ===============================
   PAYMENT SECTION
=============================== */
.payment-card {
    border-left: 4px solid var(--secondary-blue) !important;
}

.upi-input {
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.btn-copy-success {
    animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.qr-code {
    transition: transform 0.3s ease;
}

.qr-code:hover {
    transform: scale(1.02);
}

/* ===============================
   FOOTER
=============================== */
footer {
    margin-top: auto;
    background: linear-gradient(135deg, #0a2463 0%, #1e3a8a 100%);
    color: #ffffff;
    padding: 1.5rem 0;
    border-top: 3px solid var(--accent-gold);
}

/* ===============================
   RESPONSIVE ADJUSTMENTS
=============================== */
@media (max-width: 768px) {
    .navbar-brand {
        padding: 0.25rem 0;
    }
    
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .navbar-nav {
        text-align: center;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .logo-img {
        height: 45px;
    }
    
    .title-main {
        font-size: 1.2rem;
    }
    
    .title-secondary {
        font-size: 0.85rem;
    }
    
    .title-tertiary {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .btn {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
    
    .table {
        font-size: 0.7rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.25rem 0.4rem;
    }
    
    .badge {
        font-size: 0.6rem;
        padding: 0.2rem 0.5rem;
    }
}

@media (max-width: 360px) {
    .title-main {
        font-size: 1rem;
    }
    
    .title-secondary {
        font-size: 0.7rem;
    }
    
    .title-tertiary {
        font-size: 0.65rem;
    }
}

/* ===============================
   SCROLLBAR
=============================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}