/* ================================================================
   WORKORA — GLOBAL PREMIUM CSS
   File: public/css/workora.css
   All pages (dashboard layout + main/auth layout) share this file.
   ================================================================ */

/* ======================== GOOGLE FONT ======================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ======================== DESIGN TOKENS ======================== */
:root {
    /* Background layers */
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #ffffff;

    /* Borders */
    --border: #eeeeee;
    --border-hover: #cbd5e1;

    /* Accent palette */
    --accent: #4f46e5;
    --accent-2: #7c3aed;
    --accent-glow: rgba(79, 70, 229, 0.15);
    --accent-soft: #f0f2ff;

    /* Semantic colours */
    --success: #16a34a;
    --warning: #ca8a04;
    --danger: #dc2626;
    --info: #0284c7;

    /* Text */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    /* Layout */
    --sidebar-w: 260px;

    /* Radii */
    --radius: 14px;
    --radius-sm: 8px;
    --radius-lg: 20px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 20px rgba(15, 23, 42, 0.05);
    --shadow-glow: 0 0 30px var(--accent-glow);

    /* Animation */
    --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ======================== RESET & BASE ======================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scrollbar-width: thin;
    scrollbar-color: #2a3352 transparent;
}

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 99px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

/* ================================================================
   DASHBOARD LAYOUT
   ================================================================ */

/* Body flex for sidebar + main */
body.layout-dashboard {
    display: flex;
    overflow-x: hidden;
}

/* ======================== SIDEBAR ======================== */
.sidebar {
    width: var(--sidebar-w);
    min-height: 100vh;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 24px 20px 20px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
}

.sidebar-logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 18px var(--accent-glow);
    font-size: 18px;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.3px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    list-style: none;
    overflow-y: auto;
}

.sidebar-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 10px 12px 6px;
    display: block;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    margin-bottom: 2px;
}

.sidebar-link i {
    font-size: 1.05rem;
    width: 20px;
    text-align: center;
    transition: var(--transition);
}

.sidebar-link:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.sidebar-link:hover i {
    color: var(--accent);
}

.sidebar-link.active {
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid rgba(79, 70, 229, 0.15);
    font-weight: 600;
}

.sidebar-link.active i {
    color: var(--accent);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: linear-gradient(var(--accent), var(--accent-2));
    border-radius: 0 3px 3px 0;
}

.sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 10px 12px;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid var(--border);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.sidebar-user:hover {
    background: var(--accent-soft);
}

.sidebar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-user-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

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

/* ======================== MAIN WRAPPER ======================== */
.main-wrapper {
    margin-left: var(--sidebar-w);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top bar */
.topbar {
    height: 62px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 50;
    gap: 16px;
}

.topbar-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    flex: 1;
}

.topbar-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 99px;
    border: 1px solid rgba(79, 70, 229, 0.25);
}

/* Page content area */
.page-content {
    padding: 32px;
    flex: 1;
}

/* ================================================================
   AUTH / PUBLIC LAYOUT (main.php)
   ================================================================ */
body.layout-main {
    display: block;
}

.public-nav {
    height: 64px;
    background: rgba(10, 13, 20, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 48px;
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 16px;
}

.public-nav-logo {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    flex: 1;
}

.public-nav-logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
    box-shadow: 0 0 14px var(--accent-glow);
}

.public-nav-logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #e0e7ff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.public-nav-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.public-nav-links a:hover {
    color: var(--text-primary);
    background: var(--accent-soft);
}

.public-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ================================================================
   SHARED COMPONENTS
   ================================================================ */

/* ---- Typography ---- */
.page-heading {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.4px;
}

.page-sub {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.text-gradient {
    background: linear-gradient(135deg, #e0e7ff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-success-w {
    color: var(--success) !important;
}

.text-danger-w {
    color: var(--danger) !important;
}

.text-muted-w {
    color: var(--text-muted) !important;
}

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

.text-sec-w {
    color: var(--text-secondary) !important;
}

/* ---- Cards ---- */
.w-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.01);
}

.w-card:hover {
    /* border-color: var(--border-hover); */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.01);
}

.w-card-body {
    padding: 24px;
}

.w-card-header {
    padding: 20px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f1f1f1;
    padding-bottom: 10px;
    padding-top: 10px;
}

.w-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ---- Stat Cards ---- */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    animation: fadeUp 0.4s ease both;
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    opacity: 0.07;
}

