/*
 * Surveyor Assistant App - Premium Stylesheet
 * Incorporates glassmorphic panels, dynamic gradient headers, and theme customization.
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg-primary: #0a0f1d;
    --bg-secondary: #111827;
    --bg-card: rgba(25, 33, 51, 0.65);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    
    --color-primary: #0ea5e9;
    --color-primary-hover: #0284c7;
    --color-accent: #00f5d4;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-success: #10b981;
    
    --sidebar-width: 260px;
    --font-sans: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --glass-blur: blur(12px);
    --shadow-main: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --transition-speed: 0.3s;
}

[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.75);
    --border-color: rgba(0, 0, 0, 0.08);
    --text-main: #0f172a;
    --text-muted: #64748b;
    
    --color-primary: #0ea5e9;
    --color-primary-hover: #0284c7;
    --color-accent: #0f766e;
    
    --shadow-main: 0 8px 32px 0 rgba(15, 23, 42, 0.08);
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Sidebar styling */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: transform var(--transition-speed);
}

.sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
}

.sidebar-title {
    font-size: 1.15rem;
    font-weight: 700;
    background: linear-gradient(to right, #ffffff, var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
[data-theme="light"] .sidebar-title {
    background: none;
    -webkit-text-fill-color: var(--text-main);
}

.sidebar-menu {
    list-style: none;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
}

.menu-item:hover, .menu-item.active {
    color: var(--text-main);
    background: var(--bg-card);
    border-left: 3px solid var(--color-primary);
}

.sidebar-footer {
    padding: 20px 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Main Container */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin var(--transition-speed);
}

/* Top Navigation Header */
.top-nav {
    height: 70px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.offline-badge {
    display: none;
    align-items: center;
    gap: 6px;
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-danger);
    border: 1px solid var(--color-danger);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    animation: pulse 2s infinite;
}

.online-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
    border: 1px solid var(--color-success);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--color-primary-hover);
}

.btn-accent {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: #0f172a;
}
.btn-accent:hover {
    opacity: 0.9;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.btn-secondary:hover {
    background: var(--bg-card);
}

.btn-danger {
    background: var(--color-danger);
    color: #fff;
}
.btn-danger:hover {
    opacity: 0.9;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* Dashboard Content Grid */
.dashboard-view {
    padding: 32px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-title {
    font-size: 1.75rem;
    font-weight: 700;
}

.dashboard-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 4px;
}

/* Card layout */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.grid-sidebar-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
}

.card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-main);
    transition: transform var(--transition-speed), border-color var(--transition-speed);
}

.card:hover {
    border-color: rgba(2, 132, 199, 0.4);
}

/* Analytics Stats Card */
.stat-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.stat-icon {
    font-size: 2.25rem;
    opacity: 0.25;
}

/* Plotting Canvas area */
.canvas-card {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
@media (max-width: 1024px) {
    .canvas-card {
        grid-column: span 1;
    }
}

.canvas-container {
    position: relative;
    width: 100%;
    height: 400px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.canvas-container canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Forms styling */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

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

input, select, textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

[data-theme="light"] input, [data-theme="light"] select, [data-theme="light"] textarea {
    background: rgba(0, 0, 0, 0.02);
}

select {
    background-color: #ffffff;
    color: #000000;
}

select option {
    background-color: #ffffff;
    color: #000000;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.25);
}

input:focus, textarea:focus {
    background: rgba(255, 255, 255, 0.08);
}

select:focus {
    background-color: #ffffff;
    color: #000000;
}

/* Table styling */
.table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    padding: 12px 16px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
    font-size: 0.85rem;
}

td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Auth Pages Modal Overlay */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 15, 29, 0.9);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-main);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-header {
    text-align: center;
}

.auth-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 16px;
}

