﻿:root {
    --bg: #0f1012;
    --panel: #16171a;
    --panel2: #1a1b1f;
    --text: #ffffff;
    --muted: rgba(255,255,255,0.65);
    --accent: #fcb040;
    --border: rgba(255,255,255,0.10);
    --shadow: 0 18px 55px rgba(0,0,0,0.55);
    --sidebar-w: 260px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font: 14px/1.45 system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

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

    a:hover {
        text-decoration: none;
    }

/* ===============================
   ✅ APP SHELL LAYOUT
   =============================== */

.app-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ===============================
   ✅ SIDEBAR
   =============================== */

.sidebar {
    width: var(--sidebar-w);
    background: linear-gradient(180deg, #0c0d10, #0b0c0e);
    border-right: 1px solid rgba(255,255,255,0.08);
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 14px;
    color: var(--text);
}

    .sidebar-brand:hover {
        background: rgba(255,255,255,0.04);
    }

.sidebar-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 10px;
}

.sidebar-brand-title {
    font-weight: 800;
    letter-spacing: 0.2px;
    font-size: 25px;
    line-height: 1.1;
}

.sidebar-brand-subtitle {
    font-size: 12px;
    color: rgba(255,255,255,0.65);
    margin-top: 2px;
}

.sidebar-nav {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.shared-calendars-nav {
    margin-top: 14px;
}

.shared-calendars-nav__title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .12em;
    opacity: .65;
    padding: 8px 12px 6px;
}

.shared-calendars-nav__link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 12px;
    text-decoration: none;
}

    .shared-calendars-nav__link:hover {
        background: rgba(255,255,255,0.06);
    }

.shared-calendars-nav__ico {
    width: 18px;
    text-align: center;
}

.shared-calendars-nav__txt {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Divider inside nav */
.side-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 10px 6px;
}

.side-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: rgba(255,255,255,0.85);
    border: 1px solid transparent;
    transition: background .12s ease, color .12s ease, border-color .12s ease;
}

    .side-link:hover {
        background: rgba(255,255,255,0.04);
        border-color: rgba(255,255,255,0.06);
        color: #ffffff;
    }

    .side-link.active {
        background: var(--accent);
        color: #141414;
        font-weight: 700;
    }

