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

:root {
    /* Approved Navy & Gold Premium Design System */
    --primary-color: #1E3A8A; /* Navy */
    --primary-dark: #172554;
    --primary-light: #3B82F6;
    --primary-glow: rgba(30, 58, 138, 0.15);

    --accent-color: #CA8A04; /* Gold */
    --accent-hover: #A16207;
    --accent-glow: rgba(202, 138, 4, 0.15);

    --bg-color: #F8FAFC;
    --surface-color: #FFFFFF;
    --border-color: #E2E8F0;
    
    --text-primary: #1E3A8A; 
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --text-error: #EF4444;
    
    --card-radius: 24px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --white: #FFFFFF;
}

body {
    background-color: var(--white);
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', 'Outfit', 'Noto Sans SC', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Header Navigation */
.main-header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(30, 58, 138, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 80px;
}

.header-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 5%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.logged-in .nav-links a:not(.btn) {
    display: none;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links a:not(.btn) {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.nav-links a:not(.btn):hover {
    color: var(--accent-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.6rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #FFFFFF;
    box-shadow: 0 4px 6px rgba(30, 58, 138, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1.5px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background-color: var(--accent-color);
    color: #FFFFFF;
    box-shadow: 0 4px 6px rgba(202, 138, 4, 0.2);
}

.btn-accent:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1.5px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #F8FAFC;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-block {
    display: flex;
    width: 100%;
    padding: 0.85rem;
    font-size: 1.1rem;
}

/* Landing Page Layout */
#landing-page-content {
    background-color: var(--white);
    padding-top: 80px;
}

/* Hero Section */
.hero {
    padding: 100px 5% 80px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
    background: radial-gradient(circle at top right, #EFF6FF 0%, #FFFFFF 50%);
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 3.8rem);
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
}

.stat-item h3 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent-color);
}

.stat-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.hero-visual {
    position: relative;
}

.hero-visual img {
    width: 100%;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
}

.floating-card {
    position: absolute;
    background: var(--white);
    padding: 1.2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: float 6s ease-in-out infinite;
    z-index: 5;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Video Section */
.video-section {
    padding: 80px 5%;
    background: var(--bg-color);
    text-align: center;
}

.video-container {
    max-width: 1000px;
    margin: 3rem auto 0;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: #000;
    aspect-ratio: 16/9;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Features Section */
.features {
    padding: 80px 5%;
    background: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2.5rem;
    border-radius: 24px;
    background: var(--bg-color);
    border: 1px solid rgba(30, 58, 138, 0.05);
    transition: var(--transition-smooth);
}

.feature-card:hover {
    background: var(--white);
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.feature-card-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.icon-box {
    width: 50px;
    height: 50px;
    background: var(--white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Footer */
.main-footer {
    padding: 4rem 5% 2rem;
    background: #0F172A;
    color: #94A3B8;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    width: 100%;
    max-width: 620px;
    border-radius: 24px;
    padding: 2rem 2.5rem;
    position: relative;
    box-shadow: var(--shadow-xl);
    max-height: 95vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.close-modal:hover {
    color: var(--primary-color);
}

.modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-size: 1.6rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    font-weight: 800;
}

.modal-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Form Styling for both Landing & Dashboard */
.input-group, .form-group {
    margin-bottom: 1.2rem;
}

.input-group label, .form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.input-group input, .input-group select, 
.input-wrapper input, .input-wrapper select {
    width: 100%;
    padding: 0.75rem 1.1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: #F8FAFC;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: var(--transition-smooth);
    font-family: inherit;
}

.input-group input:focus, .input-group select:focus,
.input-wrapper input:focus, .input-wrapper select:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 4px var(--accent-glow);
    background: #FFFFFF;
}

.required {
    color: var(--text-error);
    margin-left: 2px;
}

/* Cascading Selector Styling */
.address-group {
    display: flex;
    gap: 0.4rem;
    grid-column: span 2;
}

.address-group select {
    flex: 1;
    padding: 0.7rem 0.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: #F8FAFC;
    font-family: inherit;
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
}

/* Header User Profile */
.user-profile-menu {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-left: 1rem;
    white-space: nowrap;
}

.header-hotel-name {
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.header-divider {
    width: 1px;
    height: 20px;
    background: var(--border-color);
}

.user-info-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name-display {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

#header-hotel-code {
    font-size: 0.75rem;
    color: var(--text-muted);
}

#logout-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    color: var(--text-error);
    border: 1px solid rgba(239, 68, 68, 0.1);
    background: transparent;
}

#logout-btn:hover {
    background: #FEF2F2;
    border-color: var(--text-error);
}

/* Management Content Layout */
#management-dashboard {
    padding-top: 100px !important;
}

.management-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2.5rem;
}

.management-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

/* Management Card Container */
.management-card {
    background: var(--white);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    margin-top: 2rem;
}

.management-tabs {
    display: flex;
    gap: 2rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.management-tab-btn {
    background: none;
    border: none;
    padding: 0.8rem 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: var(--transition-smooth);
    margin-bottom: -2px;
}

.management-tab-btn:hover {
    color: var(--primary-color);
}

.management-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.management-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.management-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Grid Layouts */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.5rem;
}

.management-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem 2rem;
}

.form-full, .span-3 {
    grid-column: span 2;
}

.span-3 {
    grid-column: span 3;
}

/* Service Status Cards */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.status-card {
    background: var(--surface-color);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.status-card.compact {
    padding: 1.2rem 1rem;
    border-radius: 12px;
}

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

.status-badge {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
}

.status-active { background: #ECFDF5; color: #10B981; }
.status-trial { background: #FFFBEB; color: #CA8A04; }
.status-expired { background: #FEF2F2; color: #EF4444; }

.module-icon {
    width: 44px;
    height: 44px;
    background: #EFF6FF;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--primary-light);
}

.module-icon.mini {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    margin-bottom: 0.8rem;
}

.module-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.module-name-mini {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

.module-expiry {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.module-expiry-mini {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.module-days {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
}

.module-days span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: 4px;
}

.module-days-mini {
    font-size: 1.4rem;
    font-weight: 900;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.module-days-mini span {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
}

.module-days span {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 0.25rem;
}

/* Recharge Packages */
.recharge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.recharge-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2.2rem 1.8rem;
    border: 1px solid var(--border-color);
    text-align: left;
    position: relative;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.recharge-card:hover {
    border-color: var(--primary-light);
    box-shadow: 0 12px 30px rgba(0,0,0,0.06);
    transform: translateY(-8px);
}

/* Default state should be unselected/flat */
.recharge-card.featured {
    border-color: var(--border-color); /* Remove default highlight */
    border-width: 1px;
}

.recharge-card.featured:hover {
    border-color: var(--primary-color);
    transform: translateY(-8px);
    box-shadow: 0 15px 35px var(--primary-glow);
}

.recharge-card .recharge-badge {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    background: #EEF2FF;
    color: var(--primary-color);
    padding: 0.35rem 0.7rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
}

.recharge-card.featured .recharge-badge {
    background: var(--primary-color);
    color: var(--white);
}

.recharge-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.recharge-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 1.8rem;
    flex-wrap: wrap;
}

.price-current {
    color: #EF4444;
    display: flex;
    align-items: baseline;
    white-space: nowrap;
}

.price-current .symbol {
    font-size: 1rem;
    font-weight: 700;
    margin-right: 1px;
}

.price-current .value {
    font-size: 2.3rem;
    font-weight: 900;
    line-height: 1;
}

.price-current .unit {
    font-size: 1rem;
    font-weight: 700;
    margin-left: 2px;
}

.price-original {
    color: #94A3B8;
    text-decoration: line-through;
    display: flex;
    align-items: baseline;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0.7;
}

.price-original .symbol {
    font-size: 0.85rem;
}

.price-original .value {
    font-size: 1.3rem;
}

.price-original .unit {
    font-size: 0.85rem;
}

.recharge-divider {
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
    opacity: 0.6;
}

.recharge-features {
    list-style: none;
    margin-bottom: 0;
}

.recharge-features li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recharge-features li::before {
    content: "✓";
    color: #10B981;
    font-weight: 800;
}

/* History Table */
.history-card {
    background: var(--surface-color);
    border-radius: 16px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    overflow-x: auto;
}

.history-card table {
    width: 100%;
    border-collapse: collapse;
}

.history-card th {
    text-align: left;
    padding: 1rem;
    border-bottom: 2px solid var(--bg-color);
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.85rem;
}

.history-card td {
    padding: 1rem;
    border-bottom: 1px solid var(--bg-color);
    font-size: 0.9rem;
}

.order-status {
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.status-paid { background: #D1FAE5; color: #065F46; }
.status-pending { background: #FEF3C7; color: #92400E; }

/* Legal Content */
.legal-content {
    text-align: left;
    padding: 1rem;
    max-height: 50vh;
    overflow-y: auto;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border: 1px solid var(--bg-color);
    border-radius: 12px;
    margin: 1rem 0;
    background: #FAFAF9;
    line-height: 1.6;
}

.legal-content h3 {
    color: var(--primary-color);
    margin: 1.5rem 0 0.75rem;
    font-size: 1.1rem;
}

.legal-content p {
    margin-bottom: 0.75rem;
}

/* Generic Helpers */
.spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #FFFFFF;
    animation: spin 0.8s linear infinite;
    margin-left: 0.5rem;
}

.btn-icon-only {
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-smooth);
    color: var(--text-secondary);
}

.btn-icon-only:hover {
    background: #FEF2F2;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error-msg {
    color: var(--text-error);
    font-size: 0.75rem;
    min-height: 1rem;
    margin-top: 0.2rem;
}

.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 3000;
}

/* Responsive Optimization */
@media (max-width: 1024px) {
    .header-container { padding: 0 1.5rem; }
    .hero { grid-template-columns: 1fr; text-align: center; padding-top: 6rem; }
    .hero-content { padding-right: 0; }
    .hero-content h1 { font-size: 3rem; }
    .hero-content p, .hero-stats { margin-left: auto; margin-right: auto; justify-content: center; }
    .nav-links a:not(.btn) { display: none; }
    .recharge-grid, .management-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    :root { --container-padding: 1rem; }
    
    .main-header { height: auto; padding: 0.8rem 0; position: relative; }
    .header-container { flex-direction: column; align-items: flex-start !important; gap: 0.6rem; padding: 0 1rem; }
    .logo { justify-content: flex-start !important; width: 100%; }
    .nav-links { width: 100%; justify-content: flex-start; flex-wrap: nowrap; gap: 1rem; overflow-x: auto; padding-bottom: 4px; }
    
    .user-profile-menu { 
        border-left: none; 
        padding-left: 0; 
        width: 100%; 
        justify-content: flex-start !important; 
        border-top: 1px solid var(--border-color); 
        padding-top: 1rem;
        flex-wrap: nowrap !important;
        gap: 12px !important;
    }
    
    .header-hotel-name { 
        max-width: none; 
        font-size: 0.75rem !important; 
        opacity: 0.8;
        white-space: nowrap;
        text-align: left;
    }

    .header-divider { display: none; }
    
    .user-name-display { font-size: 0.85rem !important; white-space: nowrap; text-align: left; }

    #management-dashboard { 
        padding: 1rem 0.8rem 8rem !important; 
    }
    
    .management-card {
        padding: 1.5rem 1rem !important;
        margin: 0.5rem 0 !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.04) !important;
    }

    .management-header { 
        flex-direction: column; 
        align-items: flex-start !important; 
        gap: 0.5rem; 
        margin-bottom: 1.2rem !important;
        text-align: left;
    }
    .management-header h2 { 
        font-size: 1.3rem !important; 
        font-weight: 800;
    }

    /* Sticky Bottom Save Bar */
    #save-action-container { 
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px);
        padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
        border-top: 1px solid var(--border-color);
        box-shadow: 0 -5px 15px rgba(0,0,0,0.08);
        z-index: 2000;
        width: 100% !important;
        display: block !important;
    }
    
    #save-info-btn {
        width: 100% !important;
        height: 3.2rem;
        justify-content: center;
        font-size: 1rem;
        border-radius: 12px;
    }

    .management-tabs { 
        margin: 0 -1rem 1.2rem;
        padding: 0 1rem 2px;
        gap: 1rem;
        border-bottom: 1px solid var(--border-color);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .management-tabs::-webkit-scrollbar { display: none; }
    .management-tab-btn { 
        padding: 0.8rem 0.2rem; 
        font-size: 0.9rem;
        flex-shrink: 0;
    }

    .management-grid { gap: 1rem; grid-template-columns: 1fr !important; }
    .competitor-grid { grid-template-columns: 1fr !important; gap: 0.8rem !important; }
    .span-3 { grid-column: span 1 !important; }
    .address-group { flex-direction: column !important; width: 100% !important; gap: 0.6rem !important; }
    .form-group { margin: 0; width: 100% !important; }
    .input-wrapper { width: 100% !important; }
    .form-group label { font-size: 0.85rem; margin-bottom: 0.4rem; }
    
    /* Fixed Alignment: Ensure inputs touch the card edges consistently */
    input, select, textarea { font-size: 16px !important; } /* Prevents iOS zoom */

    .status-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
    
    .recharge-grid { 
        display: flex !important; 
        overflow-x: auto; 
        gap: 1.2rem; 
        margin: 0 -1rem; 
        padding: 1rem 1rem; /* Added top padding to prevent border cut */
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .recharge-grid::-webkit-scrollbar { display: none; }
    .recharge-card { flex: 0 0 auto; min-width: 280px; padding: 1.8rem 1.2rem; }
    .recharge-features li { white-space: nowrap; font-size: 0.85rem; }

    /* Remove default scale in mobile to prevent clipping */
    .recharge-card.featured { transform: none !important; }
    .recharge-card.featured:hover { transform: translateY(-5px) !important; }

    .price-current .value { font-size: 2rem; }
    .price-original .value { font-size: 1.2rem; }

    /* Billing History Table Mobile Fix: Sticky Columns */
    .history-card { 
        margin: 0 -1rem; 
        width: calc(100% + 2rem);
        border-radius: 0;
        border-left: none;
        border-right: none;
        overflow-x: auto;
        position: relative;
    }
    .history-card table { 
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
    }
    .history-card th, .history-card td { 
        padding: 0.8rem 0.6rem; 
        font-size: 0.75rem; 
        white-space: nowrap;
        background: var(--surface-color);
    }
    /* Lock first column (Order ID) */
    .history-card th:first-child, 
    .history-card td:first-child {
        position: sticky;
        left: 0;
        z-index: 2;
        box-shadow: 2px 0 5px rgba(0,0,0,0.05);
    }
    /* Lock last column (Time) */
    .history-card th:last-child, 
    .history-card td:last-child {
        position: sticky;
        right: 0;
        z-index: 2;
        box-shadow: -2px 0 5px rgba(0,0,0,0.05);
    }

    .modal-container { 
        width: 92%; 
        padding: 1.5rem; 
        max-height: 85vh;
    }
}

@media (max-width: 480px) {
    .hero-content h1 { font-size: 2.2rem; }
    .hero-stats { grid-template-columns: 1fr; }
    .logo-text { font-size: 1.1rem; }
    .nav-links .btn { width: 100%; justify-content: center; }
}