.auth-toggle {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-toggle span {
    color: var(--color-primary);
    cursor: pointer;
    font-weight: 600;
}

/* Alert dialog */
.alert-popup {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-secondary);
    border-left: 4px solid var(--color-primary);
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: var(--shadow-main);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2000;
    transform: translateY(150%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.alert-popup.show {
    transform: translateY(0);
}

.alert-popup.error { border-left-color: var(--color-danger); }
.alert-popup.success { border-left-color: var(--color-success); }
.alert-popup.warning { border-left-color: var(--color-warning); }

/* Triangulation diagram canvas / helper */
.triangle-visual {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Calculations booking tables details */
.booking-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

/* Keyframes */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Responsive adjust */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .sidebar-menu {
        flex-direction: row;
        padding: 10px;
        overflow-x: auto;
    }
    .menu-item {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    .main-content {
        margin-left: 0;
    }
    .top-nav {
        padding: 0 16px;
    }
    .dashboard-view {
        padding: 16px;
    }
    .grid-container {
        grid-template-columns: 1fr;
    }
    .grid-sidebar-layout {
        grid-template-columns: 1fr;
    }
    .canvas-container {
        height: 300px;
    }
    .sidebar-footer {
        display: none;
    }
}

@media (max-width: 576px) {
    .form-row {
        flex-direction: column;
        gap: 8px;
    }
    .booking-actions {
        flex-direction: column;
        width: 100%;
    }
    .booking-actions .btn {
        width: 100%;
    }
}

/* Premium Auth Landing Page Styles */
body.auth-page {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #080c14;
    font-family: var(--font-sans);
    overflow-x: hidden;
    position: relative;
    padding: 24px 0;
}

.auth-grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
    pointer-events: none;
}

.auth-radial-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    z-index: 0;
    pointer-events: none;
    opacity: 0.25;
}

.glow-1 {
    width: 500px;
    height: 500px;
    background: var(--color-primary);
    top: -150px;
    left: -150px;
}

.glow-2 {
    width: 600px;
    height: 600px;
    background: var(--color-accent);
    bottom: -200px;
    right: -150px;
}

.auth-page-container {
    width: calc(100% - 32px);
    max-width: 1140px;
    min-height: 680px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    background: rgba(15, 22, 40, 0.5);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    overflow: hidden;
    z-index: 10;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6);
}

.auth-hero-pane {
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.1) 0%, rgba(15, 23, 42, 0.1) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
}

.hero-header .hero-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.hero-main-content {
    margin: 40px 0;
}

.hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.25;
    color: #ffffff;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.highlight-text {
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 480px;
}

.feature-showcase-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.showcase-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.showcase-card:hover {
    transform: translateY(-2px);
    border-color: rgba(2, 132, 199, 0.25);
    background: rgba(255, 255, 255, 0.04);
}

.card-icon {
    font-size: 1.4rem;
    line-height: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-text h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.card-text p {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.45;
}

.hero-footer p {
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.8rem;
}

.auth-form-pane {
    padding: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 12, 22, 0.25);
}

.auth-card-wrapper {
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: authFadeIn 0.4s ease;
}

.auth-card-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.1rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.auth-card-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.btn-full-width {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    margin-top: 12px;
}

.auth-card-footer {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 10px;
}

.auth-toggle-link {
    color: var(--color-primary);
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease;
}

.auth-toggle-link:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

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

@media (max-width: 992px) {
    .auth-page-container {
        grid-template-columns: 1fr;
        max-width: 580px;
        min-height: auto;
    }
    .auth-hero-pane {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        padding: 36px;
    }
    .hero-title {
        font-size: 2.2rem;
    }
    .auth-form-pane {
        padding: 36px;
    }
}

@media (max-width: 576px) {
    .feature-showcase-grid {
        grid-template-columns: 1fr;
    }
    .auth-hero-pane, .auth-form-pane {
        padding: 24px;
    }
    .hero-title {
        font-size: 1.8rem;
    }
}

/* App Responsiveness Additions */
@media (max-width: 992px) {
    .grid-sidebar-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 100%;
        max-width: 300px;
        box-shadow: var(--shadow-main);
    }
    .sidebar.active {
        transform: translateX(0) !important;
    }
    .main-content {
        margin-left: 0;
        width: 100vw;
    }
    .top-nav {
        padding: 0 16px;
    }
    
    /* Toggle button for sidebar in mobile view */
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        color: var(--text-main);
        cursor: pointer;
        padding: 8px;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .dashboard-header .btn {
        width: 100%;
    }
    .dashboard-view {
        padding: 16px;
    }
    
    /* Table responsiveness */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Helper class to show toggle only on mobile */
.mobile-menu-toggle {
    display: none;
}

/* Additional Responsive Tweaks */
@media (max-width: 768px) {
    body { overflow-x: hidden; }
    
    .grid-container {
        grid-template-columns: 1fr !important;
    }

    .form-row {
        flex-direction: column;
        gap: 16px;
    }

    .data-tools-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .data-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1 1 auto;
        text-align: center;
        padding: 10px;
    }

    .visualizer-container {
        height: 60vh;
    }

    .online-badge, .offline-badge {
        font-size: 0.7rem;
        padding: 4px 8px;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 20px;
    }
}

/* ==========================================================================
   AUTHENTICATION & LANDING PAGE STYLING (.hidden FIX)
   ========================================================================== */
.hidden {
    display: none !important;
}

.auth-page {
    background: #090d16;
    min-height: 100vh;
    width: 100%;
    position: relative;
    overflow-x: hidden;
}

.auth-grid-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
    z-index: 1;
}