.side-ico {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .side-ico svg {
        width: 18px;
        height: 18px;
        stroke: currentColor;
        fill: none;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.sidebar-footer {
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.side-link.logout {
    margin-top: 10px;
}

/* ===============================
   ✅ CONTENT AREA
   =============================== */

.content-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.content-inner {
    padding: 22px 24px;
}

/* Flash messages (top center like pills) */
.flash-stack {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.flash-pill {
    background: #121316;
    color: #fff;
    border: 1px solid rgba(252,176,64,0.50);
    border-radius: 999px;
    padding: 4px 14px 5px;
    min-height: 30px;
    display: flex;
    align-items: center;
    max-width: 420px;
    width: fit-content;
}

/* ===============================
   ✅ UI (improved)
   =============================== */

h1 {
    margin: 14px 0 16px;
    font-size: 30px;
}

.grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
    background: linear-gradient(180deg, var(--panel2), var(--panel));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
}

.kpi-title {
    color: var(--muted);
    margin: 0 0 6px;
    font-size: 12px;
    letter-spacing: .3px;
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.kpi-sub {
    color: var(--muted);
    font-size: 12px;
    margin-top: 6px;
}

.row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.input {
    background: #0f1115;
    color: var(--text);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 10px;
    padding: 8px 10px;
}

.btn {
    background: var(--accent);
    color: #1b1b1b;
    border: none;
    border-radius: 14px;
    padding: 8px 12px;
    font-weight: 700;
    cursor: pointer;
}

    .btn:hover {
        filter: brightness(1.05);
    }

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

    .table th, .table td {
        border: 1px solid rgba(255,255,255,0.08);
        padding: 8px;
        text-align: left;
        font-size: 13px;
    }

    .table th {
        background: #1b1d22;
        color: #cbd5e1;
    }

.table-dark th,
.table-dark td {
    vertical-align: middle;
}


/* ===============================
   ✅ Dashboard Title + Welcome
   =============================== */

.page-hero {
    margin: -22px -24px 18px; /* stretches full width inside content */
    padding: 18px 24px 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0));
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.page-title {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.page-subtitle {
    margin: 6px 0 0;
    color: rgba(255,255,255,0.65);
    font-size: 13px;
}

/* ===============================
   ✅ Dashboard Layout (Beast Mode)
   =============================== */

.dash-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 16px;
}

@media (max-width: 1200px) {
    .dash-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 680px) {
    .dash-kpi-grid {
        grid-template-columns: 1fr;
    }
}

.kpi-card {
    background: linear-gradient(180deg, #1a1b1f, #16171a);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}

.kpi-label {
    color: rgba(255,255,255,0.60);
    font-size: 12px;
    margin-bottom: 6px;
}

.kpi-value {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.05;
}

.kpi-trend {
    font-size: 12px;
    margin-top: 8px;
    font-weight: 700;
}

    .kpi-trend.up {
        color: #10b981;
    }

    .kpi-trend.down {
        color: #ef4444;
    }

.kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .kpi-icon svg {
        width: 22px;
        height: 22px;
        stroke: #fff;
        fill: none;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .kpi-icon.amber {
        background: rgba(252,176,64,0.18);
    }

    .kpi-icon.green {
        background: rgba(16,185,129,0.18);
    }

    .kpi-icon.blue {
        background: rgba(59,130,246,0.18);
    }

    .kpi-icon.purple {
        background: rgba(168,85,247,0.18);
    }

.dash-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

@media (max-width: 980px) {
    .dash-grid-2 {
        grid-template-columns: 1fr;
    }
}

.dash-grid-bottom {
    display: grid;
    grid-template-columns: 0.55fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

@media (max-width: 980px) {
    .dash-grid-bottom {
        grid-template-columns: 1fr;
    }
}

.dash-panel {
    background: linear-gradient(180deg, #1a1b1f, #16171a);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}

.panel-title {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 10px;
}

.chart-wrap {
    height: 260px;
    width: 100%;
}

    .chart-wrap.small {
        height: 240px;
    }

/* ✅ Recent Clients List */
.recent-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recent-item {
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recent-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 12px;
    background: rgba(252,176,64,0.18);
    color: #fcb040;
}

.recent-name {
    font-weight: 800;
    font-size: 13px;
}

.recent-sub {
    color: rgba(255,255,255,0.55);
    font-size: 12px;
    margin-top: 2px;
}

.recent-right {
    text-align: right;
}

.recent-amount {
    font-weight: 800;
    font-size: 13px;
}

.recent-time {
    color: rgba(255,255,255,0.50);
    font-size: 12px;
    margin-top: 2px;
}


/* ===============================
   ✅ Recent Clients Scrolling
   =============================== */

.recent-list {
    max-height: 290px; /* ✅ gives the panel a scroll area */
    overflow-y: auto;
    padding-right: 6px; /* space for scrollbar */
}

    /* Chrome / Edge scrollbar styling */
    .recent-list::-webkit-scrollbar {
        width: 8px;
    }

    .recent-list::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.12);
        border-radius: 999px;
    }

        .recent-list::-webkit-scrollbar-thumb:hover {
            background: rgba(255,255,255,0.18);
        }

    .recent-list::-webkit-scrollbar-track {
        background: rgba(0,0,0,0.25);
        border-radius: 999px;
    }

/* Firefox scrollbar styling */
.recent-list {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) rgba(0,0,0,0.25);
}


/* ===============================
   ✅ Top Right User Menu (Profile Dropdown)
   =============================== */

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 18px;
    background: rgba(15,16,18,0.75);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
}

.user-menu {
    position: relative;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: #fff;
    padding: 6px 12px 6px 6px;
    border-radius: 999px;
    transition: background .12s ease, border-color .12s ease;
}

    .user-chip:hover {
        background: rgba(255,255,255,0.07);
        border-color: rgba(255,255,255,0.18);
    }

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(252,176,64,0.18);
    color: #fcb040;
    font-weight: 800;
    font-size: 12px;
}

.user-name {
    font-weight: 700;
    font-size: 13px;
    color: rgba(255,255,255,0.90);
}

.user-chev {
    width: 16px;
    height: 16px;
    stroke: rgba(255,255,255,0.75);
    fill: none;
    stroke-width: 2;
}

.user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 200px;
    background: #121316;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 14px;
    box-shadow: 0 18px 60px rgba(0,0,0,0.65);
    padding: 6px;
    display: none;
}

    .user-dropdown.show {
        display: block;
    }

    .user-dropdown a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 10px;
        border-radius: 10px;
        color: rgba(255,255,255,0.85);
        font-size: 13px;
        font-weight: 600;
    }

        .user-dropdown a:hover {
            background: rgba(255,255,255,0.06);
            color: #fff;
        }

    .user-dropdown .drop-divider {
        height: 1px;
        background: rgba(255,255,255,0.08);
        margin: 6px 6px;
    }


/* ===============================
   ✅ Activity Page (New UI)
   =============================== */

.activity-page {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.activity-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.activity-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}

    .btn-ico svg {
        width: 18px;
        height: 18px;
        fill: currentColor;
        display: block;
    }

.btn-ghost {
    background: rgba(255,255,255,0.06);
    color: var(--text);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    padding: 8px 12px;
    font-weight: 700;
    cursor: pointer;
}

    .btn-ghost:hover {
        background: rgba(255,255,255,0.09);
    }

.activity-toolbar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.activity-search {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 14px;
    padding: 10px 12px;
}

.search-ico svg {
    width: 18px;
    height: 18px;
    fill: rgba(255,255,255,0.55);
    display: block;
}

.activity-search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 14px;
}

    .activity-search input::placeholder {
        color: rgba(255,255,255,0.45);
    }

.activity-tabs {
    display: flex;
    gap: 6px;
    padding: 4px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 14px;
    width: fit-content;
}

    .activity-tabs .tab {
        background: transparent;
        border: none;
        color: rgba(255,255,255,0.75);
        padding: 8px 12px;
        border-radius: 12px;
        cursor: pointer;
        font-weight: 800;
        font-size: 12px;
        transition: background .15s ease, color .15s ease;
    }

        .activity-tabs .tab:hover {
            background: rgba(255,255,255,0.06);
        }

        .activity-tabs .tab.active {
            background: rgba(255,255,255,0.10);
            color: var(--text);
        }

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 6px;
}

