/* app.css - Core Theme, Base Styles, and Global Utilities */

/* -------------------------------------------------------------------------- */
/*                            1. RESET & BASE                                 */
/* -------------------------------------------------------------------------- */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--home-bg-secondary);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.preload * {
    transition: none !important;
}

main {
    flex: 1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}


/* -------------------------------------------------------------------------- */
/*                         2. LAYOUT & CONTAINERS                             */
/* -------------------------------------------------------------------------- */

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.page-content-wrapper {
    max-width: 1024px;
    margin: auto;
    padding: 100px 0;
}

/* -------------------------------------------------------------------------- */
/*                      3. TYPOGRAPHY & TEXT UTILITIES                        */
/* -------------------------------------------------------------------------- */

.page-title {
    font-weight: 800;
    font-size: 2.5rem;
    color: var(--text-main);
    margin-bottom: 20px;
}

.page-header {
    background: transparent;
    text-align: center;
    border-bottom: none;
    margin-bottom: 0;
}

.page-content-body {
    border-radius: 5px;
    padding: 10px;
    font-size: 1rem;
    line-height: 1.9;
    text-align: left;
}

/* Alignment Helpers */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}


/* -------------------------------------------------------------------------- */
/*                    4. BUTTONS & INTERACTIVE ELEMENTS                       */
/* -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 99px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    font-size: 1rem;
}

.btn:disabled,
.btn.is-loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

/* Primary */
.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* Submit (Auth/Forms) */
.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 99px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 24px;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Ghost */
.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}

.btn-ghost:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

/* Danger with Glow */
.btn-danger-glow {
    background: var(--error) !important;
    border-color: var(--error) !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
}

.btn-danger-glow:hover {
    background: #dc2626 !important;
}

.btn-block {
    width: 100%;
}

/* Password Toggle Icon */
.btn-password-toggle {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-password-toggle:hover {
    color: var(--text-main);
}


/* -------------------------------------------------------------------------- */
/*                           5. FORMS & INPUTS                                */
/* -------------------------------------------------------------------------- */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-input::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}


/* -------------------------------------------------------------------------- */
/*                          6. GLOBAL UTILITIES                               */
/* -------------------------------------------------------------------------- */

.hidden,
.d-none {
    display: none !important;
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.mt-16 {
    margin-top: 16px;
}

.icon-fixed-width {
    width: 20px;
    text-align: center;
    display: inline-block;
}


/* -------------------------------------------------------------------------- */
/*                       7. PAGE SPECIFIC (CONTACT)                           */
/* -------------------------------------------------------------------------- */

/* Contact Page Layout */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 50px;
    margin-bottom: 50px;
    text-align: left;
}

@media (min-width: 768px) {
    .contact-layout {
        grid-template-columns: 1fr 1.2fr;
        gap: 60px;
        align-items: start;
    }
}

.contact-info-side {
    padding: 20px 0;
}

.contact-subtitle {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text-main) 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-text {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* Contact Card (Overrides) */
.contact-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 24px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.2);
}

@media (min-width: 768px) {
    .contact-card {
        padding: 40px;
        border-radius: 24px;
        box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
    }
}

.contact-card .form-group {
    margin-bottom: 24px;
}

.contact-card .form-label {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-main);
}

.contact-card .form-input {
    background: transparent;
    border: 1px solid var(--glass-border);
    padding: 16px;
    font-size: 1rem;
    border-radius: 12px;
}

.contact-card .form-input:focus {
    background: rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

.contact-card .btn-submit {
    margin-top: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.contact-hero-image {
    max-width: 100%;
    height: auto;
    border-radius: 24px;
    margin-top: 30px;
}


/* Dynamic Contact Grid */
.contact-dynamic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 15%;
}

.contact-card-sm {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 10px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card-sm:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
}

.contact-icon-circle {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.contact-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.contact-card-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* -------------------------------------------------------------------------- */
/*                            8. MODALS & OVERLAYS                            */
/* -------------------------------------------------------------------------- */

/* Custom Premium Modal */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-modal-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.custom-modal {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    width: 90%;
    max-width: 440px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.95) translateY(10px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}

.custom-modal-overlay.is-visible .custom-modal {
    transform: scale(1) translateY(0);
}

.custom-modal-icon {
    width: 60px;
    height: 60px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1.5rem auto;
}

.custom-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.custom-modal-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.custom-modal-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.custom-modal-btn-cancel {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.custom-modal-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
}

.custom-modal-btn-confirm {
    background: #ef4444;
    color: white;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    transition: all 0.2s;
}

.custom-modal-btn-confirm:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* -------------------------------------------------------------------------- */
/*                            9. ACTIONS & BADGES                             */
/* -------------------------------------------------------------------------- */

.btn-delete {
    color: var(--error);
    background: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-delete:hover {
    opacity: 0.8;
}

/* Status Badges */
.badge {
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    margin-right: 4px;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-primary {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* -------------------------------------------------------------------------- */
/*                         10. NEW UTILITIES (REFACTORED)                     */
/* -------------------------------------------------------------------------- */

.text-xs {
    font-size: 0.75rem;
}

.ms-2 {
    margin-left: 0.5rem;
}

.max-w-300 {
    max-width: 300px;
}

.user-card-highlight {
    border-left: 5px solid var(--primary);
}

/* Payment Success Page */
.payment-success-container {
    padding: 100px 20px;
    text-align: center;
}

.payment-success-card {
    max-width: 500px;
    margin: 0 auto;
    padding: 40px;
    border-radius: var(--radius);
}

.payment-success-icon {
    font-size: 3rem;
    color: var(--success);
    margin-bottom: 20px;
}

.payment-success-title {
    margin-bottom: 10px;
}

.payment-success-text {
    margin-bottom: 30px;
}

/* Verification Input */
.input-verification {
    font-size: 1.5rem !important;
    letter-spacing: 0.5rem;
    text-align: center;
}

/* -------------------------------------------------------------------------- */
/*                        11. ERROR PAGES (404, 500)                          */
/* -------------------------------------------------------------------------- */

body.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    text-align: center;
}

.error-card {
    text-align: center;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
}

.error-code {
    font-size: 6rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 1rem;
    text-shadow: 0 10px 30px rgba(var(--primary-rgb), 0.3);
}