/* ==========================================================================
   FRAMUS - DESIGN SYSTEM TOKENS & MASTER STYLESHEET
   Brand Colors: Navy #071426, Sidebar #091A32, Card #102440,
   Primary Blue #00A8FF, Cyan #00D4FF, White Text #F8FAFC
   ========================================================================== */

:root {
    --bg-primary: #071426;
    --bg-sidebar: #091A32;
    --bg-card: #102440;
    --bg-card-hover: #162E52;
    --border-color: #1E3A5F;
    --primary-blue: #00A8FF;
    --primary-blue-hover: #0092dd;
    --cyan-accent: #00D4FF;
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --success-green: #10B981;
    --warning-amber: #F59E0B;
    --purple-accent: #8B5CF6;
    --danger-red: #EF4444;
    --font-main: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(0, 168, 255, 0.25);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Variables */
body.theme-minimal-white {
    --bg-primary: #F8FAFC;
    --bg-sidebar: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F1F5F9;
    --border-color: #E2E8F0;
    --primary-blue: #0070F3;
    --cyan-accent: #00A8FF;
    --text-primary: #0F172A;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

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

html,
body {
    overflow-x: hidden;
    overflow-x: clip; /* prevents pan on mobile without breaking position: sticky */
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* Layout Containers */
.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* Typography Helpers */
.text-cyan { color: var(--cyan-accent); }
.text-blue { color: var(--primary-blue); }
.text-muted { color: var(--text-secondary); }
.text-white { color: #FFFFFF; }
.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.fw-medium { font-weight: 500; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0077CC 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(0, 168, 255, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #24b5ff 0%, #0088e6 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 168, 255, 0.45);
}

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

.btn-outline:hover {
    background: rgba(0, 168, 255, 0.1);
    color: var(--cyan-accent);
}

.btn-outline-white {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-outline-white:hover {
    background: var(--bg-card);
    border-color: var(--primary-blue);
}

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

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

/* Cards & Surfaces */
.framus-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.framus-card:hover {
    border-color: rgba(0, 168, 255, 0.4);
}

/* Form Controls */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background-color: #0c1c33;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 168, 255, 0.2);
    background-color: #0f2442;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.badge-verified {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-primary {
    background: rgba(0, 168, 255, 0.15);
    color: var(--primary-blue);
    border: 1px solid rgba(0, 168, 255, 0.3);
}

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

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 11, 22, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 580px;
    padding: 32px;
    box-shadow: var(--shadow-card);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
}

/* ==========================================================================
   RESPONSIVE LAYER (Tablets & Mobile)
   ========================================================================== */

/* Horizontally scrollable data tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.table-responsive table {
    min-width: 640px;
}

/* Off-canvas sidebar drawer for dashboard layouts (admin/client/freelancer) */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(4, 11, 22, 0.7);
    backdrop-filter: blur(4px);
    z-index: 95;
    display: none;
}

.sidebar-backdrop.active {
    display: block;
}

@media (min-width: 992px) {
    .sidebar-backdrop {
        display: none !important;
    }
}

@media (max-width: 991px) {
    .admin-sidebar,
    .dash-sidebar,
    .fl-sidebar {
        transform: translateX(-105%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .admin-sidebar.sidebar-open,
    .dash-sidebar.sidebar-open,
    .fl-sidebar.sidebar-open {
        transform: translateX(0);
        box-shadow: 24px 0 60px rgba(0, 0, 0, 0.55);
    }
}

/* Hamburger button - only rendered below the lg breakpoint */
.mobile-menu-btn {
    display: none;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 16px;
    width: 40px;
    height: 40px;
    min-width: 40px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

@media (max-width: 991px) {
    .mobile-menu-btn {
        display: inline-flex;
    }
}

/* Public site mobile navigation drawer */
.mobile-nav {
    display: none;
    background: var(--bg-sidebar);
    border-top: 1px solid var(--border-color);
    padding: 8px 0 14px;
}

.mobile-nav.open {
    display: block;
}

.mobile-nav a,
.mobile-nav button.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-main);
}

.mobile-nav a:hover,
.mobile-nav button.mobile-nav-link:hover {
    background: rgba(0, 168, 255, 0.08);
    color: var(--primary-blue);
}

.mobile-nav a i,
.mobile-nav button.mobile-nav-link i {
    width: 18px;
    text-align: center;
    color: var(--cyan-accent);
}

/* Generic visibility helpers */
@media (max-width: 767px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .hide-desktop {
        display: none !important;
    }
}

/* ---------- Pagination (shared) ---------- */
.frams-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}
.pg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-secondary, #94A3B8);
    background: rgba(30, 58, 95, 0.25);
    border: 1px solid rgba(30, 58, 95, 0.55);
    transition: all 0.2s;
}
a.pg-btn:hover {
    color: #fff;
    border-color: #00A8FF;
    background: rgba(0, 168, 255, 0.14);
}
.pg-btn.pg-active {
    color: #fff;
    font-weight: 700;
    background: linear-gradient(135deg, #00A8FF, #0066CC);
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(0, 168, 255, 0.3);
}
.pg-btn.pg-disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.pg-btn.pg-dots {
    background: transparent;
    border: none;
    letter-spacing: 1px;
}
.pg-btn i {
    font-size: 11px;
}