.activity-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
}

.activity-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.85);
    flex: 0 0 auto;
}

    .activity-icon svg {
        width: 20px;
        height: 20px;
        fill: currentColor;
        display: block;
    }

    /* Kind accents */
    .activity-icon.kind-call {
        color: #34d399;
        background: rgba(52,211,153,0.10);
        border-color: rgba(52,211,153,0.25);
    }

    .activity-icon.kind-email {
        color: #60a5fa;
        background: rgba(96,165,250,0.10);
        border-color: rgba(96,165,250,0.25);
    }

    .activity-icon.kind-meeting {
        color: #a78bfa;
        background: rgba(167,139,250,0.10);
        border-color: rgba(167,139,250,0.25);
    }

    .activity-icon.kind-deal {
        color: #f59e0b;
        background: rgba(245,158,11,0.10);
        border-color: rgba(245,158,11,0.25);
    }

    .activity-icon.kind-contact {
        color: #fcb040;
        background: rgba(252,176,64,0.10);
        border-color: rgba(252,176,64,0.25);
    }

.activity-main {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-weight: 850;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-sub {
    margin-top: 2px;
    color: rgba(255,255,255,0.62);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-meta {
    margin-top: 6px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(255,255,255,0.55);
    font-size: 12px;
}

.meta-dot {
    opacity: 0.6;
}

.activity-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.badge {
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 850;
    font-size: 11px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.80);
    text-transform: lowercase;
}

.badge-completed {
    background: rgba(34,197,94,0.10);
    border-color: rgba(34,197,94,0.25);
    color: rgba(34,197,94,0.95);
}

.badge-upcoming {
    background: rgba(251,191,36,0.12);
    border-color: rgba(251,191,36,0.25);
    color: rgba(251,191,36,0.95);
}

.badge-sent {
    background: rgba(59,130,246,0.12);
    border-color: rgba(59,130,246,0.25);
    color: rgba(59,130,246,0.95);
}

.empty-muted {
    color: rgba(255,255,255,0.55);
    margin: 0;
}

@media (max-width: 720px) {
    .activity-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .activity-toolbar {
        position: relative;
        flex-direction: column;
        align-items: stretch;
    }

    .activity-tabs {
        width: 100%;
        flex-wrap: wrap;
    }

    .activity-row {
        padding: 14px 14px;
    }
}

/* ===============================
   ✅ Modal (Schedule Activity)
   =============================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.62);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 9999;
}

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

.modal-card {
    width: min(720px, calc(100vw - 32px));
    background: var(--panel);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 18px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.modal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 900;
}

.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    color: rgba(255,255,255,0.80);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

    .icon-btn:hover {
        background: rgba(255,255,255,0.07);
    }

    .icon-btn svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2.4;
        stroke-linecap: round;
    }

.modal-body {
    padding: 16px;
}

.modal-foot {
    padding: 14px 16px;
    background: rgba(255,255,255,0.02);
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-field.full {
    grid-column: 1 / -1;
}

.form-label {
    display: block;
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 900;
    color: rgba(255,255,255,0.72);
}

.form-hint {
    margin-top: 6px;
    font-size: 12px;
    color: rgba(255,255,255,0.55);
}

.modal-card .input {
    width: 100%;
}

textarea.input {
    resize: vertical;
    min-height: 86px;
}

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


/* ===============================
   ✅ Filter panel (Activity)
   =============================== */

.filter-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(360px, calc(100vw - 24px));
    background: var(--panel);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 18px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: none;
    z-index: 1200;
}

    .filter-panel.show {
        display: block;
    }

.filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.filter-title {
    font-weight: 900;
    font-size: 14px;
}

.filter-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-section {
    padding: 10px 10px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
    border-radius: 14px;
}

.filter-label {
    font-size: 12px;
    font-weight: 900;
    color: rgba(255,255,255,0.75);
    margin-bottom: 8px;
}

.check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(255,255,255,0.80);
    margin: 6px 0;
}

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

.check-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 10px;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.filter-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
}

@media (max-width: 720px) {
    .filter-panel {
        right: 0;
        left: 0;
        margin: 0 auto;
    }

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

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


/* =====================================================
   Activity - View Toggle + Calendar
   ===================================================== */
.tabs-spacer {
    flex: 1;
}

.view-toggle {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

    .view-toggle .view-btn {
        background: transparent;
        border: 1px solid rgba(255,255,255,0.10);
        color: rgba(255,255,255,0.75);
        padding: 8px 10px;
        border-radius: 12px;
        cursor: pointer;
        font-weight: 900;
        font-size: 12px;
        transition: background .15s ease, color .15s ease, border-color .15s ease;
    }

        .view-toggle .view-btn:hover {
            background: rgba(255,255,255,0.06);
            color: rgba(255,255,255,0.90);
        }

        .view-toggle .view-btn.active {
            background: rgba(252,176,64,0.14);
            border-color: rgba(252,176,64,0.28);
            color: #ffd38a;
        }

.btn-small {
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 12px;
}

.activity-calendar {
    margin-top: 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 14px;
}

.calendar-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.calendar-title {
    font-weight: 950;
    font-size: 14px;
    letter-spacing: .2px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.cal-dow {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    text-transform: uppercase;
    letter-spacing: .14em;
    padding: 2px 6px;
}

.cal-day {
    min-height: 98px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 16px;
    padding: 8px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform .08s ease, background .12s ease;
}

    .cal-day:hover {
        transform: translateY(-1px);
        background: rgba(255,255,255,0.045);
    }

    .cal-day.out {
        opacity: 0.38;
    }

    .cal-day.today {
        outline: 2px solid rgba(252,176,64,0.55);
        outline-offset: 2px;
    }

    .cal-day .num {
        font-weight: 950;
        font-size: 12px;
        color: rgba(255,255,255,0.90);
    }

.cal-events {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cal-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 6px 8px;
    font-size: 11px;
    color: rgba(255,255,255,0.88);
    line-height: 1.1;
}

    .cal-chip .time {
        color: rgba(255,255,255,0.60);
        font-weight: 900;
        flex: none;
    }

    .cal-chip .t {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .cal-chip.upcoming {
        border-color: rgba(252,176,64,0.28);
    }

    .cal-chip.completed {
        opacity: 0.78;
    }

    .cal-chip.sent {
        border-color: rgba(140,205,255,0.25);
    }

.cal-more {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    padding-left: 2px;
}

.calendar-hint {
    margin-top: 10px;
    color: rgba(255,255,255,0.55);
    font-size: 12px;
}

.activity-row.flash-highlight {
    outline: 2px solid rgba(252,176,64,0.55);
    box-shadow: 0 0 0 6px rgba(252,176,64,0.12);
}


/* ===============================
   ✅ Contacts List (Directors UI)
   =============================== */

.contacts-hero-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.contacts-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--accent);
    color: #111;
}

.btn-ghost {
    background: rgba(0,0,0,0.0);
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.14);
}

    .btn-ghost:hover {
        background: rgba(255,255,255,0.04);
    }

.ico {
    display: inline-flex;
    width: 16px;
    height: 16px;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
}

    .ico svg {
        width: 16px;
        height: 16px;
        stroke: currentColor;
        fill: none;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.contacts-search {
    margin-top: 14px;
}

.search-wrap {
    position: relative;
    width: 100%;
}

.search-ico {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.75;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .search-ico svg {
        width: 16px;
        height: 16px;
        stroke: rgba(255,255,255,0.7);
        fill: none;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.search-input {
    width: 100%;
    padding-left: 38px;
    border-radius: 12px;
}

.filter-dd {
    position: relative;
}

    .filter-dd > summary {
        list-style: none;
        user-select: none;
    }

        .filter-dd > summary::-webkit-details-marker {
            display: none;
        }

.filter-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 420px;
    background: linear-gradient(180deg, #1a1b1f, #16171a);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    box-shadow: 0 20px 55px rgba(0,0,0,0.60);
    padding: 14px;
    z-index: 40;
}

@media (max-width: 720px) {
    .filter-panel {
        width: 92vw;
        right: -10px;
    }

    .contacts-hero-row {
        flex-direction: column;
        align-items: stretch;
    }

    .contacts-actions {
        justify-content: flex-start;
    }
}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.filter-field span {
    display: block;
    font-size: 12px;
    color: rgba(255,255,255,0.60);
    margin-bottom: 6px;
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.data-panel {
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0));
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.35);
    overflow: hidden;
}

.table-wrap {
    width: 100%;
    overflow: auto;
}

.table-modern {
    width: 100%;
    border-collapse: collapse;
    min-width: 1050px;
}

    .table-modern thead th {
        background: rgba(0,0,0,0.35);
        color: rgba(255,255,255,0.65);
        font-size: 12px;
        font-weight: 800;
        letter-spacing: .25px;
        padding: 12px 12px;
        border-bottom: 1px solid rgba(255,255,255,0.10);
    }

    .table-modern tbody td {
        padding: 12px 12px;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        vertical-align: middle;
        font-size: 13px;
    }

    .table-modern tbody tr:hover {
        background: rgba(255,255,255,0.02);
    }

.col-check {
    width: 34px;
}

.col-value {
    width: 110px;
    white-space: nowrap;
    font-weight: 800;
}

.col-actions {
    width: 140px;
}

.muted {
    color: rgba(255,255,255,0.55);
}

.c-left {
    display: flex;
    gap: 10px;
    align-items: center;
}

.c-meta {
    min-width: 0;
}

.c-name {
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.c-sub {
    color: rgba(255,255,255,0.55);
    font-size: 12px;
    margin-top: 2px;
}

.info-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-line {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.78);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 260px;
}

.mini-ico {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.75;
}

    .mini-ico svg {
        width: 14px;
        height: 14px;
        stroke: rgba(255,255,255,0.70);
        fill: none;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .15px;
    border: 1px solid rgba(255,255,255,0.10);
    text-transform: lowercase;
}

    .status-pill.green {
        background: rgba(16,185,129,0.18);
        color: #8ff3c9;
        border-color: rgba(16,185,129,0.24);
    }

    .status-pill.blue {
        background: rgba(59,130,246,0.18);
        color: #b6d1ff;
        border-color: rgba(59,130,246,0.24);
    }

    .status-pill.amber {
        background: rgba(252,176,64,0.16);
        color: var(--accent);
        border-color: rgba(252,176,64,0.24);
    }

.tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag-pill {
    background: rgba(252,176,64,0.10);
    border: 1px solid rgba(252,176,64,0.20);
    color: var(--accent);
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 800;
}

.actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}

.icon-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.18);
    color: rgba(255,255,255,0.85);
}

    .icon-btn:hover {
        background: rgba(255,255,255,0.04);
    }

    .icon-btn svg {
        width: 16px;
        height: 16px;
        stroke: currentColor;
        fill: none;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.more-dd {
    position: relative;
}

    .more-dd > summary {
        list-style: none;
    }

        .more-dd > summary::-webkit-details-marker {
            display: none;
        }

.more-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 160px;
    background: #121316;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 20px 55px rgba(0,0,0,0.60);
    z-index: 30;
}

    .more-menu a {
        display: block;
        padding: 8px 10px;
        border-radius: 10px;
        color: rgba(255,255,255,0.85);
        font-weight: 700;
        font-size: 12px;
    }

        .more-menu a:hover {
            background: rgba(255,255,255,0.05);
        }