.stat-card.violet::before {
    background: #6366f1;
}

.stat-card.pink::before {
    background: #ec4899;
}

.stat-card.cyan::before {
    background: #06b6d4;
}

.stat-card.amber::before {
    background: #f59e0b;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 16px;
}

.stat-card.violet .stat-icon {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

.stat-card.pink .stat-icon {
    background: rgba(236, 72, 153, 0.15);
    color: #f472b6;
}

.stat-card.cyan .stat-icon {
    background: rgba(6, 182, 212, 0.15);
    color: #22d3ee;
}

.stat-card.amber .stat-icon {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.stat-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1;
}

/* ---- Tables ---- */
.w-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.w-table thead th {
    background: #f8fafc;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
}

.w-table thead th:first-child {
    border-radius: 8px 0 0 0;
}

.w-table thead th:last-child {
    border-radius: 0 8px 0 0;
}

.w-table tbody tr {
    transition: var(--transition);
}

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

.w-table tbody td {
    padding: 13px 20px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.w-table tbody tr:last-child td {
    border-bottom: none;
}

/* ---- Buttons ---- */
.btn-w-primary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    border: none;
    padding: 9px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 14px var(--accent-glow);
    font-family: 'Inter', sans-serif;
}

.btn-w-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--accent-glow);
    color: #fff;
    text-decoration: none;
}

.btn-w-ghost {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.btn-w-ghost:hover {
    background: #000;
    border-color: rgba(99, 102, 241, 0.4);
    color: #ffffff;
    text-decoration: none;
}

.btn-w-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.btn-w-icon:hover {
    background: var(--accent-soft);
    color: #c7d2fe;
    border-color: rgba(99, 102, 241, 0.4);
}

.btn-w-icon.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

/* ---- Badges ---- */
.badge-w {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-violet {
    background: rgba(79, 70, 229, 0.08);
    color: #4f46e5;
    border: 1px solid rgba(79, 70, 229, 0.15);
}

.badge-pink {
    background: rgba(219, 39, 119, 0.08);
    color: #db2777;
    border: 1px solid rgba(219, 39, 119, 0.15);
}

.badge-cyan {
    background: rgba(8, 145, 178, 0.08);
    color: #0891b2;
    border: 1px solid rgba(8, 145, 178, 0.15);
}

.badge-green {
    background: rgba(22, 163, 74, 0.08);
    color: #16a34a;
    border: 1px solid rgba(22, 163, 74, 0.15);
}

.badge-amber {
    background: rgba(217, 119, 6, 0.08);
    color: #d97706;
    border: 1px solid rgba(217, 119, 6, 0.15);
}

.badge-red {
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.15);
}

.badge-gray {
    background: rgba(71, 85, 105, 0.08);
    color: #475569;
    border: 1px solid rgba(71, 85, 105, 0.15);
}

/* ---- Alerts ---- */
.alert-w {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    margin-bottom: 20px;
}

.alert-w .btn-close {
    filter: invert(1) opacity(0.5);
    margin-left: auto;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1rem;
}

.alert-w.success {
    background: rgba(22, 163, 74, 0.08);
    border: 1px solid rgba(22, 163, 74, 0.15);
    color: #16a34a;
}

.alert-w.danger {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.15);
    color: #dc2626;
}

.alert-w.warning {
    background: rgba(217, 119, 6, 0.08);
    border: 1px solid rgba(217, 119, 6, 0.15);
    color: #d97706;
}

/* ---- Form controls ---- */
.form-w-group {
    margin-bottom: 18px;
}

.form-w-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 7px;
    letter-spacing: 0.02em;
}

.form-w-control {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 9px 14px;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    outline: none;
}

.form-w-control::placeholder {
    color: var(--text-muted);
}

.form-w-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

/* select.form-w-control option {
    background: var(--bg-card);
} */

textarea.form-w-control {
    resize: vertical;
    min-height: 90px;
}

/* ---- Auth card (login / register) ---- */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: radial-gradient(ellipse at 60% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 10% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
        var(--bg-base);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 28px;
    text-decoration: none;
}

.auth-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    box-shadow: 0 0 18px var(--accent-glow);
}

.auth-logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #e0e7ff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 6px;
}

.auth-sub {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 28px;
}

