/* ================================================================
   TASKIVITY — assets/css/style.css
   Complete stylesheet — Login + Admin + Member
   ================================================================ */

/* ── GOOGLE FONTS (loaded in HTML head) ── */
/* Nunito: headings/buttons | Inter: body text */

/* ── CSS VARIABLES ── */
:root {
    --primary:        #6366f1;
    --primary-dark:   #4f46e5;
    --primary-darker: #4338ca;
    --primary-light:  #eef2ff;
    --accent:         #14b8a6;
    --accent-light:   #f0fdfa;

    --success:        #22c55e;
    --success-light:  #f0fdf4;
    --warning:        #f59e0b;
    --warning-light:  #fffbeb;
    --danger:         #ef4444;
    --danger-light:   #fef2f2;
    --info:           #3b82f6;
    --info-light:     #eff6ff;

    --text-dark:      #1e293b;
    --text-mid:       #475569;
    --text-light:     #94a3b8;
    --border:         #e2e8f0;
    --border-light:   #f1f5f9;

    --bg:             #f8fafc;
    --bg-card:        #ffffff;
    --sidebar-bg:     #1e1b4b;
    --sidebar-hover:  #2d2a63;
    --sidebar-active: #6366f1;
    --sidebar-text:   rgba(255,255,255,0.75);
    --sidebar-width:  240px;

    --radius-sm:      8px;
    --radius:         12px;
    --radius-lg:      16px;
    --radius-xl:      24px;

    --shadow-sm:      0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow:         0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg:      0 10px 40px rgba(0,0,0,0.12);
    --shadow-primary: 0 4px 15px rgba(99,102,241,0.3);

    --transition:     all 0.2s ease;
    --font-head:      'Nunito', sans-serif;
    --font-body:      'Inter', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-dark);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

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

ul, ol { list-style: none; }

/* ── LAYOUT: SIDEBAR + MAIN ── */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1000;
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.sidebar-logo {
    padding: 20px 16px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar-logo img {
    width: 100%;
    max-width: 220px;
    height: auto;
    filter: none;
    opacity: 1;
    display: block;
}

.sidebar-nav {
    padding: 16px 12px;
    flex: 1;
}

.nav-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    padding: 12px 12px 6px;
    display: block;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    font-size: 13.5px;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
    text-decoration: none;
}
.sidebar-nav a .nav-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}
.sidebar-nav a:hover {
    background: var(--sidebar-hover);
    color: #fff;
}
.sidebar-nav a.active {
    background: var(--sidebar-active);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(99,102,241,0.4);
}

.sidebar-footer {
    padding: 16px 12px 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
}
.sidebar-avatar {
    width: 34px;
    height: 34px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 13px;
    color: #fff;
    flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-role {
    font-size: 11px;
    color: var(--sidebar-text);
    text-transform: capitalize;
}
.sidebar-nav a.logout-link {
    color: rgba(239,68,68,0.8);
}
.sidebar-nav a.logout-link:hover {
    background: rgba(239,68,68,0.1);
    color: #ef4444;
}

/* ── MAIN CONTENT ── */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── TOP BAR ── */
.topbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: var(--shadow-sm);
}
.topbar-title {
    font-family: var(--font-head);
    font-size: 18px;
    font-weight: 800;
    color: var(--text-dark);
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Notification bell */
.notif-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    color: var(--text-mid);
    font-size: 18px;
    transition: var(--transition);
}
.notif-btn:hover { background: var(--bg); color: var(--primary); }
.notif-badge {
    position: absolute;
    top: 2px; right: 2px;
    width: 16px; height: 16px;
    background: var(--danger);
    color: #fff;
    border-radius: 50%;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── PAGE CONTENT AREA ── */
.page-content {
    padding: 28px;
    flex: 1;
}

/* ── TRIAL BANNER ── */
.trial-banner {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    border-radius: var(--radius);
    padding: 12px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.trial-banner span { font-size: 13.5px; font-weight: 600; color: #92400e; }
.trial-banner a {
    background: #f59e0b;
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

/* ── STAT CARDS ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.stat-card.total::before   { background: var(--primary); }
.stat-card.pending::before { background: var(--warning); }
.stat-card.progress::before{ background: var(--info); }
.stat-card.done::before    { background: var(--success); }
.stat-card.overdue::before { background: var(--danger); }
.stat-card.members::before { background: var(--accent); }

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}
a.stat-card {
    display: block;
    color: inherit;
}
a.stat-card:hover .stat-number {
    color: var(--primary);
}
.stat-icon {
    font-size: 28px;
    margin-bottom: 10px;
    display: block;
}
.stat-number {
    font-family: var(--font-head);
    font-size: 32px;
    font-weight: 900;
    color: var(--text-dark);
    line-height: 1;
    margin-bottom: 4px;
}
.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── CARDS ── */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.card-title {
    font-family: var(--font-head);
    font-size: 16px;
    font-weight: 800;
    color: var(--text-dark);
}
.card-body { padding: 22px; }

/* ── TABLE ── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
thead th {
    background: var(--bg);
    padding: 11px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-light);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}
tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-dark);
    vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #fafbff; }

/* ── BADGES ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}
.badge-warning  { background: #fef3c7; color: #92400e; }
.badge-success  { background: #dcfce7; color: #166534; }
.badge-danger   { background: #fee2e2; color: #991b1b; }
.badge-urgent   { background: #4a0000; color: #ff4444; border: 1.5px solid #ff4444; font-weight: 900; letter-spacing: 0.3px; }
.badge-info     { background: #dbeafe; color: #1e40af; }
.badge-secondary{ background: #f1f5f9; color: #475569; }
.badge-primary  { background: var(--primary-light); color: var(--primary-dark); }

/* ── BUTTONS ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--radius);
    font-family: var(--font-head);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: var(--shadow-primary);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-darker));
    box-shadow: 0 6px 20px rgba(99,102,241,0.4);
    color: #fff;
}
.btn-secondary {
    background: var(--bg);
    color: var(--text-mid);
    border: 1.5px solid var(--border);
}
.btn-secondary:hover { background: var(--border-light); color: var(--text-dark); }

.btn-success {
    background: var(--success);
    color: #fff;
    box-shadow: 0 4px 12px rgba(34,197,94,0.3);
}
.btn-danger {
    background: var(--danger);
    color: #fff;
    box-shadow: 0 4px 12px rgba(239,68,68,0.25);
}
.btn-warning {
    background: var(--warning);
    color: #fff;
    box-shadow: 0 4px 12px rgba(245,158,11,0.3);
}
.btn-sm { padding: 6px 13px; font-size: 12.5px; border-radius: var(--radius-sm); }
.btn-xs { padding: 4px 10px; font-size: 11.5px; border-radius: 6px; }
.btn-icon {
    padding: 8px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    background: var(--bg);
    border: 1.5px solid var(--border);
    color: var(--text-mid);
}
.btn-icon:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }

/* ── FORMS ── */
.form-group { margin-bottom: 18px; }

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

.form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: var(--font-body);
    color: var(--text-dark);
    background: var(--bg);
    transition: var(--transition);
    outline: none;
}
.form-control:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.10);
}
.form-control::placeholder { color: var(--text-light); }

textarea.form-control { resize: vertical; min-height: 90px; }
select.form-control { cursor: pointer; }

/* Row/column grid helpers */
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 180px; }

/* ── ALERTS ── */
.alert {
    padding: 13px 18px;
    border-radius: var(--radius);
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 18px;
    border-left-width: 4px;
    border-left-style: solid;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.alert-success { background: var(--success-light); border-color: var(--success); color: #166534; }
.alert-error   { background: var(--danger-light);  border-color: var(--danger);  color: #991b1b; }
.alert-warning { background: var(--warning-light); border-color: var(--warning); color: #92400e; }
.alert-info    { background: var(--info-light);    border-color: var(--info);    color: #1e40af; }

/* ── PROGRESS BAR ── */
.progress-wrap {
    background: var(--border-light);
    border-radius: 20px;
    overflow: hidden;
    height: 8px;
}
.progress-bar {
    height: 100%;
    border-radius: 20px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.6s ease;
}
.progress-bar.danger  { background: linear-gradient(90deg, var(--danger), #ff6b6b); }
.progress-bar.warning { background: linear-gradient(90deg, var(--warning), #fbbf24); }
.progress-bar.success { background: linear-gradient(90deg, var(--success), #4ade80); }

/* ── PRIORITY + STATUS COLORS ── */
.priority-high   { color: var(--danger); font-weight: 700; }
.priority-medium { color: var(--warning); font-weight: 700; }
.priority-low    { color: var(--success); font-weight: 700; }

/* ── TASK CARD (member view) ── */
.task-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 18px 20px;
    margin-bottom: 12px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid transparent;
}
.task-card:hover { transform: translateX(3px); box-shadow: var(--shadow); }
.task-card.pending     { border-left-color: var(--warning); }
.task-card.in_progress { border-left-color: var(--info); }
.task-card.completed   { border-left-color: var(--success); opacity: 0.8; }
.task-card.overdue     { border-left-color: var(--danger); background: #fff8f8; }

.task-card-title {
    font-family: var(--font-head);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}
.task-card-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: var(--text-light);
    margin-bottom: 10px;
}
.task-card-meta span { display: flex; align-items: center; gap: 4px; }

/* ── FILTER BAR ── */
.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 20px;
}
.filter-bar .form-control {
    padding: 8px 12px;
    font-size: 13px;
    max-width: 180px;
}

/* ── ANNOUNCEMENT ITEM ── */
.announce-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
}
.announce-item:last-child { border-bottom: none; }
.announce-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}
.announce-content { flex: 1; min-width: 0; }
.announce-text {
    color: #1e293b;
    font-size: 13.5px;
    color: var(--text-dark);
    margin-bottom: 3px;
    line-height: 1.5;
}
.announce-meta { font-size: 11.5px; color: #64748b; }

/* ── TEAM MEMBER ROW ── */
.member-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
}
.member-row:last-child { border-bottom: none; }
.member-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 14px;
    color: #fff;
    flex-shrink: 0;
}
.member-info { flex: 1; min-width: 0; }
.member-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-dark);
}
.member-email { font-size: 12px; color: var(--text-light); }
.member-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── PAGE HEADER ── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.page-header-title {
    font-family: var(--font-head);
    font-size: 22px;
    font-weight: 900;
    color: var(--text-dark);
    line-height: 1.2;
}
.page-header-sub {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 2px;
}

/* ── EMPTY STATE ── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}
.empty-state .empty-icon { font-size: 52px; margin-bottom: 14px; opacity: 0.5; }
.empty-state h3 {
    font-family: var(--font-head);
    font-size: 17px;
    font-weight: 700;
    color: var(--text-mid);
    margin-bottom: 6px;
}
.empty-state p { font-size: 13.5px; }

/* ── INVITE CODE BOX ── */
.invite-code-box {
    background: var(--primary-light);
    border: 2px dashed var(--primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
}
.invite-code {
    font-family: 'Courier New', monospace;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 0.2em;
    color: var(--primary-dark);
    margin: 10px 0;
}

/* ── PLAN CARDS (subscribe page) ── */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 24px;
}
.plan-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px 24px;
    position: relative;
    transition: var(--transition);
}
.plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.plan-card.featured {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary), var(--shadow-lg);
}
.plan-badge-top {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 14px;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: 0.05em;
}
.plan-name {
    font-family: var(--font-head);
    font-size: 18px;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 4px;
}
.plan-price {
    font-family: var(--font-head);
    font-size: 36px;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
    margin: 12px 0 4px;
}
.plan-price span { font-size: 14px; font-weight: 500; color: var(--text-light); }
.plan-features {
    margin: 16px 0 22px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.plan-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--text-mid);
}
.plan-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
    font-size: 13px;
}

/* ── VOICE BUTTON ── */
.voice-btn {
    background: none;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    cursor: pointer;
    color: var(--text-mid);
    font-size: 18px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}
.voice-btn:hover { border-color: var(--primary); color: var(--primary); }
.voice-btn.recording {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--danger-light);
    animation: pulse 1s infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.3); }
    50%       { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
}

/* ── MODAL ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}
.modal {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 520px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: modalIn 0.25s ease both;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-title {
    font-family: var(--font-head);
    font-size: 17px;
    font-weight: 800;
    color: var(--text-dark);
}
.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-light);
    padding: 4px;
    transition: var(--transition);
    border-radius: var(--radius-sm);
}
.modal-close:hover { color: var(--danger); background: var(--danger-light); }
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ── NOTIFICATION DROPDOWN ── */
.notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    background: #1a1c26;
    border: 1px solid rgba(212,175,55,0.25);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    z-index: 300;
    overflow: hidden;
}
.notif-dropdown-header {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(212,175,55,0.12);
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 14px;
    color: #f0e6c8;
    background: #1a1c26;
    border-radius: 16px 16px 0 0;
}
.notif-item {
    padding: 12px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 13px;
    color: #38bdf8;
    line-height: 1.5;
    font-weight: 500;
    background: #1a1c26;
    cursor: pointer;
    transition: background 0.15s;
}
.notif-item:hover { background: rgba(212,175,55,0.07) !important; color: #f59e0b !important; }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: rgba(56,189,248,0.08) !important; color: #7dd3fc !important; font-weight: 700; }
.notif-time { font-size: 11px; color: rgba(212,175,55,0.5); margin-top: 3px; }

@media (max-width: 600px) {
    .notif-dropdown {
        width: calc(100vw - 20px);
        right: -8px;
        max-height: 72vh;
        overflow-y: auto;
    }
}

/* ── MOBILE HAMBURGER ── */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    font-size: 22px;
    color: var(--text-dark);
}

/* ── GRID HELPERS ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.flex   { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-2  { gap: 8px; }
.gap-3  { gap: 12px; }
.gap-4  { gap: 16px; }
.mt-1   { margin-top: 4px; }
.mt-2   { margin-top: 8px; }
.mt-3   { margin-top: 12px; }
.mt-4   { margin-top: 16px; }
.mb-4   { margin-bottom: 16px; }
.mb-6   { margin-bottom: 24px; }
.text-sm{ font-size: 12.5px; }
.text-muted { color: var(--text-light); }
.fw-bold { font-weight: 700; }
.text-center { text-align: center; }
.w-full { width: 100%; }

/* ── SCROLLBAR STYLING ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    :root { --sidebar-width: 0px; }

    .sidebar {
        width: 260px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        height: auto;
        max-height: none;
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 999;
        -webkit-tap-highlight-color: transparent;
        touch-action: none;
    }
    .sidebar-overlay.active { display: block; }

    .main-content { margin-left: 0; }
    .hamburger { display: block; }
    .page-content { padding: 16px; }
    .topbar { padding: 12px 16px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .plans-grid { grid-template-columns: 1fr; }
    .filter-bar .form-control { max-width: 100%; }
    .plan-card { padding: 22px 18px; }
    table { font-size: 12.5px; }
    thead th, tbody td { padding: 10px 12px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .topbar-title { font-size: 15px; }
    .page-header-title { font-size: 18px; }
    .stat-number { font-size: 26px; }
}

/* ── PRINT ── */
@media print {
    .sidebar, .topbar, .btn, .filter-bar { display: none !important; }
    .main-content { margin-left: 0; }
    .page-content { padding: 0; }
    body { background: #fff; }
}




/* ── TOPBAR TAGLINE ── */


/* ================================================================
   TASKIVITY — TASK ALERTS & BADGES
   ================================================================ */

/* ── Overdue blinking badge ── */
.overdue-blink {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fef2f2;
    color: #991b1b;
    border: 1.5px solid #ef4444;
    font-size: 10.5px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    animation: blink-red 1s ease-in-out infinite;
}

/* ── Due today warning ── */
.deadline-warn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fffbeb;
    color: #92400e;
    border: 1.5px solid #f59e0b;
    font-size: 10.5px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    animation: pulse-warn 1.5s ease-in-out infinite;
}

/* ── CF Badge ── */
.cf-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #fde68a;
    color: #78350f;
    border: 1.5px solid #d97706;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.04em;
}

/* ── NEW Badge ── */
.new-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #f0fdf4;
    color: #166534;
    border: 1.5px solid #86efac;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 4px;
}

/* ── Overdue row highlight ── */
.overdue-row td {
    background: #fff8f8 !important;
}
.overdue-row:hover td {
    background: #fff0f0 !important;
}

/* ── Topbar tagline ── */
.topbar-tagline {
    font-size: 10.5px;
    color: #94a3b8;
    font-weight: 600;
    letter-spacing: 0.07em;
    margin-top: 1px;
}