.empty-row {
    text-align: center;
    padding: 28px 12px;
    color: rgba(255,255,255,0.55);
}

.kpi-trend.warn {
    color: var(--accent);
}

/* === Directors Contact Form Layout === */
.contact-form {
    max-width: 1180px;
    margin: 0 auto;
}

.form-layout {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 12px;
    align-items: start;
}

.panel-inner {
    padding: 16px;
}

.field label {
    display: block;
    margin: 0 0 6px;
    font-weight: 700;
    opacity: 0.88;
}

.field .help {
    margin-top: 6px;
    font-size: 12px;
    opacity: 0.70;
}

.btn .ico {
    display: inline-flex;
    width: 18px;
    height: 18px;
    margin-right: 6px;
}

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

/* =========================================================
   Directors Contact Form - "Table Style" Inputs
   Tight spacing + better labels + divider like KPI cards
   Scoped to .contact-form so it doesn’t affect other pages
   ========================================================= */

.contact-form .data-panel {
    border-radius: 14px;
}

.contact-form .panel-inner {
    padding: 14px 16px;
}

/* Header divider like KPI cards */
.contact-form .panel-title {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.2px;
    margin: 0 0 10px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    opacity: 0.95;
}

/* Reduce layout spacing a bit */
.contact-form .form-layout {
    gap: 10px;
}