/* ---- Empty state ---- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-state-icon {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 14px;
    opacity: 0.5;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ---- Avatar initials ---- */
.avatar-init {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

/* ---- Grid helpers ---- */
.row-g {
    display: grid;
    gap: 20px;
}

.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.cols-1 {
    grid-template-columns: 1fr;
}

/* ---- Spacing ---- */
.mb-20 {
    margin-bottom: 20px;
}

.mb-24 {
    margin-bottom: 24px;
}

.mb-28 {
    margin-bottom: 28px;
}

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

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

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

/* ================================================================
   ANIMATIONS
   ================================================================ */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card:nth-child(1) {
    animation-delay: 0.05s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.10s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.15s;
}

.stat-card:nth-child(4) {
    animation-delay: 0.20s;
}

.w-card {
    animation: fadeUp 0.35s ease both;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
.btn-sidebar-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    margin-right: 8px;
    flex-shrink: 0;
}

.btn-sidebar-toggle:hover {
    background: var(--accent-soft);
    color: var(--text-primary);
    border-color: rgba(99, 102, 241, 0.4);
}

@media (max-width: 1100px) {
    .cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .cols-4,
    .cols-3,
    .cols-2 {
        grid-template-columns: 1fr;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    body.sidebar-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
        z-index: 99;
    }

    .main-wrapper {
        margin-left: 0;
    }

    .page-content {
        padding: 16px;
    }

    .topbar {
        padding: 0 16px;
        gap: 8px;
    }

    .topbar-badge:last-child {
        display: none;
    }

    .topbar-title {
        font-size: 0.85rem;
    }

    .topbar-badge {
        font-size: 0.65rem;
        padding: 3px 8px;
    }

    .btn-sidebar-toggle {
        display: flex;
    }

    .w-card-body,
    .invoice-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .public-nav {
        padding: 0 20px;
    }

    .auth-card {
        padding: 28px 20px;
    }
}

@media (max-width: 576px) {
    .page-content>.flex-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .page-content>.flex-between>div {
        width: 100%;
    }

    .project-header-actions {
        width: 100%;
        margin-top: 4px;
    }

    .project-header-actions>* {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 900px) {
    .form-layout>div:last-child>.w-card {
        position: static !important;
    }
}

@media (max-width: 768px) {
    .form-grid>.form-w-group {
        grid-column: span 1 !important;
    }
}

/* Pricing Page Responsive Layout */
.pricing-status-header {
    padding: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.pricing-status-left {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
    min-width: 280px;
}

.pricing-status-right {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    padding: 16px 28px;
    text-align: center;
    min-width: 180px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .pricing-status-header {
        padding: 24px !important;
        flex-direction: column !important;
        align-items: stretch !important;
        text-align: center !important;
    }

    .pricing-status-left {
        flex-direction: column !important;
        gap: 16px !important;
        min-width: 100% !important;
        text-align: center !important;
    }

    .pricing-status-left>div {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .pricing-status-left h2 {
        justify-content: center !important;
    }

    .pricing-status-right {
        min-width: 100% !important;
    }
}

@media (max-width: 576px) {
    .pricing-status-left>div>div {
        flex-direction: column !important;
        gap: 8px !important;
        align-items: center !important;
    }
}

/* ================================================================
   FORM GRID HELPERS
   ================================================================ */
.form-grid {
    display: grid;
    gap: 0 20px;
}

.form-grid.cols-2 {
    grid-template-columns: 1fr 1fr;
}

.form-grid.cols-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.form-grid.cols-4 {
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

@media (max-width: 768px) {

    .form-grid.cols-2,
    .form-grid.cols-3,
    .form-grid.cols-4 {
        grid-template-columns: 1fr;
    }
}

/* form card layout: left main + right sidebar */
.form-layout {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr 320px;
    align-items: start;
}

@media (max-width: 900px) {
    .form-layout {
        grid-template-columns: 1fr;
    }
}

/* card section divider */
.section-divider {
    height: 1px;
    background: var(--border);
    margin: 20px 0;
}

.section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* Pricing and Receipt Responsive helpers */
.pricing-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 12px;
}

@media (max-width: 576px) {
    .pricing-features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .receipt-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
}

/* ================================================================
   TOM SELECT — DARK THEME OVERRIDES
   ================================================================ */
.ts-wrapper .ts-control {
    background: var(--bg-input) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    color: var(--text-primary) !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.875rem !important;
    padding: 8px 14px !important;
    box-shadow: none !important;
    min-height: unset !important;
}

.ts-wrapper.focus .ts-control {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px var(--accent-soft) !important;
}

.ts-wrapper .ts-control input {
    color: var(--text-primary) !important;
    font-family: 'Inter', sans-serif !important;
}

.ts-wrapper .ts-control input::placeholder {
    color: var(--text-muted) !important;
}

.ts-dropdown {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: var(--shadow-md) !important;
    color: var(--text-secondary) !important;
    font-size: 0.875rem !important;
}

.ts-dropdown .option {
    padding: 9px 14px !important;
}

.ts-dropdown .option:hover,
.ts-dropdown .option.active {
    /* background: var(--accent-soft) !important; */
    color: #c7d2fe !important;
}

.ts-dropdown .option.selected {
    color: #fff !important;
}

/* .ts-wrapper .ts-control .item {
    color: var(--text-primary) !important;
} */

.ts-wrapper .clear-button {
    color: var(--text-muted) !important;
}

/* ================================================================
   STATUS SELECT PILL (inline quick-change dropdowns in tables)
   ================================================================ */
.status-select {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    border-radius: 99px;
    padding: 3px 12px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: var(--transition);
}

.status-select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

.status-pending {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.status-in_progress {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.status-under_review {
    background: rgba(245, 158, 11, 0.12);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-hold {
    background: rgba(251, 146, 60, 0.12);
    color: #fdba74;
    border: 1px solid rgba(251, 146, 60, 0.2);
}

.status-complete,
.status-completed {
    background: rgba(34, 197, 94, 0.12);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* invoice statuses */
.status-draft {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.status-sent {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.status-paid {
    background: rgba(34, 197, 94, 0.12);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-partially_paid {
    background: rgba(6, 182, 212, 0.12);
    color: #67e8f9;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.status-overdue {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ================================================================
   DARK MODAL (Bootstrap modal overrides)
   ================================================================ */
.modal-content {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    color: var(--text-primary) !important;
}

.modal-header {
    border-bottom: 1px solid var(--border) !important;
    padding: 18px 24px !important;
}

.modal-title {
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
}

.modal-footer {
    border-top: 1px solid var(--border) !important;
    padding: 16px 24px !important;
    gap: 8px;
}

.modal-body {
    padding: 24px !important;
}

.btn-close {
    filter: invert(1) brightness(0.6) !important;
}

.modal-backdrop {
    background: rgba(0, 0, 0, 0.7) !important;
}

/* view/plaintext fields in modal */
.field-view {
    font-size: 0.9rem;
    color: var(--text-primary);
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    min-height: 36px;
}

.field-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

/* ================================================================
   INVOICE BOX (show.php — printable area)
   ================================================================ */
.invoice-wrapper {
    max-width: 820px;
    margin: 0 auto;
}

.invoice-box {
    background: #ffffff;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 40px;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
}

.invoice-box table {
    width: 100%;
    border-collapse: collapse;
}

.invoice-box table td {
    padding: 5px 8px;
    vertical-align: top;
}

.invoice-box table tr td:nth-child(n+2) {
    text-align: right;
}

.invoice-box .inv-heading th {
    background: #f1f5f9;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    padding: 10px 8px;
    border-bottom: 1px solid #e2e8f0;
}

.invoice-box .inv-item td {
    padding: 10px 8px;
    border-bottom: 1px solid #f1f5f9;
}

.invoice-box .inv-item:last-child td {
    border-bottom: none;
}

.invoice-box .inv-total td {
    padding: 6px 8px;
}

.invoice-project-card {
    background: #f8faff;
    border: 1px solid #e0e7ff;
    border-left: 4px solid #6366f1;
    border-radius: 6px;
    padding: 14px 16px;
    margin: 16px 0;
    font-size: 13px;
    color: #374151;
}

@media print {
    body {
        background: #fff !important;
    }

    .sidebar,
    .main-wrapper>.topbar,
    .btn-print-hide {
        display: none !important;
    }

    .main-wrapper {
        margin-left: 0 !important;
    }

    .page-content {
        padding: 0 !important;
        background: transparent !important;
    }

    .invoice-box {
        box-shadow: none;
        border: none;
        padding: 0;
    }
}

/* ================================================================
   RADIO / CHECKBOX STYLED
   ================================================================ */
.radio-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.radio-option input[type="radio"],
.radio-option input[type="checkbox"] {
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.checkbox-label input {
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
}

/* ================================================================
   PROJECT FINANCIALS MINI CARD
   ================================================================ */
.fin-card {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-top: 10px;
    font-size: 0.8rem;
}

.fin-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.fin-row+.fin-row {
    border-top: 1px solid var(--border);
}

.fin-row .fin-label {
    color: var(--text-muted);
    font-size: 14px;
}

.fin-row .fin-val {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.fin-row .fin-val.green {
    color: var(--success);
}

.fin-row .fin-val.red {
    color: var(--danger);
}

/* ================================================================
   ITEMS TABLE (invoice create)
   ================================================================ */
.items-table {
    width: 100%;
    border-collapse: collapse;
}

.items-table thead th {
    background: #f8fafc;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.items-table thead th:last-child {
    width: 40px;
    text-align: center;
}

/* .items-table tbody tr:hover {
    background: #f8fafc;
} */

.items-table tbody td {
    padding: 8px 6px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.items-table tbody tr:last-child td {
    border-bottom: none;
}

.items-table .form-w-control {
    padding: 7px 10px;
}

/* Client, Project, Task, Invoice, Payment, and Expense Card styles */
.client-card,
.project-card,
.task-card,
.invoice-card,
.payment-card,
.expense-card {
    transition: var(--transition);
}

.client-card:hover,
.project-card:hover,
.task-card:hover,
.invoice-card:hover,
.payment-card:hover,
.expense-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(99, 102, 241, 0.25);
}

/* Display helpers for responsive layouts */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

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

    .mobile-only {
        display: block !important;
    }
}

/* Sky Theme Centered Auth Layout */
.sky-auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(135deg, #bae6fd 0%, #e0f2fe 50%, #bae6fd 100%);
    position: relative;
    padding: 40px 20px;
    overflow-y: auto;
}

.sky-auth-container::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 15%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
}

.sky-auth-container::after {
    content: '';
    position: absolute;
    bottom: 10%;
    right: 15%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(50px);
    pointer-events: none;
}

.sky-auth-card {
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    border-radius: 28px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.sky-auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

.sky-auth-logo-icon {
    font-size: 1.6rem;
}

.sky-auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.sky-auth-sub {
    font-size: 0.88rem;
    color: #64748b;
    text-align: center;
    line-height: 1.5;
    margin-bottom: 32px;
}

.sky-auth-form-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sky-auth-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
    display: block;
}

.sky-auth-label span {
    color: #ef4444;
    margin-left: 2px;
}

.sky-auth-input {
    width: 100%;
    height: 48px;
    padding: 0 18px;
    border-radius: var(--radius-sm);
    border: 1px solid #e2e8f0;
    background: #f0f7ff;
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    outline: none;
}

.sky-auth-input::placeholder {
    color: #94a3b8;
}

.sky-auth-input:focus {
    border-color: #bae6fd;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(186, 230, 253, 0.4);
}

.sky-auth-btn-primary {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #1e293b;
    border: none;
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.15);
    margin-top: 10px;
}

.sky-auth-btn-primary:hover {
    background: #0f172a;
    transform: translateY(-1px);
}

.sky-auth-btn-secondary {
    width: 100%;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    color: #334155;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.sky-auth-btn-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.sky-auth-remember-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-top: 4px;
}

.sky-auth-checkbox {
    accent-color: #1e293b;
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.sky-auth-link {
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.sky-auth-link:hover {
    color: #0f172a;
    text-decoration: underline;
}

.sky-auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #94a3b8;
    font-size: 0.78rem;
    margin: 20px 0;
}

.sky-auth-divider::before,
.sky-auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.sky-auth-divider:not(:empty)::before {
    margin-right: .5em;
}

.sky-auth-divider:not(:empty)::after {
    margin-left: .5em;
}

.sky-auth-alert-danger {
    margin-bottom: 20px;
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    padding: 12px;
    font-size: 0.85rem;
}

.sky-auth-alert-success {
    margin-bottom: 20px;
    background: rgba(34, 197, 94, 0.08);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 8px;
    padding: 12px;
    font-size: 0.85rem;
}

@media (max-width: 576px) {
    .sky-auth-card {
        padding: 36px 24px;
        border-radius: 20px;
    }
}