/* ── Animations ── */
@keyframes blink-red {
    0%, 100% { opacity: 1; background: #fef2f2; border-color: #ef4444; }
    50%       { opacity: 0.6; background: #fee2e2; border-color: #dc2626; }
}

@keyframes pulse-warn {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.8; transform: scale(1.03); }
}

@keyframes blink-orange {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}

/* ================================================================
   TASKIVITY — 3-TIER PLAN LAYOUTS
   Applied via body class: plan-free / plan-starter / plan-pro
   ================================================================ */

/* ── FREE TIER — Clean minimal grey ── */
body.plan-free {
    background: #f5f5f5;
}
body.plan-free .sidebar {
    background: #374151;
}
body.plan-free .sidebar-nav a.active {
    background: #4b5563;
}
body.plan-free .sidebar-nav a:hover {
    background: #4b5563;
}
body.plan-free .stat-card {
    border: 1px solid #e5e7eb;
    box-shadow: none;
}
body.plan-free .stat-card::before {
    background: #9ca3af !important;
}
body.plan-free .stat-number {
    color: #374151;
}
body.plan-free .topbar {
    border-bottom: 2px solid #e5e7eb;
    background: #fff;
}
body.plan-free .card {
    border-radius: 8px;
    box-shadow: none;
    border: 1px solid #e5e7eb;
}
body.plan-free .btn-primary {
    background: #4b5563;
    box-shadow: none;
}
body.plan-free .btn-primary:hover {
    background: #374151;
}
body.plan-free .free-upgrade-bar {
    display: flex !important;
}

/* ── STARTER TIER — Professional blue (current default) ── */
body.plan-starter {
    background: var(--bg);
}
/* Starter uses all the default styles already defined */

/* ── PROFESSIONAL TIER — Premium dark + gold ── */
body.plan-pro {
    background: #0f1117;
}
body.plan-pro .sidebar {
    background: linear-gradient(180deg, #0f1117 0%, #1a1a2e 100%);
    border-right: 1px solid rgba(212,175,55,0.2);
}
body.plan-pro .sidebar-logo {
    border-bottom: 1px solid rgba(212,175,55,0.15);
}
body.plan-pro .sidebar-nav a {
    color: rgba(255,255,255,0.65);
}
body.plan-pro .sidebar-nav a:hover {
    background: rgba(212,175,55,0.08);
    color: #d4af37;
}
body.plan-pro .sidebar-nav a.active {
    background: linear-gradient(135deg, rgba(212,175,55,0.2), rgba(212,175,55,0.1));
    color: #d4af37;
    border-left: 3px solid #d4af37;
    box-shadow: none;
}
body.plan-pro .nav-label {
    color: rgba(212,175,55,0.4);
}
body.plan-pro .main-content {
    background: #0f1117;
}
body.plan-pro .topbar {
    background: #16181f;
    border-bottom: 1px solid rgba(212,175,55,0.15);
}
body.plan-pro .topbar-title {
    color: #f0e6c8;
}
body.plan-pro .topbar-tagline {
    color: rgba(212,175,55,0.6);
}
body.plan-pro .page-content {
    background: #0f1117;
}

/* Pro stat cards — glassmorphism */
body.plan-pro .stat-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    border: 1px solid rgba(212,175,55,0.15);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
body.plan-pro .stat-card:hover {
    border-color: rgba(212,175,55,0.4);
    box-shadow: 0 8px 32px rgba(212,175,55,0.1);
}
body.plan-pro .stat-card::before {
    background: linear-gradient(90deg, #d4af37, #f0c040) !important;
}
body.plan-pro .stat-number {
    color: #f0e6c8;
}
body.plan-pro .stat-label {
    color: rgba(212,175,55,0.6);
}
body.plan-pro .stat-icon {
    filter: drop-shadow(0 0 8px rgba(212,175,55,0.3));
}

/* Pro cards */
body.plan-pro .card {
    background: linear-gradient(135deg, #16181f, #1a1c26);
    border: 1px solid rgba(212,175,55,0.12);
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
    border-radius: 16px;
}
body.plan-pro .card-header {
    border-bottom: 1px solid rgba(212,175,55,0.1);
}
body.plan-pro .card-title {
    color: #f0e6c8;
}
body.plan-pro .page-header-title {
    color: #f0e6c8;
}
body.plan-pro .page-header-sub {
    color: rgba(212,175,55,0.5);
}

/* Pro table */
body.plan-pro table thead th {
    background: rgba(212,175,55,0.08);
    color: rgba(212,175,55,0.7);
    border-bottom: 1px solid rgba(212,175,55,0.15);
}
body.plan-pro table tbody td {
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: #38bdf8;
}
body.plan-pro table tbody tr:hover td {
    background: rgba(212,175,55,0.04);
    color: #f59e0b;
}
body.plan-pro table tbody tr:hover td a,
body.plan-pro table tbody tr:hover td .task-link {
    color: #f59e0b !important;
}

/* Pro buttons */
body.plan-pro .btn-primary {
    background: linear-gradient(135deg, #d4af37, #b8962e);
    color: #0f1117;
    font-weight: 800;
    box-shadow: 0 4px 15px rgba(212,175,55,0.3);
}
body.plan-pro .btn-primary:hover {
    background: linear-gradient(135deg, #f0c040, #d4af37);
    box-shadow: 0 6px 20px rgba(212,175,55,0.4);
    color: #0f1117;
}
body.plan-pro .btn-secondary {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(212,175,55,0.2);
    color: #d1d5db;
}
body.plan-pro .btn-secondary:hover {
    background: rgba(212,175,55,0.08);
    border-color: #d4af37;
    color: #d4af37;
}

/* Pro form controls */
body.plan-pro .form-control {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(212,175,55,0.2);
    color: #f0e6c8;
}
body.plan-pro .form-control:focus {
    border-color: #d4af37;
    background: rgba(212,175,55,0.05);
    box-shadow: 0 0 0 3px rgba(212,175,55,0.1);
}
body.plan-pro .form-control::placeholder {
    color: rgba(255,255,255,0.25);
}
body.plan-pro label {
    color: rgba(212,175,55,0.7);
}

/* Pro trial/upgrade banner */
body.plan-pro .trial-banner {
    background: linear-gradient(135deg, rgba(212,175,55,0.15), rgba(212,175,55,0.05));
    border: 1px solid rgba(212,175,55,0.3);
}
body.plan-pro .trial-banner span {
    color: #d4af37;
}
body.plan-pro .trial-banner a {
    background: #d4af37;
    color: #0f1117;
}

/* Pro sidebar user */
body.plan-pro .sidebar-avatar {
    background: linear-gradient(135deg, #d4af37, #b8962e);
    color: #0f1117;
}
body.plan-pro .sidebar-user-name {
    color: #f0e6c8;
}
body.plan-pro .sidebar-footer {
    border-top: 1px solid rgba(212,175,55,0.1);
}

/* Pro badge overrides */
body.plan-pro .badge-overdue {
    background: rgba(239,68,68,0.15);
    border-color: #ef4444;
}
body.plan-pro .badge-today {
    background: rgba(245,158,11,0.15);
    border-color: #f59e0b;
}
body.plan-pro .badge-cf {
    background: rgba(212,175,55,0.18);
    border-color: #d4af37;
    color: #fde68a;
    font-weight: 900;
}

/* Pro scrollbar */
body.plan-pro ::-webkit-scrollbar-thumb {
    background: rgba(212,175,55,0.3);
}
body.plan-pro ::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
}

/* Pro empty state */
body.plan-pro .empty-state h3 { color: #f0e6c8; }
body.plan-pro .empty-state p  { color: rgba(255,255,255,0.4); }

/* Pro pro-badge in sidebar */
body.plan-pro .pro-crown {
    display: inline-block !important;
}

/* ── FREE UPGRADE BAR ── */
.free-upgrade-bar {
    display: none;
    background: linear-gradient(135deg, #1e1b4b, #312e81);
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 20px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.free-upgrade-bar span {
    color: #c7d2fe;
    font-size: 13.5px;
    font-weight: 600;
}
.free-upgrade-bar a {
    background: #6366f1;
    color: #fff;
    padding: 7px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

/* ── PRO CROWN in sidebar ── */
.pro-crown {
    display: none;
    font-size: 14px;
    margin-left: 4px;
}


/* ================================================================
   TASKIVITY PROFESSIONAL THEME — COMPLETE OVERRIDE
   Dark Navy #0f1117 + Gold #d4af37
   ================================================================ */

/* Base */
body.plan-pro,
body.plan-pro .main-content,
body.plan-pro .page-content { background:#0f1117 !important; }

/* Sidebar */
body.plan-pro .sidebar { background:linear-gradient(180deg,#0d0f1a,#12142a) !important; border-right:1px solid rgba(212,175,55,0.15) !important; }
body.plan-pro .sidebar-logo { border-bottom:1px solid rgba(212,175,55,0.12) !important; }
body.plan-pro .nav-label { color:rgba(212,175,55,0.35) !important; font-size:10px; }
body.plan-pro .sidebar-nav a { color:rgba(220,220,255,0.65) !important; }
body.plan-pro .sidebar-nav a:hover { background:rgba(212,175,55,0.08) !important; color:#d4af37 !important; }
body.plan-pro .sidebar-nav a.active { background:rgba(212,175,55,0.15) !important; color:#f0c040 !important; border-left:3px solid #d4af37 !important; box-shadow:none !important; }
body.plan-pro .sidebar-footer { border-top:1px solid rgba(212,175,55,0.1) !important; }
body.plan-pro .sidebar-user-name { color:#f0e6c8 !important; }
body.plan-pro .sidebar-user-role { color:rgba(212,175,55,0.5) !important; }
body.plan-pro .sidebar-avatar { background:linear-gradient(135deg,#d4af37,#a07820) !important; color:#000 !important; }

/* Topbar */
body.plan-pro .topbar { background:#12142a !important; border-bottom:1px solid rgba(212,175,55,0.15) !important; }
body.plan-pro .topbar-title { color:#f0e6c8 !important; font-weight:800 !important; }
body.plan-pro .topbar-tagline { color:rgba(212,175,55,0.5) !important; }

/* Cards */
body.plan-pro .card { background:#12142a !important; border:1px solid rgba(212,175,55,0.12) !important; }
body.plan-pro .card-header { border-bottom:1px solid rgba(212,175,55,0.1) !important; background:transparent !important; }
body.plan-pro .card-title { color:#f0e6c8 !important; font-weight:800 !important; }
body.plan-pro .card-body { background:transparent !important; }

/* Stat cards */
body.plan-pro .stat-card { background:linear-gradient(135deg,rgba(255,255,255,0.04),rgba(255,255,255,0.01)) !important; border:1px solid rgba(212,175,55,0.15) !important; box-shadow:0 4px 20px rgba(0,0,0,0.4) !important; }
body.plan-pro .stat-card:hover { border-color:rgba(212,175,55,0.4) !important; transform:translateY(-4px); }
body.plan-pro .stat-card::before { background:linear-gradient(90deg,#d4af37,#f0c040) !important; }
body.plan-pro .stat-number { color:#f0e6c8 !important; }
body.plan-pro .stat-label { color:rgba(212,175,55,0.6) !important; font-weight:700 !important; }
body.plan-pro .stat-icon { filter:drop-shadow(0 0 6px rgba(212,175,55,0.3)); }

/* Page headers */
body.plan-pro .page-header-title { color:#f0e6c8 !important; }
body.plan-pro .page-header-sub { color:rgba(212,175,55,0.5) !important; }

/* Tables - FORCE everything dark */
body.plan-pro table { background:transparent !important; }
body.plan-pro thead tr,
body.plan-pro thead tr th { background:rgba(212,175,55,0.08) !important; color:#d4af37 !important; font-weight:800 !important; border-bottom:1px solid rgba(212,175,55,0.2) !important; }
body.plan-pro tbody tr,
body.plan-pro tbody tr td { background:#12142a !important; color:#38bdf8 !important; border-bottom:1px solid rgba(255,255,255,0.04) !important; }
body.plan-pro tbody tr:hover,
body.plan-pro tbody tr:hover td { background:rgba(212,175,55,0.07) !important; color:#f59e0b !important; }
body.plan-pro .row-overdue td  { background:rgba(239,68,68,0.07) !important; }
body.plan-pro .row-duetoday td { background:rgba(245,158,11,0.05) !important; }

/* Task links */
body.plan-pro .task-link { color:#38bdf8 !important; font-weight:700 !important; }
body.plan-pro .task-link:hover { color:#f59e0b !important; }
body.plan-pro a.task-link { color:#e2e8f0 !important; }
body.plan-pro a.task-link:hover { color:#d4af37 !important; }

/* Member names */
body.plan-pro .member-name { color:#f0e6c8 !important; font-weight:700 !important; }
body.plan-pro .member-email { color:rgba(212,175,55,0.5) !important; }
body.plan-pro .member-row { border-bottom:1px solid rgba(212,175,55,0.08) !important; }
body.plan-pro .member-avatar { box-shadow:0 0 0 2px rgba(212,175,55,0.2) !important; }

/* Forms */
body.plan-pro .form-control { background:rgba(255,255,255,0.05) !important; border:1px solid rgba(212,175,55,0.2) !important; color:#f0e6c8 !important; }
body.plan-pro .form-control:focus { border-color:#d4af37 !important; box-shadow:0 0 0 3px rgba(212,175,55,0.1) !important; }
body.plan-pro select option { background:#1a1c26 !important; color:#f0e6c8 !important; }
body.plan-pro label { color:rgba(212,175,55,0.7) !important; }
body.plan-pro textarea.form-control { background:rgba(255,255,255,0.04) !important; color:#f0e6c8 !important; }

/* Buttons */
body.plan-pro .btn-primary { background:linear-gradient(135deg,#d4af37,#a07820) !important; color:#000 !important; font-weight:800 !important; box-shadow:0 4px 15px rgba(212,175,55,0.3) !important; border:none !important; }
body.plan-pro .btn-primary:hover { background:linear-gradient(135deg,#f0c040,#d4af37) !important; color:#000 !important; }
body.plan-pro .btn-secondary { background:rgba(255,255,255,0.05) !important; border:1px solid rgba(212,175,55,0.2) !important; color:#d1d5db !important; }
body.plan-pro .btn-secondary:hover { background:rgba(212,175,55,0.1) !important; color:#d4af37 !important; border-color:#d4af37 !important; }

/* Announcements */
body.plan-pro .announce-item { border-bottom:1px solid rgba(212,175,55,0.08) !important; }
body.plan-pro .announce-text { color:#e2e8f0 !important; }
body.plan-pro .announce-meta { color:rgba(212,175,55,0.4) !important; }
body.plan-pro .announce-avatar { background:rgba(212,175,55,0.1) !important; }

/* Badges stay colourful but adapt */
body.plan-pro .badge { border-radius:6px !important; }

/* Trial banner */
body.plan-pro .trial-banner { background:linear-gradient(135deg,rgba(212,175,55,0.12),rgba(212,175,55,0.04)) !important; border:1px solid rgba(212,175,55,0.3) !important; }
body.plan-pro .trial-banner span { color:#d4af37 !important; }
body.plan-pro .trial-banner a { background:#d4af37 !important; color:#000 !important; }

/* Progress */
body.plan-pro .progress-wrap { background:rgba(255,255,255,0.08) !important; }

/* Notifications — base CSS already dark, just reinforce */
body.plan-pro .notif-item.unread { background:rgba(56,189,248,0.1) !important; color:#7dd3fc !important; }

/* Modal */
body.plan-pro .modal { background:#1a1c26 !important; }
body.plan-pro .modal-header { border-bottom:1px solid rgba(212,175,55,0.1) !important; }
body.plan-pro .modal-footer { border-top:1px solid rgba(212,175,55,0.1) !important; }
body.plan-pro .modal-title { color:#f0e6c8 !important; }
body.plan-pro .modal-overlay { background:rgba(0,0,0,0.75) !important; }

/* Scrollbar */
body.plan-pro ::-webkit-scrollbar-thumb { background:rgba(212,175,55,0.25) !important; }
body.plan-pro ::-webkit-scrollbar-track { background:rgba(255,255,255,0.02) !important; }

/* Date columns */
body.plan-pro .date-col { color:rgba(212,175,55,0.55) !important; }

/* Override ALL inline color styles */
body.plan-pro [style*="color:#1e293b"] { color:#f0e6c8 !important; }
body.plan-pro [style*="color: #1e293b"] { color:#f0e6c8 !important; }
body.plan-pro [style*="color:#374151"] { color:#e2e8f0 !important; }
body.plan-pro [style*="color:#475569"] { color:#d1d5db !important; }
body.plan-pro [style*="color:#64748b"] { color:rgba(212,175,55,0.55) !important; }
body.plan-pro [style*="color:#94a3b8"] { color:rgba(255,255,255,0.4) !important; }
body.plan-pro [style*="color:#cbd5e1"] { color:rgba(255,255,255,0.2) !important; }
body.plan-pro [style*="color:#slate"] { color:#e2e8f0 !important; }

/* Override ALL inline background styles */
body.plan-pro [style*="background:#fff;"],
body.plan-pro [style*="background: #fff;"],
body.plan-pro [style*="background:#ffffff"],
body.plan-pro [style*="background:white"] { background:#12142a !important; }
body.plan-pro [style*="background:#f8fafc"] { background:rgba(255,255,255,0.03) !important; }
body.plan-pro [style*="background:#f1f5f9"] { background:rgba(255,255,255,0.04) !important; }
body.plan-pro [style*="background:#eef2ff"] { background:rgba(99,102,241,0.1) !important; }
body.plan-pro [style*="background:#fef3c7"] { background:rgba(245,158,11,0.08) !important; }
body.plan-pro [style*="background:#f0fdf4"] { background:rgba(34,197,94,0.07) !important; }
body.plan-pro [style*="background:#fef2f2"] { background:rgba(239,68,68,0.07) !important; }
body.plan-pro [style*="background:#fff7ed"] { background:rgba(249,115,22,0.07) !important; }

/* Override ALL inline border styles */
body.plan-pro [style*="border:1px solid #e2e8f0"] { border-color:rgba(212,175,55,0.12) !important; }
body.plan-pro [style*="border: 1px solid #e2e8f0"] { border-color:rgba(212,175,55,0.12) !important; }
body.plan-pro [style*="border-bottom:1px solid #e2e8f0"] { border-bottom-color:rgba(212,175,55,0.08) !important; }
body.plan-pro [style*="border-bottom: 1px solid #f1f5f9"] { border-bottom-color:rgba(212,175,55,0.06) !important; }

/* subscription page cards */
body.plan-pro .plan-card { background:#12142a !important; border-color:rgba(212,175,55,0.15) !important; }
body.plan-pro .plan-card.featured { border-color:#d4af37 !important; box-shadow:0 0 0 1px #d4af37, 0 8px 30px rgba(212,175,55,0.15) !important; }
body.plan-pro .plan-name { color:#f0e6c8 !important; }
body.plan-pro .plan-tagline { color:rgba(212,175,55,0.5) !important; }
body.plan-pro .plan-price { color:#d4af37 !important; }
body.plan-pro .plan-divider { background:rgba(212,175,55,0.1) !important; }
body.plan-pro .f-row { color:#d1d5db !important; }
body.plan-pro .f-row.no { color:rgba(255,255,255,0.2) !important; }
body.plan-pro .f-row.lock { color:#d4af37 !important; }
body.plan-pro .feature-section { color:rgba(212,175,55,0.5) !important; }

/* Filter form */
body.plan-pro .card [style*="padding:16px 20px"] { background:#12142a !important; }

/* Report stat cards */
body.plan-pro a.stat-card { color:inherit !important; }
body.plan-pro a.stat-card:hover .stat-number { color:#d4af37 !important; }

/* FREE TIER */
body.plan-free { background:#f5f5f5 !important; }
body.plan-free .sidebar { background:#2d3748 !important; }
body.plan-free .sidebar-nav a.active { background:#4a5568 !important; }
body.plan-free .stat-card::before { background:#9ca3af !important; }
body.plan-free .btn-primary { background:#4a5568 !important; box-shadow:none !important; }
body.plan-free .card { border-radius:8px !important; box-shadow:none !important; }

/* PRO TABLE COMPLETE FIX */
body.plan-pro tbody tr td { background:#16181f !important; color:#38bdf8 !important; }
body.plan-pro tbody tr:hover td { background:rgba(212,175,55,0.07) !important; color:#f59e0b !important; }
body.plan-pro thead th { background:rgba(212,175,55,0.1) !important; color:#d4af37 !important; }
body.plan-pro [style*="color:#1e293b"] { color:#38bdf8 !important; }
body.plan-pro [style*="color:#64748b"] { color:rgba(212,175,55,0.6) !important; }
body.plan-pro [style*="background:#fff"] { background:#16181f !important; }
body.plan-pro [style*="background:#f8fafc"] { background:rgba(255,255,255,0.03) !important; }
body.plan-pro .task-link { color:#38bdf8 !important; }
body.plan-pro .task-link:hover { color:#f59e0b !important; }
body.plan-pro select option { background:#1a1c26; color:#f0e6c8; }

/* ================================================================
   TASKIVITY v2.1 — THEME UPDATES
   ================================================================ */

/* ── FIX ROW COLORS FOR DARK THEME ── */
/* Starter: left border only */
tr.row-overdue  > td { border-left: 4px solid #ef4444 !important; }
tr.row-duetoday > td { border-left: 4px solid #f59e0b !important; }
tr.row-cf       > td { border-left: 4px solid #fbbf24 !important; }

/* Pro: brighter colored text + glowing left border */
body.plan-pro tr.row-overdue  > td { border-left: 4px solid #ef4444 !important; background: rgba(239,68,68,0.04) !important; }
body.plan-pro tr.row-overdue  .task-link { color: #fca5a5 !important; }
body.plan-pro tr.row-duetoday > td { border-left: 4px solid #f59e0b !important; background: rgba(245,158,11,0.04) !important; }
body.plan-pro tr.row-duetoday .task-link { color: #fcd34d !important; }
body.plan-pro tr.row-cf       > td { border-left: 4px solid #d4af37 !important; }

/* ── QUICK TASK FLOATING BUTTON ── */
.quick-task-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transition: all 0.2s;
    text-decoration: none;
}
.quick-task-fab:hover { transform: scale(1.1); box-shadow: 0 6px 24px rgba(0,0,0,0.25); }
body.plan-starter .quick-task-fab,
body.plan-free    .quick-task-fab { background: linear-gradient(135deg,#6366f1,#4f46e5); color: #fff; }
body.plan-pro     .quick-task-fab { background: linear-gradient(135deg,#d4af37,#b8962e); color: #0f1117; }

/* Hide FAB on desktop, show on mobile */
@media (min-width: 769px) { .quick-task-fab { display: none; } }

/* ── DARK MODE TOGGLE ── */
.dark-toggle {
    background: none;
    border: 1.5px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 13px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s;
}
.dark-toggle:hover { border-color: #6366f1; color: #6366f1; }
body.plan-pro .dark-toggle { border-color: rgba(212,175,55,0.3); color: rgba(212,175,55,0.7); }

/* ── MOBILE LOGIN LOGO FIX ── */
.login-logo img {
    width: 280px;
    max-width: 80%;
    height: auto;
    display: block;
    margin: 0 auto;
}
.login-logo-fallback {
    display: none;
    font-family: 'Nunito', sans-serif;
    font-size: 28px;
    font-weight: 900;
    color: #6366f1;
    text-align: center;
}
/* ================================================================
   TASKIVITY — APPEARANCE FIXES v3.1
   1. Sidebar logo + firm name larger
   2. Font size via data-font-size attribute (rem-based)
   3. Light mode for all plans (body.theme-light)
   4. Ocean Blue — warm amber/teal bg
   5. Forest Green — warm yellow/green bg
   6. Classic Light — fully visible, works on all plans
   7. CF badge visibility fixes
================================================================ */

/* ── 1. SIDEBAR LOGO + FIRM NAME ─────────────────────────────── */
.sidebar-logo img {
    width: 100% !important;
    max-width: 220px !important;
    height: auto;
}
.sidebar-ws-name {
    font-size: 13px !important;
    font-weight: 800 !important;
    color: rgba(255,255,255,0.75) !important;
    letter-spacing: 0.04em !important;
}
.sidebar-plan-label {
    font-size: 11.5px !important;
    font-weight: 700 !important;
}

/* ── 2. FONT SIZE — data attribute on <html> ──────────────────── */
html[data-font-size="small"]  { font-size: 12px !important; }
html[data-font-size="default"]{ font-size: 14px !important; }
html[data-font-size="large"]  { font-size: 16px !important; }
html[data-font-size="xlarge"] { font-size: 19px !important; }

html[data-font-size="large"]  .sidebar-nav a,
html[data-font-size="xlarge"] .sidebar-nav a { font-size: 1em !important; }
html[data-font-size="large"]  .topbar-title,
html[data-font-size="xlarge"] .topbar-title   { font-size: 1.2em !important; }
html[data-font-size="large"]  .stat-num,
html[data-font-size="xlarge"] .stat-num       { font-size: 2em !important; }
html[data-font-size="large"]  .card,
html[data-font-size="xlarge"] .card           { font-size: 1em !important; }
html[data-font-size="large"]  td,
html[data-font-size="xlarge"] td              { font-size: 0.95em !important; }
html[data-font-size="large"]  .badge,
html[data-font-size="xlarge"] .badge          { font-size: 0.8em !important; }

/* ── 3. LIGHT MODE — all plans (body.theme-light) ────────────── */
body.theme-light {
    background: #f1f5f9;
    color: #1e293b;
}
body.theme-light .sidebar {
    background: linear-gradient(180deg, #1e293b, #0f172a);
}
body.theme-light .sidebar-nav a { color: rgba(255,255,255,0.75); }
body.theme-light .sidebar-nav a.active { background: linear-gradient(135deg,#6366f1,#4f46e5); color: #fff; border-left: none; }
body.theme-light .sidebar-nav a:hover { color: #fff; background: rgba(255,255,255,0.1); }
body.theme-light .main-content { background: #f1f5f9; margin-left: var(--sidebar-width); }
body.theme-light .topbar { background: #fff; border-bottom: 1px solid #e2e8f0; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
body.theme-light .topbar-title { color: #1e293b; }
body.theme-light .card { background: #fff; border: 1px solid #e2e8f0; box-shadow: 0 2px 8px rgba(0,0,0,0.06); color: #1e293b; }
body.theme-light .card-title { color: #1e293b !important; }
body.theme-light .stat-card { background: #fff; border: 1px solid #e2e8f0; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
body.theme-light .stat-num { color: #1e293b !important; }
body.theme-light .stat-lbl { color: #64748b !important; }
body.theme-light .page-content { background: #f1f5f9; }
body.theme-light .page-header-title { color: #1e293b !important; }
body.theme-light .page-header-sub { color: #64748b !important; }
body.theme-light thead th { background: #f8fafc !important; color: #475569 !important; border-bottom: 2px solid #e2e8f0 !important; }
body.theme-light tbody td { background: #fff !important; color: #374151 !important; border-bottom: 1px solid #f1f5f9 !important; }
body.theme-light tbody tr:hover td { background: #f8fafc !important; }
body.theme-light .task-link, body.theme-light .task-link a { color: #4f46e5 !important; }
body.theme-light .task-link:hover { color: #7c3aed !important; }
body.theme-light .form-control { background: #f8fafc; border-color: #e2e8f0; color: #1e293b; }
body.theme-light .form-control:focus { border-color: #6366f1; }
body.theme-light label { color: #374151 !important; }
body.theme-light .btn-secondary { background: #f1f5f9; border-color: #e2e8f0; color: #374151; }
body.theme-light .nav-label { color: rgba(255,255,255,0.4) !important; }
body.theme-light .sidebar-user-name { color: #fff !important; }
body.theme-light .sidebar-user-role { color: rgba(255,255,255,0.5) !important; }
body.theme-light [style*="color:#94a3b8"] { color: #64748b !important; }
body.theme-light [style*="color:#64748b"] { color: #475569 !important; }
body.theme-light [style*="color:#1e293b"] { color: #1e293b !important; }
body.theme-light [style*="color:#38bdf8"] { color: #4f46e5 !important; }
body.theme-light [style*="color:#f8fafc"] { color: #1e293b !important; }
body.theme-light [style*="color:rgba(255"] { color: #374151 !important; }
body.theme-light [style*="background:#16181f"],
body.theme-light [style*="background:#0f1117"],
body.theme-light [style*="background:#1a1c26"] { background: #fff !important; }
body.theme-light .quick-task-fab { background: linear-gradient(135deg,#6366f1,#4f46e5); }

/* ── CF Badge: light mode visibility fix ──────────────────────── */
/* On light backgrounds the default pale-yellow fades out — darken it */
body.theme-light .badge-cf,
body.theme-classic-light .badge-cf {
    background: #fde68a !important;   /* richer amber-yellow */
    color: #78350f !important;        /* deep brown — strong contrast */
    border-color: #d97706 !important; /* visible amber border */
    font-weight: 900 !important;
}
/* Also fix the inline-style overridden version used in member dashboard */
body.theme-light .task-card-member .badge-cf,
body.theme-classic-light .task-card-member .badge-cf {
    background: #fde68a !important;
    color: #78350f !important;
    border-color: #d97706 !important;
}

/* ── 4. OCEAN BLUE — Blue + Orange combination ────────────────── */
/* Sidebar: deep ocean blue. Background: warm orange. Cards: blue-tinted white. */
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro,
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .main-content,
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .page-content {
    background: #fff4e6 !important;
}
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .sidebar {
    background: linear-gradient(180deg, #0c1a2e 0%, #091526 100%) !important;
    border-right: 1px solid rgba(6,182,212,0.25) !important;
}
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .sidebar-nav a { color: rgba(186,230,253,0.75) !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .sidebar-nav a.active {
    background: linear-gradient(135deg, rgba(6,182,212,0.3), rgba(6,182,212,0.12)) !important;
    color: #22d3ee !important; border-left: 3px solid #22d3ee !important;
}
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .sidebar-nav a:hover { color: #22d3ee !important; background: rgba(6,182,212,0.12) !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .nav-label { color: rgba(6,182,212,0.4) !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .sidebar-footer { border-top: 1px solid rgba(6,182,212,0.15) !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .topbar {
    background: linear-gradient(135deg, #1d4ed8, #0f172a) !important;
    border-bottom: 2px solid #38bdf8 !important;
    box-shadow: 0 2px 18px rgba(29,78,216,0.35) !important;
}
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .topbar-title { color: #fff !important; font-weight: 800 !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .topbar-right button,
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .topbar-right a { color: rgba(255,255,255,0.85) !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .hamburger { color: #fff !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .card {
    background: linear-gradient(135deg, #0f172a, #1d4ed8) !important;
    border: 1.5px solid rgba(96,165,250,0.55) !important;
    box-shadow: 0 8px 24px rgba(15,23,42,0.28) !important;
    color: #e0f2fe !important;
}
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .card-header { border-bottom: 1px solid rgba(96,165,250,0.45) !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .card-title { color: #dbeafe !important; font-weight: 800 !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .stat-card,
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro a.stat-card {
    background: linear-gradient(135deg, rgba(30,64,175,0.16), rgba(14,165,233,0.12)) !important;
    border: 1.5px solid rgba(96,165,250,0.55) !important;
    box-shadow: 0 8px 20px rgba(15,23,42,0.22) !important;
    backdrop-filter: none !important;
}
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .stat-card::before { background: linear-gradient(90deg, #3b82f6, #06b6d4) !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .stat-num,
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .stat-number { color: #dbeafe !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .stat-lbl,
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .stat-label { color: #93c5fd !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .stat-icon { color: #3b82f6 !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .page-header-title { color: #e0f2fe !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .page-header-sub { color: #475569 !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(59,130,246,0.4) !important;
}
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .btn-secondary {
    background: linear-gradient(135deg, #0f172a, #1d4ed8) !important;
    border-color: #93c5fd !important;
    color: #dbeafe !important;
}
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro thead th { background: #bfdbfe !important; color: #dbeafe !important; border-bottom: 2px solid #93c5fd !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro tbody td { background: rgba(15,23,42,0.16) !important; color: #e0f2fe !important; border-bottom: 1px solid #bfdbfe !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro tbody tr:hover td { background: linear-gradient(135deg, #0f172a, #1d4ed8) !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .task-link { color: #e0f2fe !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .task-link:hover { color: #bfdbfe !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .form-control { background: rgba(15,23,42,0.16) !important; border-color: #93c5fd !important; color: #e0f2fe !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .form-control:focus { border-color: #3b82f6 !important; box-shadow: 0 0 0 3px rgba(59,130,246,0.2) !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro label { color: #dbeafe !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .member-row { border-bottom: 1px solid #bfdbfe !important; background: rgba(15,23,42,0.16) !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .member-name { color: #dbeafe !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .sb-plan { color: #22d3ee !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .quick-task-fab { background: linear-gradient(135deg, #f97316, #ea580c) !important; color: #fff !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .modal { background: linear-gradient(135deg, #0f172a, #1d4ed8) !important; border: 1px solid #93c5fd !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro .modal-header { border-bottom: 1px solid #93c5fd !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro [style*="background:#16181f"],
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro [style*="background:#0f1117"],
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro [style*="background:#1a1c26"],
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro [style*="background:#12142a"] { background: linear-gradient(135deg, #0f172a, #1d4ed8) !important; color: #e0f2fe !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro [style*="color:#94a3b8"] { color: #3b82f6 !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro [style*="color:#64748b"] { color: #bfdbfe !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro [style*="color:#38bdf8"] { color: #e0f2fe !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro [style*="color:#f8fafc"] { color: #e0f2fe !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro [style*="color:rgba(255"] { color: #e0f2fe !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro [style*="color:#1e293b"] { color: #e0f2fe !important; }
body.theme-bright-ocean.plan-pro,
body.theme-ocean-blue.plan-pro [style*="color:#475569"] { color: #bfdbfe !important; }

/* ── 5. FOREST GREEN — Green + Yellow combination ─────────────── */
/* Sidebar: deep forest green. Background: warm yellow. Cards: green-tinted white. */
body.theme-forest-green.plan-pro,
body.theme-forest-green.plan-pro .main-content,
body.theme-forest-green.plan-pro .page-content {
    background: #fefce8 !important;
}
body.theme-forest-green.plan-pro .sidebar {
    background: linear-gradient(180deg, #052e16 0%, #071a0f 100%) !important;
    border-right: 1px solid rgba(34,197,94,0.25) !important;
}
body.theme-forest-green.plan-pro .sidebar-nav a { color: rgba(187,247,208,0.75) !important; }
body.theme-forest-green.plan-pro .sidebar-nav a.active {
    background: linear-gradient(135deg, rgba(34,197,94,0.3), rgba(34,197,94,0.12)) !important;
    color: #4ade80 !important; border-left: 3px solid #4ade80 !important;
}
body.theme-forest-green.plan-pro .sidebar-nav a:hover { color: #4ade80 !important; background: rgba(34,197,94,0.12) !important; }
body.theme-forest-green.plan-pro .nav-label { color: rgba(34,197,94,0.4) !important; }
body.theme-forest-green.plan-pro .sidebar-footer { border-top: 1px solid rgba(34,197,94,0.15) !important; }
body.theme-forest-green.plan-pro .topbar {
    background: #eab308 !important;
    border-bottom: 2px solid #ca8a04 !important;
    box-shadow: 0 2px 12px rgba(234,179,8,0.4) !important;
}
body.theme-forest-green.plan-pro .topbar-title { color: #fff !important; font-weight: 800 !important; }
body.theme-forest-green.plan-pro .topbar-right button,
body.theme-forest-green.plan-pro .topbar-right a { color: rgba(255,255,255,0.9) !important; }
body.theme-forest-green.plan-pro .hamburger { color: #fff !important; }
body.theme-forest-green.plan-pro .card {
    background: #dcfce7 !important;
    border: 1.5px solid #86efac !important;
    box-shadow: 0 4px 16px rgba(34,197,94,0.12) !important;
    color: #14532d !important;
}
body.theme-forest-green.plan-pro .card-header { border-bottom: 1px solid #86efac !important; }
body.theme-forest-green.plan-pro .card-title { color: #15803d !important; font-weight: 800 !important; }
body.theme-forest-green.plan-pro .stat-card,
body.theme-forest-green.plan-pro a.stat-card {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7) !important;
    border: 1.5px solid #86efac !important;
    box-shadow: 0 4px 16px rgba(34,197,94,0.15) !important;
    backdrop-filter: none !important;
}
body.theme-forest-green.plan-pro .stat-card::before { background: linear-gradient(90deg, #22c55e, #4ade80) !important; }
body.theme-forest-green.plan-pro .stat-num,
body.theme-forest-green.plan-pro .stat-number { color: #15803d !important; }
body.theme-forest-green.plan-pro .stat-lbl,
body.theme-forest-green.plan-pro .stat-label { color: #16a34a !important; }
body.theme-forest-green.plan-pro .stat-icon { color: #22c55e !important; }
body.theme-forest-green.plan-pro .page-header-title { color: #15803d !important; }
body.theme-forest-green.plan-pro .page-header-sub { color: #16a34a !important; }
body.theme-forest-green.plan-pro .btn-primary {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(34,197,94,0.4) !important;
}
body.theme-forest-green.plan-pro .btn-secondary {
    background: #dcfce7 !important;
    border-color: #86efac !important;
    color: #15803d !important;
}
body.theme-forest-green.plan-pro thead th { background: #bbf7d0 !important; color: #15803d !important; border-bottom: 2px solid #86efac !important; }
body.theme-forest-green.plan-pro tbody td { background: #f0fdf4 !important; color: #14532d !important; border-bottom: 1px solid #bbf7d0 !important; }
body.theme-forest-green.plan-pro tbody tr:hover td { background: #dcfce7 !important; }
body.theme-forest-green.plan-pro .task-link { color: #15803d !important; }
body.theme-forest-green.plan-pro .task-link:hover { color: #16a34a !important; }
body.theme-forest-green.plan-pro .form-control { background: #f0fdf4 !important; border-color: #86efac !important; color: #14532d !important; }
body.theme-forest-green.plan-pro .form-control:focus { border-color: #22c55e !important; box-shadow: 0 0 0 3px rgba(34,197,94,0.2) !important; }
body.theme-forest-green.plan-pro label { color: #15803d !important; }
body.theme-forest-green.plan-pro .member-row { border-bottom: 1px solid #bbf7d0 !important; background: #f0fdf4 !important; }
body.theme-forest-green.plan-pro .member-name { color: #15803d !important; }
body.theme-forest-green.plan-pro .sb-plan { color: #4ade80 !important; }
body.theme-forest-green.plan-pro .quick-task-fab { background: linear-gradient(135deg, #eab308, #ca8a04) !important; color: #fff !important; }
body.theme-forest-green.plan-pro .modal { background: #dcfce7 !important; border: 1px solid #86efac !important; }
body.theme-forest-green.plan-pro .modal-header { border-bottom: 1px solid #86efac !important; }
body.theme-forest-green.plan-pro [style*="background:#16181f"],
body.theme-forest-green.plan-pro [style*="background:#0f1117"],
body.theme-forest-green.plan-pro [style*="background:#1a1c26"],
body.theme-forest-green.plan-pro [style*="background:#12142a"] { background: #dcfce7 !important; color: #14532d !important; }
body.theme-forest-green.plan-pro [style*="color:#94a3b8"] { color: #16a34a !important; }
body.theme-forest-green.plan-pro [style*="color:#64748b"] { color: #15803d !important; }
body.theme-forest-green.plan-pro [style*="color:#38bdf8"] { color: #15803d !important; }
body.theme-forest-green.plan-pro [style*="color:#f8fafc"] { color: #14532d !important; }
body.theme-forest-green.plan-pro [style*="color:rgba(255"] { color: #14532d !important; }
body.theme-forest-green.plan-pro [style*="color:#1e293b"] { color: #14532d !important; }
body.theme-forest-green.plan-pro [style*="color:#475569"] { color: #15803d !important; }

/* ── 6. CLASSIC LIGHT — Clean white professional theme ─────────── */
/* Sidebar: navy. Background: light grey. Cards: pure white. */
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro,
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .main-content,
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .page-content {
    background: #f1f5f9 !important;
}
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .sidebar {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%) !important;
    border-right: 1px solid rgba(99,102,241,0.15) !important;
}
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .sidebar-nav a { color: rgba(255,255,255,0.75) !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .sidebar-nav a.active {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    color: #fff !important; border-left: none !important;
}
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .sidebar-nav a:hover { color: #fff !important; background: rgba(255,255,255,0.1) !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .nav-label { color: rgba(255,255,255,0.4) !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .topbar {
    background: #fff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
}
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .topbar-title { color: #1e293b !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .hamburger { color: #475569 !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .card {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
    color: #1e293b !important;
}
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .card-title { color: #1e293b !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .stat-card,
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro a.stat-card {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
    backdrop-filter: none !important;
}
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .stat-num,
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .stat-number { color: #1e293b !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .stat-lbl,
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .stat-label { color: #64748b !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .page-header-title { color: #1e293b !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .page-header-sub { color: #64748b !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .btn-primary {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    color: #fff !important;
}
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .btn-secondary {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #374151 !important;
}
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro thead th { background: #f8fafc !important; color: #475569 !important; border-bottom: 2px solid #e2e8f0 !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro tbody td { background: #fff !important; color: #374151 !important; border-bottom: 1px solid #f1f5f9 !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro tbody tr:hover td { background: #f8fafc !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .task-link { color: #4f46e5 !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .task-link:hover { color: #7c3aed !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .form-control { background: #f8fafc !important; border-color: #e2e8f0 !important; color: #1e293b !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .form-control:focus { border-color: #6366f1 !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro label { color: #374151 !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .member-row { border-bottom: 1px solid #f1f5f9 !important; background: #fff !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .member-name { color: #1e293b !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .sb-plan { color: rgba(99,102,241,0.8) !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .quick-task-fab { background: linear-gradient(135deg, #6366f1, #4f46e5) !important; color: #fff !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .modal { background: #fff !important; border: 1px solid #e2e8f0 !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .sidebar-user-name { color: #fff !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .sidebar-user-role { color: rgba(255,255,255,0.5) !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro [style*="background:#16181f"],
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro [style*="background:#0f1117"],
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro [style*="background:#1a1c26"],
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro [style*="background:#12142a"] { background: #fff !important; color: #1e293b !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro [style*="color:#94a3b8"] { color: #64748b !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro [style*="color:#64748b"] { color: #475569 !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro [style*="color:#38bdf8"] { color: #4f46e5 !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro [style*="color:#f8fafc"] { color: #1e293b !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro [style*="color:rgba(255"] { color: #374151 !important; }
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro [style*="color:#1e293b"] { color: #1e293b !important; }

/* ── THEME-LIGHT (sidebar toggle) — all plans ──────────────────── */
/* Works independently of theme chooser */
body.theme-light,
body.theme-light .main-content,
body.theme-light .page-content,
body.theme-light.plan-pro,
body.theme-light.plan-pro .main-content,
body.theme-light.plan-pro .page-content { background: #f1f5f9 !important; }
body.theme-light .topbar,
body.theme-light.plan-pro .topbar { background: #fff !important; border-bottom: 1px solid #e2e8f0 !important; box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important; }
body.theme-light .topbar-title,
body.theme-light.plan-pro .topbar-title { color: #1e293b !important; }
body.theme-light .card,
body.theme-light.plan-pro .card { background: #fff !important; border: 1px solid #e2e8f0 !important; color: #1e293b !important; }
body.theme-light .card-title,
body.theme-light.plan-pro .card-title { color: #1e293b !important; }
body.theme-light .stat-card,
body.theme-light.plan-pro .stat-card { background: #fff !important; border: 1px solid #e2e8f0 !important; box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important; backdrop-filter: none !important; }
body.theme-light .stat-num, body.theme-light .stat-number,
body.theme-light.plan-pro .stat-num, body.theme-light.plan-pro .stat-number { color: #1e293b !important; }
body.theme-light .stat-lbl,
body.theme-light.plan-pro .stat-lbl { color: #64748b !important; }
body.theme-light thead th,
body.theme-light.plan-pro thead th { background: #f8fafc !important; color: #475569 !important; border-bottom: 2px solid #e2e8f0 !important; }
body.theme-light tbody td, body.theme-light tbody tr td,
body.theme-light.plan-pro tbody td, body.theme-light.plan-pro tbody tr td { background: #fff !important; color: #374151 !important; border-bottom: 1px solid #f1f5f9 !important; }
body.theme-light tbody tr:hover td,
body.theme-light.plan-pro tbody tr:hover td { background: #f8fafc !important; }
body.theme-light .task-link, body.theme-light a.task-link,
body.theme-light.plan-pro .task-link { color: #4f46e5 !important; }
body.theme-light .form-control,
body.theme-light.plan-pro .form-control { background: #f8fafc !important; border-color: #e2e8f0 !important; color: #1e293b !important; }
body.theme-light label,
body.theme-light.plan-pro label { color: #374151 !important; }
body.theme-light .member-row,
body.theme-light.plan-pro .member-row { background: transparent !important; border-bottom: 1px solid #f1f5f9 !important; }
body.theme-light .member-name,
body.theme-light.plan-pro .member-name { color: #1e293b !important; }
body.theme-light .page-header-title,
body.theme-light.plan-pro .page-header-title { color: #1e293b !important; }
body.theme-light .page-header-sub,
body.theme-light.plan-pro .page-header-sub { color: #64748b !important; }
body.theme-light .quick-task-fab,
body.theme-light.plan-pro .quick-task-fab { background: linear-gradient(135deg, #6366f1, #4f46e5) !important; }
body.theme-light [style*="background:#16181f"],
body.theme-light [style*="background:#0f1117"],
body.theme-light [style*="background:#1a1c26"],
body.theme-light [style*="background:#12142a"],
body.theme-light.plan-pro [style*="background:#16181f"],
body.theme-light.plan-pro [style*="background:#0f1117"],
body.theme-light.plan-pro [style*="background:#1a1c26"],
body.theme-light.plan-pro [style*="background:#12142a"] { background: #fff !important; color: #1e293b !important; }
body.theme-light [style*="color:#94a3b8"],
body.theme-light.plan-pro [style*="color:#94a3b8"] { color: #64748b !important; }
body.theme-light [style*="color:#64748b"],
body.theme-light.plan-pro [style*="color:#64748b"] { color: #475569 !important; }
body.theme-light [style*="color:#38bdf8"],
body.theme-light.plan-pro [style*="color:#38bdf8"] { color: #4f46e5 !important; }
body.theme-light [style*="color:#f8fafc"],
body.theme-light.plan-pro [style*="color:#f8fafc"] { color: #1e293b !important; }
body.theme-light [style*="color:rgba(255"],
body.theme-light.plan-pro [style*="color:rgba(255"] { color: #374151 !important; }
body.theme-light .remark-bubble,
body.theme-light.plan-pro .remark-bubble { background: #f1f5f9 !important; color: #1e293b !important; }
body.theme-light .remark-name,
body.theme-light.plan-pro .remark-name { color: #4f46e5 !important; }

/* Announcement text — light mode fixes */
body.theme-light .announce-text,
body.theme-light.plan-pro .announce-text,
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .announce-text { color: #1e293b !important; }
body.theme-light .announce-meta,
body.theme-light.plan-pro .announce-meta,
body.theme-slate-light.plan-pro,
body.theme-classic-light.plan-pro .announce-meta { color: #64748b !important; }
body.theme-light .announce-item,
body.theme-light.plan-pro .announce-item { border-bottom: 1px solid #f1f5f9 !important; }
body.theme-light .score-info,
body.theme-light.plan-pro .score-info { color: #1e293b !important; background: #f1f5f9 !important; border-color: #e2e8f0 !important; }
body.theme-light .score-info strong,
body.theme-light.plan-pro .score-info strong { color: #1e293b !important; }


/* ── TEXT SAFETY / MOBILE OVERFLOW FIXES ── */
.page-header-title, .page-header-sub, .topbar-title, .card-title, .alert, .btn, .badge, .stat-pill,
.sidebar-ws-name, .sidebar-plan-label, .sidebar-user-name, .notif-item, .empty-state p {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.form-control, input[type="text"], input[type="email"], input[type="password"], textarea, select {
    min-width: 0;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .topbar {
        padding: 12px 14px;
        gap: 10px;
    }
    .topbar-right {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .page-content {
        padding: 16px 14px;
    }
    .page-header-title {
        font-size: 22px;
        line-height: 1.2;
    }
    .page-header-sub {
        font-size: 13px;
    }
    .card {
        overflow: hidden;
    }
    .btn, .btn-sm {
        white-space: normal;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .sidebar-logo > div {
        white-space: normal !important;
        line-height: 1.35;
    }
    .topbar-title {
        font-size: 16px;
        line-height: 1.2;
    }
}

/* ================================================================
   PRODUCTION THEME OVERRIDES — standalone readable themes
   ================================================================ */
body.theme-dark-gold.plan-pro,
body.theme-forest-green.plan-pro,
body.theme-bright-ocean.plan-pro,
body.theme-slate-light.plan-pro {
    --theme-card-radius: 16px;
}
body.theme-dark-gold.plan-pro .main-content,
body.theme-forest-green.plan-pro .main-content,
body.theme-bright-ocean.plan-pro .main-content,
body.theme-slate-light.plan-pro .main-content { background: transparent; }

body.theme-dark-gold.plan-pro { background:#0f1117; color:#f8fafc; }
body.theme-dark-gold.plan-pro .sidebar { background:linear-gradient(180deg,#12141d,#161a24); }
body.theme-dark-gold.plan-pro .topbar { background:#1b2030; border-bottom:1px solid rgba(245,158,11,.24); }
body.theme-dark-gold.plan-pro .topbar-title,
body.theme-dark-gold.plan-pro .page-header-title,
body.theme-dark-gold.plan-pro .card-title { color:#f8fafc !important; }
body.theme-dark-gold.plan-pro .page-header-sub,
body.theme-dark-gold.plan-pro .muted-note,
body.theme-dark-gold.plan-pro label { color:#cbd5e1 !important; }
body.theme-dark-gold.plan-pro .card,
body.theme-dark-gold.plan-pro .mini-stat,
body.theme-dark-gold.plan-pro .pending-admin-card,
body.theme-dark-gold.plan-pro .faq-card,
body.theme-dark-gold.plan-pro .stat-card { background:#1b2030 !important; border:1px solid rgba(245,158,11,.2)!important; color:#f8fafc!important; }
body.theme-dark-gold.plan-pro .form-control { background:#121722!important; color:#f8fafc!important; border:1px solid rgba(245,158,11,.3)!important; }
body.theme-dark-gold.plan-pro .btn-secondary { background:#2a3143!important; color:#f8fafc!important; border-color:rgba(245,158,11,.24)!important; }
body.theme-dark-gold.plan-pro .btn-primary { background:linear-gradient(135deg,#f59e0b,#d97706)!important; color:#fff!important; border:none!important; }
body.theme-dark-gold.plan-pro tbody td { background:#1b2030!important; color:#f8fafc!important; border-bottom:1px solid rgba(255,255,255,.08)!important; }
body.theme-dark-gold.plan-pro thead th { background:#232a3d!important; color:#f8fafc!important; }

body.theme-forest-green.plan-pro { background:#08130d; color:#ecfdf5; }
body.theme-forest-green.plan-pro .sidebar { background:linear-gradient(180deg,#0c1d14,#0f2419); }
body.theme-forest-green.plan-pro .topbar { background:#133222; border-bottom:1px solid rgba(16,185,129,.26); }
body.theme-forest-green.plan-pro .topbar-title,
body.theme-forest-green.plan-pro .page-header-title,
body.theme-forest-green.plan-pro .card-title { color:#ecfdf5 !important; }
body.theme-forest-green.plan-pro .page-header-sub,
body.theme-forest-green.plan-pro .muted-note,
body.theme-forest-green.plan-pro label { color:#d1fae5 !important; }
body.theme-forest-green.plan-pro .card,
body.theme-forest-green.plan-pro .mini-stat,
body.theme-forest-green.plan-pro .pending-admin-card,
body.theme-forest-green.plan-pro .faq-card,
body.theme-forest-green.plan-pro .stat-card { background:#0f2d1f !important; border:1px solid rgba(16,185,129,.2)!important; color:#ecfdf5!important; }
body.theme-forest-green.plan-pro .form-control { background:#0b2016!important; color:#ecfdf5!important; border:1px solid rgba(16,185,129,.28)!important; }
body.theme-forest-green.plan-pro .btn-secondary { background:#163524!important; color:#ecfdf5!important; border-color:rgba(16,185,129,.24)!important; }
body.theme-forest-green.plan-pro .btn-primary { background:linear-gradient(135deg,#10b981,#059669)!important; color:#fff!important; border:none!important; }
body.theme-forest-green.plan-pro tbody td { background:#0f2d1f!important; color:#ecfdf5!important; border-bottom:1px solid rgba(255,255,255,.08)!important; }
body.theme-forest-green.plan-pro thead th { background:#143625!important; color:#ecfdf5!important; }
body.theme-forest-green.plan-pro .announcement-item,
body.theme-forest-green.plan-pro .announcement-history-item,
body.theme-forest-green.plan-pro .history-item { color:#ecfdf5 !important; }
body.theme-forest-green.plan-pro [style*="color:#64748b"],
body.theme-forest-green.plan-pro [style*="color:#475569"],
body.theme-forest-green.plan-pro [style*="color:#94a3b8"],
body.theme-forest-green.plan-pro [style*="color:rgba(255"] { color:#d1fae5 !important; }

body.theme-bright-ocean.plan-pro { background:#eaf4ff; color:#0f172a; }
body.theme-bright-ocean.plan-pro .sidebar { background:linear-gradient(180deg,#0f2f52,#123f73); }
body.theme-bright-ocean.plan-pro .sidebar-nav a { color:rgba(224,242,254,.82)!important; }
body.theme-bright-ocean.plan-pro .sidebar-nav a.active { background:linear-gradient(135deg,#2563eb,#0ea5e9)!important; color:#fff!important; }
body.theme-bright-ocean.plan-pro .topbar { background:#ffffff; border-bottom:1px solid #bfdbfe; }
body.theme-bright-ocean.plan-pro .topbar-title,
body.theme-bright-ocean.plan-pro .page-header-title,
body.theme-bright-ocean.plan-pro .card-title { color:#0f172a !important; }
body.theme-bright-ocean.plan-pro .page-header-sub,
body.theme-bright-ocean.plan-pro .muted-note,
body.theme-bright-ocean.plan-pro label { color:#475569 !important; }
body.theme-bright-ocean.plan-pro .card,
body.theme-bright-ocean.plan-pro .mini-stat,
body.theme-bright-ocean.plan-pro .pending-admin-card,
body.theme-bright-ocean.plan-pro .faq-card,
body.theme-bright-ocean.plan-pro .stat-card { background:#ffffff!important; border:1px solid #bfdbfe!important; color:#0f172a!important; box-shadow:0 8px 24px rgba(37,99,235,.08)!important; }
body.theme-bright-ocean.plan-pro .form-control { background:#f8fbff!important; color:#0f172a!important; border:1px solid #bfdbfe!important; }
body.theme-bright-ocean.plan-pro .btn-secondary { background:#eff6ff!important; color:#0f172a!important; border-color:#bfdbfe!important; }
body.theme-bright-ocean.plan-pro .btn-primary { background:linear-gradient(135deg,#2563eb,#0ea5e9)!important; color:#fff!important; border:none!important; }
body.theme-bright-ocean.plan-pro tbody td { background:#ffffff!important; color:#0f172a!important; border-bottom:1px solid #dbeafe!important; }
body.theme-bright-ocean.plan-pro thead th { background:#eff6ff!important; color:#1d4ed8!important; }
body.theme-bright-ocean.plan-pro [style*="background:#16181f"],
body.theme-bright-ocean.plan-pro [style*="background:#0f1117"],
body.theme-bright-ocean.plan-pro [style*="background:#1a1c26"],
body.theme-bright-ocean.plan-pro [style*="background:#12142a"] { background:#ffffff!important; color:#0f172a!important; }
body.theme-bright-ocean.plan-pro [style*="color:#64748b"],
body.theme-bright-ocean.plan-pro [style*="color:#475569"],
body.theme-bright-ocean.plan-pro [style*="color:#94a3b8"],
body.theme-bright-ocean.plan-pro [style*="color:rgba(255"] { color:#475569 !important; }

body.theme-slate-light.plan-pro { background:#f6f8fb; color:#0f172a; }
body.theme-slate-light.plan-pro .sidebar { background:linear-gradient(180deg,#1e293b,#111827); }
body.theme-slate-light.plan-pro .sidebar-nav a { color:rgba(226,232,240,.82)!important; }
body.theme-slate-light.plan-pro .sidebar-nav a.active { background:linear-gradient(135deg,#2563eb,#1d4ed8)!important; color:#fff!important; }
body.theme-slate-light.plan-pro .topbar { background:#ffffff; border-bottom:1px solid #e2e8f0; }
body.theme-slate-light.plan-pro .topbar-title,
body.theme-slate-light.plan-pro .page-header-title,
body.theme-slate-light.plan-pro .card-title { color:#0f172a !important; }
body.theme-slate-light.plan-pro .page-header-sub,
body.theme-slate-light.plan-pro .muted-note,
body.theme-slate-light.plan-pro label { color:#475569 !important; }
body.theme-slate-light.plan-pro .card,
body.theme-slate-light.plan-pro .mini-stat,
body.theme-slate-light.plan-pro .pending-admin-card,
body.theme-slate-light.plan-pro .faq-card,
body.theme-slate-light.plan-pro .stat-card { background:#ffffff!important; border:1px solid #e2e8f0!important; color:#0f172a!important; box-shadow:0 8px 24px rgba(15,23,42,.05)!important; }
body.theme-slate-light.plan-pro .form-control { background:#f8fafc!important; color:#0f172a!important; border:1px solid #cbd5e1!important; }
body.theme-slate-light.plan-pro .btn-secondary { background:#f8fafc!important; color:#0f172a!important; border-color:#cbd5e1!important; }
body.theme-slate-light.plan-pro .btn-primary { background:linear-gradient(135deg,#2563eb,#1d4ed8)!important; color:#fff!important; border:none!important; }
body.theme-slate-light.plan-pro tbody td { background:#ffffff!important; color:#0f172a!important; border-bottom:1px solid #e2e8f0!important; }
body.theme-slate-light.plan-pro thead th { background:#f8fafc!important; color:#334155!important; }
body.theme-slate-light.plan-pro [style*="background:#16181f"],
body.theme-slate-light.plan-pro [style*="background:#0f1117"],
body.theme-slate-light.plan-pro [style*="background:#1a1c26"],
body.theme-slate-light.plan-pro [style*="background:#12142a"] { background:#ffffff!important; color:#0f172a!important; }
body.theme-slate-light.plan-pro [style*="color:#64748b"],
body.theme-slate-light.plan-pro [style*="color:#475569"],
body.theme-slate-light.plan-pro [style*="color:#94a3b8"],
body.theme-slate-light.plan-pro [style*="color:rgba(255"] { color:#475569 !important; }

/* shared fixes */
body.theme-dark-gold.plan-pro .btn.btn-secondary.btn-sm,
body.theme-forest-green.plan-pro .btn.btn-secondary.btn-sm,
body.theme-bright-ocean.plan-pro .btn.btn-secondary.btn-sm,
body.theme-slate-light.plan-pro .btn.btn-secondary.btn-sm {
    opacity:1!important;
    visibility:visible!important;
    display:inline-flex!important;
    align-items:center;
    justify-content:center;
}
body.theme-dark-gold.plan-pro input,
body.theme-dark-gold.plan-pro select,
body.theme-dark-gold.plan-pro textarea,
body.theme-forest-green.plan-pro input,
body.theme-forest-green.plan-pro select,
body.theme-forest-green.plan-pro textarea,
body.theme-bright-ocean.plan-pro input,
body.theme-bright-ocean.plan-pro select,
body.theme-bright-ocean.plan-pro textarea,
body.theme-slate-light.plan-pro input,
body.theme-slate-light.plan-pro select,
body.theme-slate-light.plan-pro textarea {
    pointer-events:auto!important;
    user-select:auto!important;
}


/* ===== Taskivity theme visibility hardening ===== */
body.theme-bright-ocean.plan-pro .topbar-right .btn-secondary,
body.theme-slate-light.plan-pro .topbar-right .btn-secondary {
  background:#ffffff !important;
  color:#0f172a !important;
  border:1px solid #cbd5e1 !important;
}
body.theme-dark-gold.plan-pro .topbar-right .btn-secondary {
  background:#2a3143 !important;
  color:#f8fafc !important;
  border:1px solid rgba(245,158,11,.24) !important;
}
body.theme-forest-green.plan-pro .topbar-right .btn-secondary {
  background:#163524 !important;
  color:#ecfdf5 !important;
  border:1px solid rgba(16,185,129,.24) !important;
}
body.theme-forest-green.plan-pro .announcement-history-card,
body.theme-forest-green.plan-pro .announcement-history-card .card-body,
body.theme-forest-green.plan-pro .announcement-history-item,
body.theme-forest-green.plan-pro .announcement-history-item * {
  color:#ecfdf5 !important;
}
body.theme-bright-ocean.plan-pro .announcement-history-card,
body.theme-bright-ocean.plan-pro .announcement-history-card .card-body,
body.theme-bright-ocean.plan-pro .announcement-history-item,
body.theme-bright-ocean.plan-pro .announcement-history-item * {
  color:#0f172a !important;
}
body.theme-slate-light.plan-pro .announcement-history-card,
body.theme-slate-light.plan-pro .announcement-history-card .card-body,
body.theme-slate-light.plan-pro .announcement-history-item,
body.theme-slate-light.plan-pro .announcement-history-item * {
  color:#0f172a !important;
}
body.theme-dark-gold.plan-pro .announcement-history-card,
body.theme-dark-gold.plan-pro .announcement-history-card .card-body,
body.theme-dark-gold.plan-pro .announcement-history-item,
body.theme-dark-gold.plan-pro .announcement-history-item * {
  color:#f8fafc !important;
}
body.theme-bright-ocean.plan-pro .hero-card,
body.theme-bright-ocean.plan-pro .status-grid .box,
body.theme-bright-ocean.plan-pro .plan-card,
body.theme-bright-ocean.plan-pro .compare-card,
body.theme-bright-ocean.plan-pro .foot-card,
body.theme-bright-ocean.plan-pro .score-info,
body.theme-bright-ocean.plan-pro .lb-card {
  background:#ffffff !important;
  color:#0f172a !important;
  border:1px solid #bfdbfe !important;
  box-shadow:0 8px 24px rgba(37,99,235,.08) !important;
}
body.theme-bright-ocean.plan-pro .hero-card h1,
body.theme-bright-ocean.plan-pro .status-grid h2,
body.theme-bright-ocean.plan-pro .plan-card h3,
body.theme-bright-ocean.plan-pro .lb-name,
body.theme-bright-ocean.plan-pro .lb-score { color:#0f172a !important; }
body.theme-bright-ocean.plan-pro .hero-card p,
body.theme-bright-ocean.plan-pro .status-grid p,
body.theme-bright-ocean.plan-pro .status-grid li,
body.theme-bright-ocean.plan-pro .hero-note,
body.theme-bright-ocean.plan-pro .lb-meta { color:#475569 !important; }
body.theme-slate-light.plan-pro .hero-card,
body.theme-slate-light.plan-pro .status-grid .box,
body.theme-slate-light.plan-pro .plan-card,
body.theme-slate-light.plan-pro .compare-card,
body.theme-slate-light.plan-pro .foot-card,
body.theme-slate-light.plan-pro .score-info,
body.theme-slate-light.plan-pro .lb-card {
  background:#ffffff !important;
  color:#0f172a !important;
  border:1px solid #e2e8f0 !important;
  box-shadow:0 8px 24px rgba(15,23,42,.06) !important;
}
body.theme-slate-light.plan-pro .hero-card h1,
body.theme-slate-light.plan-pro .status-grid h2,
body.theme-slate-light.plan-pro .plan-card h3,
body.theme-slate-light.plan-pro .lb-name,
body.theme-slate-light.plan-pro .lb-score { color:#0f172a !important; }
body.theme-slate-light.plan-pro .hero-card p,
body.theme-slate-light.plan-pro .status-grid p,
body.theme-slate-light.plan-pro .status-grid li,
body.theme-slate-light.plan-pro .hero-note,
body.theme-slate-light.plan-pro .lb-meta { color:#475569 !important; }
body.theme-forest-green.plan-pro .hero-card,
body.theme-forest-green.plan-pro .status-grid .box,
body.theme-forest-green.plan-pro .plan-card,
body.theme-forest-green.plan-pro .compare-card,
body.theme-forest-green.plan-pro .foot-card,
body.theme-forest-green.plan-pro .score-info,
body.theme-forest-green.plan-pro .lb-card {
  background:#0f2d1f !important;
  color:#ecfdf5 !important;
  border:1px solid rgba(16,185,129,.22) !important;
}
body.theme-forest-green.plan-pro .hero-card h1,
body.theme-forest-green.plan-pro .status-grid h2,
body.theme-forest-green.plan-pro .plan-card h3,
body.theme-forest-green.plan-pro .lb-name,
body.theme-forest-green.plan-pro .lb-score,
body.theme-forest-green.plan-pro .score-info { color:#ecfdf5 !important; }
body.theme-forest-green.plan-pro .hero-card p,
body.theme-forest-green.plan-pro .status-grid p,
body.theme-forest-green.plan-pro .status-grid li,
body.theme-forest-green.plan-pro .hero-note,
body.theme-forest-green.plan-pro .lb-meta { color:#d1fae5 !important; }
body.theme-dark-gold.plan-pro .hero-card,
body.theme-dark-gold.plan-pro .status-grid .box,
body.theme-dark-gold.plan-pro .plan-card,
body.theme-dark-gold.plan-pro .compare-card,
body.theme-dark-gold.plan-pro .foot-card,
body.theme-dark-gold.plan-pro .score-info,
body.theme-dark-gold.plan-pro .lb-card {
  background:#1b2030 !important;
  color:#f8fafc !important;
  border:1px solid rgba(245,158,11,.2) !important;
}
body.theme-dark-gold.plan-pro .hero-card h1,
body.theme-dark-gold.plan-pro .status-grid h2,
body.theme-dark-gold.plan-pro .plan-card h3,
body.theme-dark-gold.plan-pro .lb-name,
body.theme-dark-gold.plan-pro .lb-score,
body.theme-dark-gold.plan-pro .score-info { color:#f8fafc !important; }
body.theme-dark-gold.plan-pro .hero-card p,
body.theme-dark-gold.plan-pro .status-grid p,
body.theme-dark-gold.plan-pro .status-grid li,
body.theme-dark-gold.plan-pro .hero-note,
body.theme-dark-gold.plan-pro .lb-meta { color:#cbd5e1 !important; }


/* Bright Ocean polish for dashboard/team cards */
body.theme-bright-ocean.plan-pro .card .progress-wrap,
body.theme-ocean-blue.plan-pro .card .progress-wrap { background: rgba(191,219,254,0.18) !important; }
body.theme-bright-ocean.plan-pro .card .progress-bar,
body.theme-ocean-blue.plan-pro .card .progress-bar { background: linear-gradient(90deg,#38bdf8,#2563eb) !important; }
body.theme-bright-ocean.plan-pro .page-content > .card,
body.theme-ocean-blue.plan-pro .page-content > .card { backdrop-filter: blur(6px); }
body.theme-bright-ocean.plan-pro .mini-stat,
body.theme-ocean-blue.plan-pro .mini-stat { background: linear-gradient(135deg, rgba(30,64,175,0.14), rgba(14,165,233,0.10)) !important; border: 1px solid rgba(96,165,250,0.45) !important; color:#dbeafe !important; }
body.theme-bright-ocean.plan-pro .mini-stat .num,
body.theme-ocean-blue.plan-pro .mini-stat .num { color:#dbeafe !important; }
body.theme-bright-ocean.plan-pro .mini-stat .lbl,
body.theme-ocean-blue.plan-pro .mini-stat .lbl { color:#93c5fd !important; }

/* v4 Bright Ocean explicit full-theme override */
body.theme-bright-ocean.plan-pro,
body.theme-bright-ocean.plan-pro .main-content,
body.theme-bright-ocean.plan-pro .page-content {
    background: #eff6ff !important;
    color: #0f172a !important;
}
body.theme-bright-ocean.plan-pro .sidebar {
    background: linear-gradient(180deg, #0f172a 0%, #1d4ed8 100%) !important;
    border-right: 1px solid rgba(96,165,250,0.35) !important;
}
body.theme-bright-ocean.plan-pro .sidebar-nav a { color: rgba(219,234,254,0.78) !important; }
body.theme-bright-ocean.plan-pro .sidebar-nav a.active {
    background: linear-gradient(135deg, rgba(56,189,248,0.28), rgba(29,78,216,0.22)) !important;
    color: #ffffff !important;
    border-left: 3px solid #38bdf8 !important;
}
body.theme-bright-ocean.plan-pro .sidebar-nav a:hover { background: rgba(59,130,246,0.16) !important; color:#fff !important; }
body.theme-bright-ocean.plan-pro .nav-label { color: rgba(191,219,254,0.45) !important; }
body.theme-bright-ocean.plan-pro .topbar {
    background: linear-gradient(135deg, #1d4ed8, #0f172a) !important;
    border-bottom: 2px solid #38bdf8 !important;
    box-shadow: 0 2px 18px rgba(37,99,235,0.25) !important;
}
body.theme-bright-ocean.plan-pro .topbar-title,
body.theme-bright-ocean.plan-pro .topbar-right,
body.theme-bright-ocean.plan-pro .hamburger { color: #ffffff !important; }
body.theme-bright-ocean.plan-pro .page-header-title { color: #1e3a8a !important; }
body.theme-bright-ocean.plan-pro .page-header-sub { color: #475569 !important; }
body.theme-bright-ocean.plan-pro .card,
body.theme-bright-ocean.plan-pro .task-card,
body.theme-bright-ocean.plan-pro .plan-card,
body.theme-bright-ocean.plan-pro .mini-stat {
    background: linear-gradient(135deg, #0f172a, #1d4ed8) !important;
    border: 1px solid rgba(96,165,250,0.45) !important;
    box-shadow: 0 8px 24px rgba(15,23,42,0.22) !important;
    color: #e0f2fe !important;
}
body.theme-bright-ocean.plan-pro .card-header { border-bottom: 1px solid rgba(147,197,253,0.35) !important; }
body.theme-bright-ocean.plan-pro .card-title,
body.theme-bright-ocean.plan-pro .mini-stat .num { color: #f8fafc !important; }
body.theme-bright-ocean.plan-pro .mini-stat .lbl,
body.theme-bright-ocean.plan-pro .stat-label,
body.theme-bright-ocean.plan-pro .stat-lbl { color: #bfdbfe !important; }
body.theme-bright-ocean.plan-pro .stat-card,
body.theme-bright-ocean.plan-pro a.stat-card {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe) !important;
    border: 1px solid #93c5fd !important;
    color: #1e3a8a !important;
}
body.theme-bright-ocean.plan-pro .stat-number,
body.theme-bright-ocean.plan-pro .stat-num,
body.theme-bright-ocean.plan-pro .stat-icon { color: #1d4ed8 !important; }
body.theme-bright-ocean.plan-pro .btn-primary {
    background: linear-gradient(135deg, #38bdf8, #2563eb) !important;
    color:#fff !important;
    box-shadow: 0 4px 16px rgba(37,99,235,0.35) !important;
}
body.theme-bright-ocean.plan-pro .btn-secondary {
    background: rgba(255,255,255,0.12) !important;
    border-color: rgba(191,219,254,0.55) !important;
    color: #eff6ff !important;
}
body.theme-bright-ocean.plan-pro .form-control {
    background: rgba(255,255,255,0.08) !important;
    border-color: rgba(147,197,253,0.55) !important;
    color: #f8fafc !important;
}
body.theme-bright-ocean.plan-pro .form-control:focus { box-shadow: 0 0 0 3px rgba(56,189,248,0.18) !important; }
body.theme-bright-ocean.plan-pro label,
body.theme-bright-ocean.plan-pro .muted-note,
body.theme-bright-ocean.plan-pro .task-card-meta,
body.theme-bright-ocean.plan-pro .member-name,
body.theme-bright-ocean.plan-pro .card small,
body.theme-bright-ocean.plan-pro .card p,
body.theme-bright-ocean.plan-pro .card div,
body.theme-bright-ocean.plan-pro .card span { color: inherit; }
body.theme-bright-ocean.plan-pro table td,
body.theme-bright-ocean.plan-pro table th { border-color: rgba(147,197,253,0.28) !important; }
body.theme-bright-ocean.plan-pro table th { background: rgba(255,255,255,0.08) !important; color:#dbeafe !important; }
body.theme-bright-ocean.plan-pro table td { background: transparent !important; color:#f8fafc !important; }
body.theme-bright-ocean.plan-pro tbody tr:hover td { background: rgba(255,255,255,0.06) !important; }
body.theme-bright-ocean.plan-pro .progress-wrap { background: rgba(255,255,255,0.12) !important; }
body.theme-bright-ocean.plan-pro .progress-bar { background: linear-gradient(90deg,#38bdf8,#2563eb) !important; }
body.theme-bright-ocean.plan-pro [style*="background:#f8fafc"],
body.theme-bright-ocean.plan-pro [style*="background: #f8fafc"] { background: rgba(255,255,255,0.10) !important; }
body.theme-bright-ocean.plan-pro [style*="background:#fffbeb"],
body.theme-bright-ocean.plan-pro [style*="background:#f0fdf4"],
body.theme-bright-ocean.plan-pro [style*="background:#fef2f2"] { background: rgba(255,255,255,0.12) !important; }
body.theme-bright-ocean.plan-pro [style*="color:#1e293b"],
body.theme-bright-ocean.plan-pro [style*="color: #1e293b"],
body.theme-bright-ocean.plan-pro [style*="color:#94a3b8"],
body.theme-bright-ocean.plan-pro [style*="color:#64748b"] { color: #e0f2fe !important; }
body.theme-bright-ocean.plan-pro .alert-error {
    background:#fee2e2 !important; color:#991b1b !important; border-color:#fca5a5 !important;
}

/* v4 Slate Light explicit alias override */
body.theme-slate-light.plan-pro,
body.theme-slate-light.plan-pro .main-content,
body.theme-slate-light.plan-pro .page-content { background:#f1f5f9 !important; }
body.theme-slate-light.plan-pro .sidebar { background: linear-gradient(180deg, #334155 0%, #0f172a 100%) !important; }
body.theme-slate-light.plan-pro .topbar { background:#e2e8f0 !important; border-bottom:1px solid #cbd5e1 !important; }
body.theme-slate-light.plan-pro .topbar-title,
body.theme-slate-light.plan-pro .hamburger { color:#0f172a !important; }
body.theme-slate-light.plan-pro .card,
body.theme-slate-light.plan-pro .task-card,
body.theme-slate-light.plan-pro .plan-card { background:#ffffff !important; border:1px solid #cbd5e1 !important; color:#0f172a !important; }

/* Final recurring + dashboard theme fixes */
body.theme-forest-green.plan-pro .member-row,
body.theme-forest-green.plan-pro .card .member-row,
body.theme-forest-green.plan-pro .card .card-body .member-row {
  background: rgba(16,185,129,0.14) !important;
  border: 1px solid rgba(52,211,153,0.18) !important;
  border-radius: 14px !important;
  margin-bottom: 10px !important;
  padding: 12px !important;
}
body.theme-forest-green.plan-pro .card .card-body .member-row:last-child {
  margin-bottom: 0 !important;
}
body.theme-forest-green.plan-pro .member-row .member-name,
body.theme-forest-green.plan-pro .member-row .member-info,
body.theme-forest-green.plan-pro .member-row .member-info div,
body.theme-forest-green.plan-pro .member-row [style*="color:#94a3b8"],
body.theme-forest-green.plan-pro .member-row [style*="color:#6366f1"] {
  color: #ecfdf5 !important;
}
body.theme-forest-green.plan-pro .member-row .progress-wrap {
  background: rgba(255,255,255,0.12) !important;
}
body.theme-forest-green.plan-pro .member-row .progress-bar {
  background: linear-gradient(90deg,#34d399,#10b981) !important;
}


/* Deployment polish patch */
.auth-actions-primary,.auth-actions-secondary,.auth-links-utility{display:flex;gap:10px;flex-wrap:wrap;}
.auth-actions-primary .btn,.auth-actions-secondary .btn{flex:1 1 220px;text-align:center;justify-content:center;}
.auth-links-utility{padding-top:4px;border-top:1px solid #e5e7eb;margin-top:2px;}
.auth-links-utility a{font-size:13px;color:#64748b;text-decoration:none;font-weight:700;}
.auth-links-utility a:hover{color:#4338ca;}
.btn-outline-soft{display:inline-flex;align-items:center;justify-content:center;padding:13px 16px;border-radius:14px;border:1.5px solid #cbd5e1;background:#fff;color:#334155;font-weight:800;text-decoration:none;transition:all .18s ease;}
.btn-outline-soft:hover{border-color:#6366f1;color:#4338ca;background:#f8fafc;}
.report-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.report-date-filter{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin:0 0 18px;}
.report-date-filter .field-inline{display:flex;flex-direction:column;gap:6px;min-width:150px;}
.report-date-filter label{font-size:12px;font-weight:700;color:var(--text-light);}
.report-date-filter .btn{white-space:nowrap;}
.report-preset-row{display:flex;gap:8px;flex-wrap:wrap;}
.page-header-title.report-title{word-break:keep-all;overflow-wrap:normal;}
.invite-code-box{background:linear-gradient(135deg,rgba(99,102,241,.14),rgba(56,189,248,.10));border:1px solid rgba(99,102,241,.35);box-shadow:0 10px 28px rgba(15,23,42,.08);}
.invite-code-label{color:var(--text-light)!important;}
.invite-code-value{display:block;padding:10px 12px;border-radius:14px;background:rgba(255,255,255,.82);color:#1e293b!important;text-shadow:none!important;box-shadow:inset 0 0 0 1px rgba(99,102,241,.14);}
body.theme-bright-ocean.plan-pro .invite-code-value,body.theme-ocean-blue.plan-pro .invite-code-value,body.theme-forest-green.plan-pro .invite-code-value,body.theme-dark-gold.plan-pro .invite-code-value,body.theme-slate-light.plan-pro .invite-code-value{background:rgba(255,255,255,.92)!important;color:#0f172a!important;}
.meta-label,.helper-text-strong,.page-header-sub,.card small,.text-muted{color:var(--text-light)!important;}
@media (max-width:640px){.auth-actions-primary,.auth-actions-secondary,.auth-links-utility,.report-toolbar,.report-date-filter{flex-direction:column;align-items:stretch;}.report-date-filter .field-inline{min-width:0;}.topbar .topbar-title{white-space:nowrap;}}


/* ── SHARED STABILIZATION UTILITIES ── */
.ui-muted, .page-meta, .helper-copy {
    color: var(--text-mid);
    line-height: 1.7;
}
.ui-muted-sm {
    color: var(--text-light);
    font-size: 12px;
    line-height: 1.6;
}
.surface-muted {
    background: rgba(148,163,184,0.08);
    border: 1px solid rgba(148,163,184,0.18);
    border-radius: 14px;
    padding: 14px 16px;
}
.field-readonly {
    background: #f8fafc !important;
}
.stack-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.legal-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin-top: 18px;
}
.legal-link-row a {
    font-weight: 600;
}
.theme-note {
    font-size: 12.5px;
    color: var(--text-mid);
    line-height: 1.7;
}
.theme-safe-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid rgba(99,102,241,0.16);
    background: rgba(99,102,241,0.08);
    color: var(--text-dark);
}
body.plan-pro .theme-safe-chip {
    border-color: rgba(212,175,55,0.22);
    background: rgba(212,175,55,0.10);
    color: #f0e6c8;
}
@media (max-width: 640px) {
    .stack-actions > * {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}


/* ===== Phase 6 metadata + header normalization ===== */
.meta-muted{font-size:12px;color:var(--text-muted,#64748b)!important;line-height:1.5;}
.meta-soft{font-size:12px;color:var(--text-soft,#94a3b8)!important;line-height:1.5;}
.meta-inline{display:inline-flex;align-items:center;gap:6px;}
.chip-soft,.badge-soft{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;background:rgba(148,163,184,.12);border:1px solid rgba(148,163,184,.22);color:var(--text-muted,#64748b)!important;font-size:11px;font-weight:700;line-height:1.2;}
.task-detail-header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:16px;}
.task-detail-title{font-family:'Nunito',sans-serif;font-size:20px;font-weight:900;line-height:1.3;margin:0;}
.task-detail-badges{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin-top:8px;}
.task-detail-actions{margin:0;display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.task-detail-badges .badge,.task-detail-badges .badge-soft,.task-detail-badges .chip-soft{max-width:100%;}
.report-header-meta,.task-meta-row,.leaderboard-meta{display:flex;gap:8px;flex-wrap:wrap;align-items:center;}
body.admin-page .sidebar, body.member-page .sidebar {overscroll-behavior: contain;}
body.sidebar-open,
html.sidebar-open { overflow: hidden; position: relative; }
body.sidebar-open .main-content { overflow: hidden; pointer-events: none; touch-action: none; }
body.sidebar-open .app-layout { overflow: hidden; }
body.sidebar-open .page-content { pointer-events: none; touch-action: none; }
body.admin-dashboard-page .notif-dropdown-header,
body.admin-dashboard-page .notif-item.unread,
body.admin-dashboard-page .notif-item.unread .notif-time,
body.admin-dashboard-page .stat-card-link .lbl,
body.admin-dashboard-page .card .card-header,
body.admin-reports-page .card-header,
body.admin-reports-page .breakdown-table th,
body.admin-reports-page .breakdown-table td,
body.admin-task-detail-page .task-info-label,
body.member-task-detail-page .info-label,
body.admin-leaderboard-page .theme-note{color:inherit;}
body.theme-bright-ocean.admin-page .page-header-title,
body.theme-bright-ocean.admin-page .topbar-title,
body.theme-bright-ocean.admin-page .task-detail-title,
body.theme-bright-ocean.member-page .task-detail-title{color:#1e40af!important;}
body.theme-bright-ocean.admin-page .card,
body.theme-bright-ocean.admin-page .mini-stat,
body.theme-bright-ocean.admin-page .review-note,
body.theme-bright-ocean.member-page .card{background:linear-gradient(180deg,rgba(239,246,255,.98),rgba(219,234,254,.96))!important;border-color:rgba(59,130,246,.18)!important;}
body.theme-slate-light.admin-page .card,
body.theme-slate-light.member-page .card{background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(248,250,252,.98))!important;border-color:rgba(148,163,184,.22)!important;}
body.theme-slate-light.admin-page .page-header-title,
body.theme-slate-light.admin-page .topbar-title,
body.theme-slate-light.admin-page .task-detail-title,
body.theme-slate-light.member-page .task-detail-title{color:#0f172a!important;}
body.theme-forest-green .meta-muted,body.theme-forest-green .meta-soft,body.theme-forest-green .task-info-label,body.theme-forest-green .info-label{color:#166534!important;opacity:.9;}
body.theme-forest-green .review-note,body.theme-forest-green .card{color:#14532d;}
body.theme-dark-gold .meta-muted,body.theme-bright-ocean .meta-muted,body.theme-slate-light .meta-muted{opacity:.95;}
body.admin-reports-page .review-note,body.admin-reports-page .breakdown-table td,body.admin-reports-page .breakdown-table th{color:var(--text-color,#334155)!important;}
body.admin-task-detail-page .task-info-value,body.member-task-detail-page .info-value{color:var(--text-color,#1e293b)!important;}
@media (max-width: 768px){
  .task-detail-header{align-items:stretch;}
  .task-detail-actions{width:100%;}
  .task-detail-actions .form-control{width:100%;min-width:0!important;}
  .task-detail-actions select,.task-detail-actions input,.task-detail-actions button{flex:1 1 100%;}
  .task-detail-badges{margin-top:10px;}
  .task-detail-title{font-size:18px;}
}


/* ── Phase-7 theme and auth polish ── */
.auth-actions-primary .btn{flex:1 1 auto;min-height:56px;}
.auth-actions-secondary .btn,.auth-actions-secondary .btn-outline-soft{flex:1 1 220px;min-height:64px;}
.auth-links-utility{justify-content:center;}
body.theme-bright-ocean.plan-pro .main-content,
body.theme-ocean-blue.plan-pro .main-content,
body.theme-bright-ocean.plan-pro .page-content,
body.theme-ocean-blue.plan-pro .page-content{background:#fff4e6 !important;}
body.theme-bright-ocean.plan-pro .sidebar,
body.theme-ocean-blue.plan-pro .sidebar{background:linear-gradient(180deg,#0c1a2e 0%,#091526 100%) !important;border-right:1px solid rgba(6,182,212,0.25) !important;}
body.theme-bright-ocean.plan-pro .sidebar-nav a,
body.theme-ocean-blue.plan-pro .sidebar-nav a{color:rgba(186,230,253,0.78) !important;}
body.theme-bright-ocean.plan-pro .sidebar-nav a.active,
body.theme-ocean-blue.plan-pro .sidebar-nav a.active{background:linear-gradient(135deg,rgba(14,165,233,.3),rgba(29,78,216,.2)) !important;color:#ecfeff !important;border-left:3px solid #67e8f9 !important;}
body.theme-bright-ocean.plan-pro .sidebar-nav a:hover,
body.theme-ocean-blue.plan-pro .sidebar-nav a:hover{color:#ecfeff !important;background:rgba(14,165,233,.15) !important;}
body.theme-bright-ocean.plan-pro .nav-label,
body.theme-ocean-blue.plan-pro .nav-label{color:rgba(103,232,249,.45) !important;}
body.theme-bright-ocean.plan-pro .sidebar-user-name,
body.theme-ocean-blue.plan-pro .sidebar-user-name,
body.theme-bright-ocean.plan-pro .sidebar-user-role,
body.theme-ocean-blue.plan-pro .sidebar-user-role{color:#dbeafe !important;}
body.theme-bright-ocean.plan-pro .card,
body.theme-ocean-blue.plan-pro .card,
body.theme-bright-ocean.plan-pro .table-wrap,
body.theme-ocean-blue.plan-pro .table-wrap{background:linear-gradient(135deg,#0f172a,#1d4ed8) !important;color:#e0f2fe !important;}
body.theme-bright-ocean.plan-pro .card-title,
body.theme-ocean-blue.plan-pro .card-title,
body.theme-bright-ocean.plan-pro .member-name,
body.theme-ocean-blue.plan-pro .member-name,
body.theme-bright-ocean.plan-pro .topbar-right strong,
body.theme-ocean-blue.plan-pro .topbar-right strong{color:#f8fafc !important;}
body.theme-bright-ocean.plan-pro .member-row,
body.theme-ocean-blue.plan-pro .member-row,
body.theme-bright-ocean.plan-pro .team-overview-row,
body.theme-ocean-blue.plan-pro .team-overview-row{background:rgba(15,23,42,.14) !important;border-bottom:1px solid rgba(191,219,254,.22) !important;}
body.theme-bright-ocean.plan-pro .member-info,
body.theme-ocean-blue.plan-pro .member-info,
body.theme-bright-ocean.plan-pro .member-info div,
body.theme-ocean-blue.plan-pro .member-info div,
body.theme-bright-ocean.plan-pro [style*="color:#94a3b8"],
body.theme-ocean-blue.plan-pro [style*="color:#94a3b8"],
body.theme-bright-ocean.plan-pro [style*="color:#64748b"],
body.theme-ocean-blue.plan-pro [style*="color:#64748b"]{color:#dbeafe !important;}
body.theme-bright-ocean.plan-pro .progress-wrap,
body.theme-ocean-blue.plan-pro .progress-wrap{background:rgba(255,255,255,.14) !important;}
body.theme-bright-ocean.plan-pro .progress-bar,
body.theme-ocean-blue.plan-pro .progress-bar{background:linear-gradient(90deg,#38bdf8,#22d3ee) !important;}
body.theme-bright-ocean.plan-pro table thead th,
body.theme-ocean-blue.plan-pro table thead th{background:rgba(191,219,254,.16) !important;color:#e0f2fe !important;border-bottom:1px solid rgba(191,219,254,.35) !important;}
body.theme-bright-ocean.plan-pro table tbody td,
body.theme-ocean-blue.plan-pro table tbody td{background:rgba(15,23,42,.12) !important;color:#f8fafc !important;border-bottom:1px solid rgba(191,219,254,.18) !important;}
body.theme-bright-ocean.plan-pro table tbody tr:hover td,
body.theme-ocean-blue.plan-pro table tbody tr:hover td{background:rgba(30,64,175,.42) !important;}
body.theme-bright-ocean.plan-pro .mini-stat,
body.theme-ocean-blue.plan-pro .mini-stat{background:linear-gradient(135deg,rgba(15,23,42,.92),rgba(30,64,175,.9)) !important;border:1px solid rgba(96,165,250,.4) !important;}
body.theme-bright-ocean.plan-pro .mini-stat .num,
body.theme-ocean-blue.plan-pro .mini-stat .num{color:#f8fafc !important;}
body.theme-bright-ocean.plan-pro .mini-stat .lbl,
body.theme-ocean-blue.plan-pro .mini-stat .lbl{color:#bfdbfe !important;}
body.theme-bright-ocean.plan-pro .rule-badge.type-task,
body.theme-ocean-blue.plan-pro .rule-badge.type-task{background:rgba(59,130,246,.18) !important;color:#dbeafe !important;}
body.theme-bright-ocean.plan-pro .rule-badge.type-admin,
body.theme-ocean-blue.plan-pro .rule-badge.type-admin{background:rgba(34,211,238,.16) !important;color:#ecfeff !important;}
body.theme-bright-ocean.plan-pro .muted-note,
body.theme-ocean-blue.plan-pro .muted-note{color:#dbeafe !important;}
@media (max-width:640px){
  .auth-actions-primary .btn{min-height:58px;}
  .auth-actions-secondary{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
  .auth-actions-secondary .btn-outline-soft{min-height:72px;white-space:normal;line-height:1.35;}
  .auth-links-utility{flex-direction:row;justify-content:space-between;gap:10px;}
  .auth-links-utility a{flex:1 1 50%;text-align:center;}
}


/* ── Batch-1 foundation stabilization overrides ───────────────── */
:root{
  --theme-surface: var(--bg-card);
  --theme-surface-soft: var(--border-light);
  --theme-text-strong: var(--text-dark);
  --theme-text-muted: #64748b;
  --theme-text-soft: #94a3b8;
  --theme-border-soft: rgba(148,163,184,.24);
  --theme-notif-bg: #ffffff;
  --theme-notif-text: #1e293b;
  --theme-notif-time: #64748b;
  --theme-sidebar-tagline: #38bdf8;
}
body.plan-pro.theme-dark-gold{
  --theme-surface: #12142a;
  --theme-surface-soft: rgba(255,255,255,.04);
  --theme-text-strong: #f8fafc;
  --theme-text-muted: rgba(240,230,200,.82);
  --theme-text-soft: rgba(212,175,55,.68);
  --theme-border-soft: rgba(212,175,55,.16);
  --theme-notif-bg: #17192f;
  --theme-notif-text: #f8fafc;
  --theme-notif-time: rgba(212,175,55,.72);
}
body.plan-pro.theme-bright-ocean,
body.plan-pro.theme-ocean-blue{
  --theme-surface: linear-gradient(180deg,rgba(239,246,255,.98),rgba(219,234,254,.96));
  --theme-surface-soft: rgba(255,255,255,.78);
  --theme-text-strong: #0f172a;
  --theme-text-muted: #1d4ed8;
  --theme-text-soft: #475569;
  --theme-border-soft: rgba(59,130,246,.20);
  --theme-notif-bg: rgba(239,246,255,.98);
  --theme-notif-text: #0f172a;
  --theme-notif-time: #1d4ed8;
  --theme-sidebar-tagline: #67e8f9;
}
body.plan-pro.theme-slate-light,
body.plan-pro.theme-classic-light{
  --theme-surface: linear-gradient(180deg,rgba(255,255,255,.98),rgba(248,250,252,.98));
  --theme-surface-soft: rgba(255,255,255,.88);
  --theme-text-strong: #0f172a;
  --theme-text-muted: #475569;
  --theme-text-soft: #64748b;
  --theme-border-soft: rgba(148,163,184,.24);
  --theme-notif-bg: #ffffff;
  --theme-notif-text: #0f172a;
  --theme-notif-time: #64748b;
  --theme-sidebar-tagline: #4f46e5;
}
body.plan-pro.theme-forest-green{
  --theme-surface: linear-gradient(180deg,#f7fee7,#ecfccb);
  --theme-surface-soft: #f0fdf4;
  --theme-text-strong: #14532d;
  --theme-text-muted: #166534;
  --theme-text-soft: #15803d;
  --theme-border-soft: rgba(34,197,94,.24);
  --theme-notif-bg: #f0fdf4;
  --theme-notif-text: #14532d;
  --theme-notif-time: #166534;
  --theme-sidebar-tagline: #86efac;
}

body.plan-pro .sidebar-logo-stack{flex-direction:column;gap:6px;padding:20px 16px 14px;}
body.plan-pro .sidebar-brand-image{width:100%;max-width:180px;height:auto;}
body .sidebar-tagline{
  font-size:9px;font-weight:800;color:var(--theme-sidebar-tagline)!important;letter-spacing:.1em;
  text-transform:uppercase;text-align:center;margin-top:1px;white-space:nowrap;opacity:.9;
}
body.plan-pro .sidebar-meta-block,
body.plan-starter .sidebar-meta-block,
body.plan-free .sidebar-meta-block{
  margin:12px 12px 6px;padding:12px;border-radius:12px;background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
}
body.theme-bright-ocean.plan-pro .sidebar-meta-block,
body.theme-ocean-blue.plan-pro .sidebar-meta-block{background:rgba(14,165,233,.10)!important;border-color:rgba(103,232,249,.16)!important;}
body.theme-forest-green.plan-pro .sidebar-meta-block{background:rgba(34,197,94,.10)!important;border-color:rgba(134,239,172,.22)!important;}
body.theme-slate-light.plan-pro .sidebar-meta-block,
body.theme-classic-light.plan-pro .sidebar-meta-block{background:rgba(79,70,229,.06)!important;border-color:rgba(99,102,241,.12)!important;}

body .sidebar-ws-name{
  font-size:12px;font-weight:800;color:#fbbf24!important;letter-spacing:.02em;
  white-space:normal;overflow:visible;word-break:break-word;line-height:1.35;
}
body .sidebar-plan-label{font-size:11.5px;font-weight:700;margin-top:3px;}
body .sidebar-plan-label.plan-pro-label{color:#d4af37!important;}
body .sidebar-plan-label.plan-starter-label{color:rgba(99,102,241,.92)!important;}
body .sidebar-plan-label.plan-free-label{color:rgba(156,163,175,.92)!important;}
body .sidebar-upgrade-link{
  display:block;background:#6366f1;color:#fff;padding:7px 10px;border-radius:8px;
  font-size:11.5px;font-weight:700;text-decoration:none;text-align:center;
}
body .sidebar-upgrade-link:hover{background:#4f46e5;color:#fff;}
body .nav-locked-link{opacity:.62;}
body .nav-lock{font-size:9px;}
body .sidebar-logout-link{
  display:flex;align-items:center;gap:8px;padding:9px 12px;border-radius:8px;
  color:rgba(239,68,68,.88);font-size:13px;font-weight:600;text-decoration:none;transition:all .2s;
}
body .sidebar-logout-link:hover{background:rgba(239,68,68,.10);color:#ef4444;}
body .sidebar-footer-links{padding:8px 12px 4px;display:flex;gap:10px;flex-wrap:wrap;}
body .sidebar-footer-link{
  font-size:10.5px;color:rgba(255,255,255,.36);text-decoration:none;transition:color .2s;
}
body .sidebar-footer-link:hover{color:rgba(255,255,255,.66);}
body .sidebar-version{font-size:10.5px;color:rgba(255,255,255,.15);margin-left:auto;}

body .text-muted,
body .meta-muted,
body .meta-soft,
body .theme-note,
body .muted-note,
body .page-header-sub,
body .stat-lbl,
body .stat-label,
body .empty-state p,
body .notif-time,
body .sidebar-helper-text{
  color:var(--theme-text-muted)!important;
  opacity:1;
}
body .meta-soft{color:var(--theme-text-soft)!important;}
body .form-control::placeholder,
body textarea::placeholder,
body input::placeholder{
  color:var(--theme-text-soft)!important;
  opacity:1;
}
body .card .text-muted,
body .card [style*="color:#64748b"],
body .card [style*="color: #64748b"],
body .card [style*="color:#94a3b8"],
body .card [style*="color: #94a3b8"]{
  color:var(--theme-text-muted)!important;
}
body .notif-dropdown,
body #notifDropdown,
body #notifPanel{
  max-width:min(92vw, 380px);
  max-height:min(70vh, 460px);
  overflow:auto;
  overscroll-behavior:contain;
  border-radius:16px;
  background:var(--theme-notif-bg)!important;
  color:var(--theme-notif-text)!important;
  border:1px solid var(--theme-border-soft)!important;
  box-shadow:0 18px 48px rgba(15,23,42,.18);
}
body .notif-item{
  display:block;
  white-space:normal;
  word-break:break-word;
  overflow-wrap:anywhere;
  background:transparent!important;
  color:var(--theme-notif-text)!important;
  border-bottom:1px solid var(--theme-border-soft)!important;
  padding:12px 16px!important;
}
body .notif-item:last-child{border-bottom:none!important;}
body .notif-item.unread{
  background:linear-gradient(180deg, rgba(99,102,241,.08), rgba(99,102,241,.03))!important;
  color:var(--theme-notif-text)!important;
}
body .notif-item .notif-message{display:block;line-height:1.45;}
body .notif-item .notif-time{display:block;font-size:11px;margin-top:4px;color:var(--theme-notif-time)!important;}

body .invite-code-box{overflow:hidden;}
body .invite-code{
  display:block;
  max-width:100%;
  overflow-wrap:anywhere;
  word-break:break-word;
  line-height:1.4;
}
body .topbar-right{gap:10px;flex-wrap:wrap;}
body .topbar-right > *{min-width:0;}
body .table-wrap,
body .card,
body .mini-stat{background:var(--theme-surface);}
body .theme-safe-surface{background:var(--theme-surface)!important;border-color:var(--theme-border-soft)!important;}
body.theme-forest-green .announcement-history,
body.theme-forest-green .announcement-history *,
body.theme-forest-green .announcement-list,
body.theme-forest-green .announcement-list *{
  color:#14532d!important;
}
@media (max-width: 768px){
  body .notif-dropdown,
  body #notifDropdown,
  body #notifPanel{right:12px!important;left:12px!important;max-width:none;}
}


/* ================================================================
   TASKIVITY — THEME READABILITY + MOBILE LAYOUT FIX PATCH
   Fixes:
   1. Stat card numbers/labels invisible on all dark themes
   2. Badge text invisible on dark theme backgrounds
   3. Priority label visibility on all themes
   4. Member dashboard stat grid: 6-col inline style overrides
      not responding to theme — numbers hardcoded #1e293b
   5. Bright Ocean: card text colour conflict (light vs dark card)
   6. Forest Green: stat numbers too dark to read
   7. Starter layout vs Pro layout mobile inconsistency
   8. Button text invisible in dark themes (black-on-dark-btn)
   9. Form labels washed out in all non-default themes
   10. Badge colours (warning/success/danger/info) invisible on
       dark card backgrounds
================================================================ */

/* ── 1. STAT CARDS — number + label readability across all themes ── */

/* Default: already correct via .stat-number / .stat-label */

/* Dark Gold — numbers and labels */
body.theme-dark-gold.plan-pro .stat-number,
body.theme-dark-gold.plan-pro .stat-num,
body.plan-pro.theme-dark-gold .stat-number,
body.plan-pro.theme-dark-gold .stat-num { color: #f8fafc !important; }
body.theme-dark-gold.plan-pro .stat-label,
body.theme-dark-gold.plan-pro .stat-lbl,
body.plan-pro.theme-dark-gold .stat-label,
body.plan-pro.theme-dark-gold .stat-lbl { color: #fbbf24 !important; }

/* Forest Green — numbers and labels */
body.theme-forest-green.plan-pro .stat-number,
body.theme-forest-green.plan-pro .stat-num,
body.plan-pro.theme-forest-green .stat-number,
body.plan-pro.theme-forest-green .stat-num { color: #ecfdf5 !important; }
body.theme-forest-green.plan-pro .stat-label,
body.theme-forest-green.plan-pro .stat-lbl,
body.plan-pro.theme-forest-green .stat-label,
body.plan-pro.theme-forest-green .stat-lbl { color: #86efac !important; }

/* Bright Ocean — stat cards have light background (#dbeafe), numbers need dark text */
body.theme-bright-ocean.plan-pro .stat-card .stat-number,
body.theme-bright-ocean.plan-pro .stat-card .stat-num,
body.theme-ocean-blue.plan-pro .stat-card .stat-number,
body.theme-ocean-blue.plan-pro .stat-card .stat-num { color: #1e3a8a !important; }
body.theme-bright-ocean.plan-pro .stat-card .stat-label,
body.theme-bright-ocean.plan-pro .stat-card .stat-lbl,
body.theme-ocean-blue.plan-pro .stat-card .stat-label,
body.theme-ocean-blue.plan-pro .stat-card .stat-lbl { color: #1d4ed8 !important; }

/* Slate Light — numbers and labels */
body.theme-slate-light.plan-pro .stat-number,
body.theme-slate-light.plan-pro .stat-num,
body.plan-pro.theme-slate-light .stat-number,
body.plan-pro.theme-slate-light .stat-num { color: #0f172a !important; }
body.theme-slate-light.plan-pro .stat-label,
body.theme-slate-light.plan-pro .stat-lbl,
body.plan-pro.theme-slate-light .stat-label,
body.plan-pro.theme-slate-light .stat-lbl { color: #475569 !important; }

/* ── 2. MEMBER DASHBOARD — inline-styled stat numbers fix ──────── */
/* Member dashboard uses inline style="color:#1e293b" for stat numbers.
   On dark themes these become invisible. Override via attribute selector. */

body.theme-dark-gold.plan-pro .member-stats-grid [style*="color:#1e293b"],
body.theme-dark-gold.plan-pro .member-stats-grid [style*="color: #1e293b"],
body.plan-pro.theme-dark-gold .member-stats-grid [style*="color:#1e293b"] { color: #f8fafc !important; }

body.theme-forest-green.plan-pro .member-stats-grid [style*="color:#1e293b"],
body.plan-pro.theme-forest-green .member-stats-grid [style*="color:#1e293b"] { color: #ecfdf5 !important; }

body.theme-bright-ocean.plan-pro .member-stats-grid [style*="color:#1e293b"],
body.theme-ocean-blue.plan-pro .member-stats-grid [style*="color:#1e293b"] { color: #1e3a8a !important; }

body.theme-slate-light.plan-pro .member-stats-grid [style*="color:#1e293b"],
body.plan-pro.theme-slate-light .member-stats-grid [style*="color:#1e293b"] { color: #0f172a !important; }

/* Member dashboard stat label (inline color:#94a3b8) */
body.theme-dark-gold.plan-pro .member-stats-grid [style*="color:#94a3b8"],
body.plan-pro.theme-dark-gold .member-stats-grid [style*="color:#94a3b8"] { color: #fbbf24 !important; }

body.theme-forest-green.plan-pro .member-stats-grid [style*="color:#94a3b8"],
body.plan-pro.theme-forest-green .member-stats-grid [style*="color:#94a3b8"] { color: #86efac !important; }

body.theme-bright-ocean.plan-pro .member-stats-grid [style*="color:#94a3b8"],
body.theme-ocean-blue.plan-pro .member-stats-grid [style*="color:#94a3b8"] { color: #1d4ed8 !important; }

body.theme-slate-light.plan-pro .member-stats-grid [style*="color:#94a3b8"],
body.plan-pro.theme-slate-light .member-stats-grid [style*="color:#94a3b8"] { color: #64748b !important; }

/* ── 3. BADGE TEXT — readable on dark card backgrounds ─────────── */
/* Standard badges use light backgrounds (#fef3c7, #dcfce7 etc)
   which are fine on light cards but invisible when badge is inside
   a dark card (plan-pro dark-gold / forest-green). Fix: use higher
   contrast text colours on dark-background themes. */

body.theme-dark-gold.plan-pro .badge-warning,
body.plan-pro.theme-dark-gold .badge-warning { background: #fef3c7 !important; color: #78350f !important; }
body.theme-dark-gold.plan-pro .badge-success,
body.plan-pro.theme-dark-gold .badge-success { background: #dcfce7 !important; color: #14532d !important; }
body.theme-dark-gold.plan-pro .badge-danger,
body.plan-pro.theme-dark-gold .badge-danger  { background: #fee2e2 !important; color: #991b1b !important; }
body.theme-dark-gold.plan-pro .badge-info,
body.plan-pro.theme-dark-gold .badge-info    { background: #dbeafe !important; color: #1e40af !important; }
body.theme-dark-gold.plan-pro .badge-secondary,
body.plan-pro.theme-dark-gold .badge-secondary { background: rgba(255,255,255,0.1) !important; color: #f0e6c8 !important; }

body.theme-forest-green.plan-pro .badge-warning,
body.plan-pro.theme-forest-green .badge-warning { background: #fef3c7 !important; color: #78350f !important; }
body.theme-forest-green.plan-pro .badge-success,
body.plan-pro.theme-forest-green .badge-success { background: #dcfce7 !important; color: #14532d !important; }
body.theme-forest-green.plan-pro .badge-danger,
body.plan-pro.theme-forest-green .badge-danger  { background: #fee2e2 !important; color: #991b1b !important; }
body.theme-forest-green.plan-pro .badge-info,
body.plan-pro.theme-forest-green .badge-info    { background: #dbeafe !important; color: #1e40af !important; }
body.theme-forest-green.plan-pro .badge-secondary,
body.plan-pro.theme-forest-green .badge-secondary { background: rgba(255,255,255,0.12) !important; color: #ecfdf5 !important; }

/* Bright Ocean / Slate Light have light card backgrounds — badges naturally visible */
/* But reinforce for edge cases */
body.theme-bright-ocean.plan-pro .badge-secondary,
body.theme-slate-light.plan-pro .badge-secondary { background: #f1f5f9 !important; color: #475569 !important; }

/* plan-pro default (Dark Navy) badges */
body.plan-pro .badge-warning  { background: #fef3c7 !important; color: #78350f !important; }
body.plan-pro .badge-success  { background: #dcfce7 !important; color: #14532d !important; }
body.plan-pro .badge-danger   { background: #fee2e2 !important; color: #991b1b !important; }
body.plan-pro .badge-info     { background: #dbeafe !important; color: #1e40af !important; }
body.plan-pro .badge-primary  { background: #eef2ff !important; color: #3730a3 !important; }
body.plan-pro .badge-secondary{ background: rgba(255,255,255,0.09) !important; color: #e2e8f0 !important; }

/* ── 4. PRIORITY LABELS — visible on all theme backgrounds ─────── */
/* priority-high/medium/low use var(--danger/warning/success) which
   are bright enough on light bg but may clash on coloured themes */

body.theme-dark-gold.plan-pro .priority-high,
body.plan-pro.theme-dark-gold .priority-high { color: #fca5a5 !important; }
body.theme-dark-gold.plan-pro .priority-medium,
body.plan-pro.theme-dark-gold .priority-medium { color: #fde68a !important; }
body.theme-dark-gold.plan-pro .priority-low,
body.plan-pro.theme-dark-gold .priority-low { color: #86efac !important; }

body.theme-forest-green.plan-pro .priority-high,
body.plan-pro.theme-forest-green .priority-high { color: #fca5a5 !important; }
body.theme-forest-green.plan-pro .priority-medium,
body.plan-pro.theme-forest-green .priority-medium { color: #fde68a !important; }
body.theme-forest-green.plan-pro .priority-low,
body.plan-pro.theme-forest-green .priority-low { color: #6ee7b7 !important; }

body.theme-bright-ocean.plan-pro .priority-high,
body.theme-ocean-blue.plan-pro .priority-high { color: #ef4444 !important; }
body.theme-bright-ocean.plan-pro .priority-medium,
body.theme-ocean-blue.plan-pro .priority-medium { color: #d97706 !important; }
body.theme-bright-ocean.plan-pro .priority-low,
body.theme-ocean-blue.plan-pro .priority-low { color: #16a34a !important; }

/* ── 5. BUTTON TEXT — black text on gold/green buttons ─────────── */
/* btn-primary on dark-gold/pro base has color:#000 which is correct.
   Ensure btn-success / btn-danger / btn-warning always readable */

body.plan-pro .btn-success { color: #fff !important; }
body.plan-pro .btn-danger  { color: #fff !important; }
body.plan-pro .btn-warning { color: #fff !important; }

/* Bright Ocean btn-secondary has light text on light card — fix */
body.theme-bright-ocean.plan-pro .btn-secondary,
body.theme-ocean-blue.plan-pro .btn-secondary { color: #e0f2fe !important; }

/* ── 6. MOBILE LAYOUT — member dashboard 6-column inline grid ───── */
/* Member dashboard uses inline style="display:grid;grid-template-columns:repeat(6,1fr)"
   which overrides the .member-stats-grid responsive CSS on mobile.
   The inline style has higher specificity than media queries.
   Fix: force 2-col on small screens via inline override pattern. */

@media (max-width: 768px) {
    .member-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    /* Override the inline repeat(6,1fr) by targeting the style attribute */
    .member-stats-grid[style*="repeat(6"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 400px) {
    .member-stats-grid,
    .member-stats-grid[style*="repeat(6"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
    }
}

/* ── 7. STARTER PLAN — mobile layout parity with Pro ───────────── */
/* Starter uses default body bg + sidebar, but the stats-grid
   on mobile sometimes collapses to 1-col due to minmax(180px,1fr).
   On narrow screens 180px can be too wide. Fix: lower the min. */

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    .stat-card {
        padding: 14px 10px !important;
    }
    .stat-number { font-size: 26px !important; }
    .stat-icon { font-size: 20px !important; margin-bottom: 6px !important; }
    .stat-label { font-size: 10px !important; }
}

/* ── 8. FORM LABELS — theme contrast fixes ──────────────────────── */
body.theme-bright-ocean.plan-pro label,
body.theme-ocean-blue.plan-pro label { color: #1e3a8a !important; }
body.theme-slate-light.plan-pro label { color: #334155 !important; }
/* forest-green and dark-gold already have label overrides above */

/* ── 9. TABLE CELL TEXT — Starter plan dark default body ────────── */
/* Starter plan uses light bg, but task link text inside tables can
   inherit #38bdf8 (cyan) from plan-pro overrides if class leaks */
body.plan-starter tbody td { color: #374151 !important; }
body.plan-starter .task-link { color: #4f46e5 !important; }
body.plan-starter .task-link:hover { color: #4338ca !important; }

/* ── 10. STAT CARD — plan-pro base (dark navy) inline colour fix ── */
/* Admin and member dashboard stat cards output inline style colors.
   Override for the base plan-pro dark navy default theme. */
body.plan-pro:not(.theme-bright-ocean):not(.theme-ocean-blue):not(.theme-slate-light):not(.theme-classic-light) .member-stats-grid [style*="color:#1e293b"],
body.plan-pro:not(.theme-bright-ocean):not(.theme-ocean-blue):not(.theme-slate-light):not(.theme-classic-light) .member-stats-grid [style*="color: #1e293b"] { color: #f0e6c8 !important; }
body.plan-pro:not(.theme-bright-ocean):not(.theme-ocean-blue):not(.theme-slate-light):not(.theme-classic-light) .member-stats-grid [style*="color:#94a3b8"],
body.plan-pro:not(.theme-bright-ocean):not(.theme-ocean-blue):not(.theme-slate-light):not(.theme-classic-light) .member-stats-grid [style*="color:#6366f1"] { color: rgba(212,175,55,0.7) !important; }

/* ── 11. OVERDUE BLINK + DEADLINE WARN — dark theme visibility ─── */
body.plan-pro .overdue-blink { background: rgba(239,68,68,0.18) !important; color: #fca5a5 !important; border-color: #fca5a5 !important; }
body.plan-pro .deadline-warn { background: rgba(245,158,11,0.15) !important; color: #fde68a !important; border-color: #fde68a !important; }

/* Light themes — keep original colours */
body.theme-bright-ocean.plan-pro .overdue-blink,
body.theme-slate-light.plan-pro .overdue-blink { background: #fef2f2 !important; color: #991b1b !important; border-color: #ef4444 !important; }
body.theme-bright-ocean.plan-pro .deadline-warn,
body.theme-slate-light.plan-pro .deadline-warn { background: #fffbeb !important; color: #92400e !important; border-color: #f59e0b !important; }

/* ── 12. MEMBER DASHBOARD — task card text on dark themes ──────── */
body.theme-dark-gold.plan-pro .task-card-member,
body.plan-pro.theme-dark-gold .task-card-member { background: #1b2030 !important; border-color: rgba(245,158,11,0.18) !important; color: #f8fafc !important; }
body.theme-dark-gold.plan-pro .task-card-member .task-title,
body.plan-pro.theme-dark-gold .task-card-member .task-title { color: #f8fafc !important; }
body.theme-dark-gold.plan-pro .task-card-member .task-card-meta,
body.plan-pro.theme-dark-gold .task-card-member .task-card-meta { color: rgba(212,175,55,0.6) !important; }

body.theme-forest-green.plan-pro .task-card-member,
body.plan-pro.theme-forest-green .task-card-member { background: #0f2d1f !important; border-color: rgba(16,185,129,0.2) !important; color: #ecfdf5 !important; }
body.theme-forest-green.plan-pro .task-card-member .task-title,
body.plan-pro.theme-forest-green .task-card-member .task-title { color: #ecfdf5 !important; }
body.theme-forest-green.plan-pro .task-card-member .task-card-meta,
body.plan-pro.theme-forest-green .task-card-member .task-card-meta { color: #86efac !important; }


/* ================================================================
   TASKIVITY — LANDSCAPE ORIENTATION SUPPORT (mobile rotation)
   Applies when phone is rotated to landscape on narrow screens
================================================================ */

@media (max-height: 500px) and (orientation: landscape) {

    /* Sidebar: narrower, scrollable, no fixed height issues */
    .sidebar {
        width: 200px !important;
        overflow-y: auto;
    }
    .sidebar.open {
        width: 200px !important;
    }
    .sidebar-logo {
        padding: 10px 14px 8px !important;
    }
    .sidebar-logo img {
        max-width: 120px !important;
    }
    .sidebar-nav a {
        padding: 7px 16px !important;
        font-size: 12.5px !important;
    }
    .nav-label {
        font-size: 9px !important;
        padding: 8px 16px 2px !important;
    }
    .sidebar-user {
        padding: 8px 12px !important;
    }
    .sidebar-avatar {
        width: 30px !important;
        height: 30px !important;
        font-size: 11px !important;
    }

    /* Main content: use full width, compensate for sidebar */
    .main-content {
        margin-left: var(--sidebar-width);
    }

    /* Topbar: compact height */
    .topbar {
        padding: 8px 14px !important;
        min-height: 44px !important;
    }
    .topbar-title {
        font-size: 14px !important;
    }
    .hamburger {
        font-size: 18px !important;
        padding: 4px !important;
    }

    /* Page content: tighter padding */
    .page-content {
        padding: 12px 14px !important;
    }
    .page-header {
        margin-bottom: 14px !important;
    }
    .page-header-title {
        font-size: 17px !important;
    }

    /* Stats grid: 3 columns in landscape instead of 2 */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }
    .stat-card {
        padding: 10px 12px !important;
    }
    .stat-number {
        font-size: 22px !important;
    }
    .stat-icon {
        font-size: 18px !important;
        margin-bottom: 4px !important;
    }
    .stat-label {
        font-size: 9.5px !important;
    }

    /* Member stats grid landscape */
    .member-stats-grid,
    .member-stats-grid[style*="repeat(6"] {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
    }

    /* Cards: reduce padding */
    .card {
        border-radius: 14px !important;
    }
    .card-body {
        padding: 14px !important;
    }
    .card-header {
        padding: 10px 14px !important;
    }

    /* Task detail: single column in landscape too */
    .task-detail-outer-grid,
    .member-task-detail-outer-grid {
        grid-template-columns: 1fr !important;
    }

    /* Leaderboard: compact */
    .lb-card {
        padding: 10px 12px !important;
    }

    /* Modals: shorter height */
    .modal {
        max-height: 90vh !important;
        overflow-y: auto !important;
    }
    .modal-body {
        padding: 14px !important;
    }

    /* Remark input: landscape friendly */
    .remark-input-row {
        flex-direction: row !important;
    }
    .remark-thread {
        max-height: 160px !important;
    }

    /* Quick task FAB: move up slightly */
    .quick-task-fab {
        bottom: 14px !important;
        right: 14px !important;
        width: 46px !important;
        height: 46px !important;
        font-size: 20px !important;
    }
}


/* ── Canonical theme cleanup (safe patch) ─────────────────────── */
body[data-theme="dark-gold"],
body[data-theme="bright-ocean"],
body[data-theme="forest-green"],
body[data-theme="slate-light"] {
    color-scheme: light;
}
body.theme-bright-ocean .invite-code,
body.theme-forest-green .invite-code,
body.theme-slate-light .invite-code,
body.theme-dark-gold .invite-code {
    color: var(--theme-accent, #4338ca) !important;
}
body.theme-bright-ocean .page-header-sub,
body.theme-forest-green .page-header-sub,
body.theme-slate-light .page-header-sub,
body.theme-dark-gold .page-header-sub,
body.theme-bright-ocean .page-meta,
body.theme-forest-green .page-meta,
body.theme-slate-light .page-meta,
body.theme-dark-gold .page-meta {
    color: var(--theme-text-muted) !important;
}
body.theme-bright-ocean .card,
body.theme-forest-green .card,
body.theme-slate-light .card,
body.theme-dark-gold .card,
body.theme-bright-ocean .workflow-card,
body.theme-forest-green .workflow-card,
body.theme-slate-light .workflow-card,
body.theme-dark-gold .workflow-card {
    border-color: var(--theme-border-soft) !important;
}
/* ===== Task Detail Action Buttons – Mobile Alignment Fix ===== */

/* Container holding Transfer + Delete buttons */
.task-action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

/* Individual action buttons */
.task-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 130px;
    height: 48px;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 12px;
}

/* Icon spacing inside buttons */
.task-action-btn i {
    margin-right: 6px;
}

/* Mobile layout optimization */
@media (max-width: 480px) {

    .task-action-buttons {
        justify-content: space-between;
        gap: 10px;
    }

    .task-action-btn {
        flex: 1;
        min-width: auto;
        font-size: 14px;
        height: 46px;
    }
}

/* Task detail action buttons: stack vertically on mobile */
@media (max-width: 768px) {
    .task-action-buttons,
    .task-actions,
    .page-actions,
    .header-actions {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .task-action-buttons .task-action-btn,
    .task-actions .task-action-btn,
    .page-actions .task-action-btn,
    .header-actions .task-action-btn,
    .task-action-buttons .btn,
    .task-actions .btn,
    .page-actions .btn,
    .header-actions .btn {
        width: 100% !important;
        min-width: 0 !important;
        white-space: nowrap !important;
        justify-content: center !important;
        display: inline-flex !important;
    }
}