.contact-form .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Field spacing: tighter like table rows */
.contact-form .field {
    margin: 0;
}

    .contact-form .field label {
        display: block;
        font-size: 12px;
        font-weight: 800;
        margin: 0 0 6px 0;
        opacity: 0.78;
    }

/* Table-style input look */
.contact-form .input {
    width: 100%;
    height: 38px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.28);
    color: rgba(255,255,255,0.92);
    outline: none;
    transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

    /* Placeholder = subtle */
    .contact-form .input::placeholder {
        color: rgba(255,255,255,0.35);
    }

    /* Focus matches directors UI */
    .contact-form .input:focus {
        border-color: rgba(252,176,64,0.55);
        box-shadow: 0 0 0 3px rgba(252,176,64,0.12);
        background: rgba(0,0,0,0.34);
    }

/* Select inputs keep same height */
.contact-form select.input {
    padding-right: 36px;
}

/* Textarea: same styling but bigger height */
.contact-form textarea.input {
    height: auto;
    min-height: 110px;
    padding: 10px 12px;
    line-height: 1.35;
}

/* Helper text below inputs: tighter + cleaner */
.contact-form .help,
.contact-form .muted {
    font-size: 12px;
    margin-top: 6px;
    opacity: 0.62;
}

/* Make Notes panel align nicely */
.contact-form textarea.input {
    border-radius: 12px;
}