.auth-radial-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(140px);
    pointer-events: none;
    z-index: 1;
    opacity: 0.3;
}
.glow-1 { top: -100px; left: -100px; background: #0f62fe; }
.glow-2 { bottom: -100px; right: -100px; background: #00f2fe; }

.auth-page-container {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.auth-hero-pane {
    flex: 1.2;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: rgba(18, 25, 41, 0.4);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-form-pane {
    flex: 0.8;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 15, 29, 0.8);
    backdrop-filter: blur(20px);
}

.auth-card-wrapper {
    width: 100%;
    max-width: 440px;
    background: rgba(25, 34, 56, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 36px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.auth-card-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    color: #ffffff;
    margin-bottom: 6px;
}

.auth-card-header p {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 24px;
}

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 8px;
}

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

.input-icon {
    position: absolute;
    left: 14px;
    color: #64748b;
}

.input-with-icon input, .form-group input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #ffffff;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.input-with-icon input {
    padding-left: 44px;
}

.input-with-icon input:focus, .form-group input:focus {
    outline: none;
    border-color: #0f62fe;
    box-shadow: 0 0 0 3px rgba(15, 98, 254, 0.2);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #0f62fe 0%, #00f2fe 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 8px 20px rgba(15, 98, 254, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(15, 98, 254, 0.5);
}

.form-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    font-size: 0.85rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    cursor: pointer;
}

.forgot-link {
    color: #00f2fe;
    text-decoration: none;
    font-weight: 600;
}

.auth-card-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 0.9rem;
    color: #94a3b8;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 20px;
}

.auth-card-footer a {
    color: #00f2fe;
    text-decoration: none;
    font-weight: 700;
}

@media (max-width: 900px) {
    .auth-page-container {
        flex-direction: column;
    }
    .auth-hero-pane {
        padding: 24px;
    }
    .auth-form-pane {
        padding: 24px 16px;
    }
}

/* ==========================================================================
   ANIMATED PAKISTAN FLAG BADGE & INDEPENDENCE DAY TRIBUTE
   ========================================================================== */
@keyframes flagWaveAnimation {
    0% { transform: scale(1) rotate(0deg); box-shadow: 0 0 10px rgba(0, 242, 254, 0.4); }
    50% { transform: scale(1.06) rotate(3deg); box-shadow: 0 0 20px rgba(0, 255, 128, 0.8); }
    100% { transform: scale(1) rotate(0deg); box-shadow: 0 0 10px rgba(0, 242, 254, 0.4); }
}

@keyframes pulseGlowTribute {
    0% { opacity: 0.85; }
    50% { opacity: 1; text-shadow: 0 0 10px rgba(245, 158, 11, 0.6); }
    100% { opacity: 0.85; }
}

.pk-flag-animated-badge {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    position: relative;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    animation: flagWaveAnimation 3.5s infinite ease-in-out;
    flex-shrink: 0;
}

.pk-flag-stripe {
    width: 28%;
    height: 100%;
    background: #ffffff;
}

.pk-flag-green {
    width: 72%;
    height: 100%;
    background: #01411C;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.pk-crescent-star {
    width: 26px;
    height: 26px;
    transform: rotate(-15deg);
}

.tribute-subtext {
    animation: pulseGlowTribute 4s infinite ease-in-out;
}

/* ==========================================================================
   MODERN AUTH MODAL, INTERACTIVE LANDING & LIVE TOOLS STYLES
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 17, 32, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content-box {
    background: rgba(30, 41, 59, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    width: 100%;
    max-width: 480px;
    padding: 32px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(15, 98, 254, 0.25);
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-backdrop.active .modal-content-box {
    transform: translateY(0) scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
    transform: rotate(90deg);
}

.auth-tab-switch {
    display: flex;
    background: rgba(15, 23, 42, 0.6);
    padding: 4px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 24px;
}

.auth-tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-weight: 700;
    font-size: 0.92rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}

.auth-tab-btn.active {
    background: linear-gradient(135deg, #0f62fe, #00f2fe);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(15, 98, 254, 0.4);
}

.input-eye-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    transition: color 0.2s;
}

.input-eye-toggle:hover {
    color: #00f2fe;
}

.landing-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(11, 17, 32, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.landing-nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #ffffff;
    font-weight: 800;
    font-size: 1.15rem;
}

.landing-nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    list-style: none;
}

.landing-nav-links a {
    color: #94a3b8;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.landing-nav-links a:hover {
    color: #00f2fe;
}

.main-site-btn {
    background: linear-gradient(135deg, rgba(15, 98, 254, 0.2), rgba(0, 242, 254, 0.2));
    border: 1px solid rgba(0, 242, 254, 0.4);
    color: #00f2fe !important;
    padding: 8px 18px;
    border-radius: 30px;
    font-weight: 700 !important;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.main-site-btn:hover {
    background: linear-gradient(135deg, #0f62fe, #00f2fe);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.3);
}