/* Mobile: stack grid */
@media (max-width: 980px) {
    .contact-form .form-grid {
        grid-template-columns: 1fr;
    }
}

/* === Live Tags Pill Preview (Contacts Form) === */
.contact-form .tags-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.contact-form .tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.2px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    user-select: none;
}

    .contact-form .tag-pill:hover {
        filter: brightness(1.08);
    }

    .contact-form .tag-pill .tag-x {
        font-weight: 900;
        opacity: 0.70;
    }

    .contact-form .tag-pill:hover .tag-x {
        opacity: 1;
    }

    /* tones like the directors UI */
    .contact-form .tag-pill.tone-amber {
        border-color: rgba(252,176,64,0.35);
        background: rgba(252,176,64,0.10);
        color: rgba(252,176,64,0.95);
    }

    .contact-form .tag-pill.tone-green {
        border-color: rgba(46,204,113,0.35);
        background: rgba(46,204,113,0.10);
        color: rgba(46,204,113,0.95);
    }

    .contact-form .tag-pill.tone-blue {
        border-color: rgba(52,152,219,0.35);
        background: rgba(52,152,219,0.10);
        color: rgba(52,152,219,0.95);
    }

    .contact-form .tag-pill.tone-gray {
        border-color: rgba(255,255,255,0.10);
        background: rgba(255,255,255,0.04);
        color: rgba(255,255,255,0.75);
    }
/* === Final polish: "+ Add tag" tiny hint inside empty tags input === */
.contact-form .tag-input {
    position: relative;
    padding-left: 44px; /* space for the hint */
}

    .contact-form .tag-input:placeholder-shown {
        padding-left: 44px; /* only when empty */
    }

        .contact-form .tag-input:placeholder-shown::before {
            content: attr(data-hint);
        }

    /* Fake hint using background + text overlay trick */
    .contact-form .tag-input:placeholder-shown {
        background-image: linear-gradient(transparent, transparent);
    }

/* ================================
   Contacts: Filter dropdown FIX
==================================*/

.filter-dd {
    position: relative;
}

    .filter-dd summary {
        cursor: pointer;
        list-style: none;
    }

        .filter-dd summary::-webkit-details-marker {
            display: none;
        }

    /* Hidden by default */
    .filter-dd .filter-panel {
        display: none;
        position: absolute;
        right: 0;
        top: calc(100% + 10px);
        z-index: 9999;
        min-width: 420px;
    }

    /* Show when open */
    .filter-dd[open] .filter-panel {
        display: block;
    }

.activity-call-summary {
    margin-top: 6px;
    color: rgba(255,255,255,0.72);
    font-size: 12px;
}

.activity-meta--call {
    margin-top: 8px;
    color: rgba(255,255,255,0.55);
    font-size: 12px;
}


/* ===============================
   ✅ Page Hero layout (title + actions)
   =============================== */
.page-hero-row{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
}
.page-hero-actions{
    display:flex;
    align-items:center;
    gap:10px;
    margin-top:2px;
    flex-wrap:wrap;
}
@media (max-width: 680px){
    .page-hero-row{ flex-direction: column; align-items:flex-start; }
}

/* ===============================
   ✅ Lead Cost bottom grid (wide table + small status)
   =============================== */
.dash-grid-bottom-2{
    display:grid;
    grid-template-columns: 1fr 0.45fr;
    gap: 16px;
    margin-top: 16px;
}
@media (max-width: 980px){
    .dash-grid-bottom-2{ grid-template-columns: 1fr; }
}

.app-footer {
    margin-top: 28px;
    padding: 18px 20px 22px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.app-footer-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    color: rgba(255,255,255,0.58);
    font-size: 13px;
    text-align: center;
}

.footer-sep {
    color: rgba(252,176,64,0.65);
}

@media (max-width: 640px) {
    .app-footer {
        padding: 16px 14px 20px;
    }

    .app-footer-inner {
        gap: 6px;
        font-size: 12px;
    }
}