* {
    box-sizing: border-box;
}


html,
body {
    margin: 0;
    padding: 0;
}


body {
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    background: #f5f7fb;

    color: #1f2937;
}


a {
    color: inherit;
}


/* =========================================================
   APP
   ========================================================= */

.app {
    display: flex;

    min-height: 100vh;
}


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

.sidebar {
    width: 250px;

    min-height: 100vh;

    background: #111827;

    color: white;

    padding: 24px 16px;

    flex-shrink: 0;
}


.logo {
    display: flex;

    align-items: center;

    gap: 12px;

    padding: 0 10px 30px;
}


.logo-icon {
    width: 42px;
    height: 42px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #6366f1;

    color: white;

    font-weight: 700;

    font-size: 20px;
}


.logo strong {
    display: block;

    font-size: 16px;
}


.logo span {
    display: block;

    margin-top: 3px;

    color: #9ca3af;

    font-size: 11px;
}


.nav-item {
    display: flex;

    align-items: center;

    gap: 12px;

    padding: 12px 14px;

    margin-bottom: 4px;

    border-radius: 8px;

    color: #d1d5db;

    text-decoration: none;

    transition:
        background .15s,
        color .15s;
}


.nav-item:hover {
    background: #1f2937;

    color: white;
}


.nav-item.active {
    background: #6366f1;

    color: white;
}


.nav-item span {
    width: 20px;

    text-align: center;

    font-size: 16px;
}


.nav-divider {
    height: 1px;

    background: #374151;

    margin: 20px 10px;
}


.nav-item.logout {
    color: #fca5a5;
}


.nav-item.logout:hover {
    background: #3f1d1d;
}


/* =========================================================
   MAIN
   ========================================================= */

.main {
    flex: 1;

    min-width: 0;

    padding: 32px;
}


.topbar {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 30px;
}


.topbar h1 {
    margin: 0 0 5px;

    font-size: 28px;
}


.topbar p {
    margin: 0;

    color: #6b7280;
}


.user-menu {
    display: flex;

    align-items: center;

    gap: 10px;

    font-size: 14px;
}


.avatar {
    width: 38px;
    height: 38px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #6366f1;

    color: white;

    font-weight: 700;
}


/* =========================================================
   STATISTICS
   ========================================================= */

.stats-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 18px;

    margin-bottom: 24px;
}


.stat-card {
    display: flex;

    align-items: center;

    gap: 15px;

    padding: 20px;

    background: white;

    border: 1px solid #e5e7eb;

    border-radius: 12px;
}


.stat-icon {
    width: 48px;
    height: 48px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #eef2ff;

    color: #4f46e5;

    font-size: 20px;
}


.stat-label {
    display: block;

    color: #6b7280;

    font-size: 13px;

    margin-bottom: 5px;
}


.stat-card strong {
    display: block;

    font-size: 25px;

    line-height: 1;
}


/* =========================================================
   DASHBOARD GRID
   ========================================================= */

.dashboard-grid {
    display: grid;

    grid-template-columns:
        2fr 1fr;

    gap: 24px;

    margin-bottom: 24px;
}


/* =========================================================
   CARDS
   ========================================================= */

.card {
    background: white;

    border: 1px solid #e5e7eb;

    border-radius: 12px;

    overflow: hidden;
}


.card-header {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 15px;

    padding: 20px;

    border-bottom: 1px solid #e5e7eb;
}


.card-header h2 {
    margin: 0 0 4px;

    font-size: 17px;
}


.card-header p {
    margin: 0;

    color: #6b7280;

    font-size: 13px;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.button {
    display: inline-block;

    padding: 8px 14px;

    border: 0;

    border-radius: 7px;

    text-decoration: none;

    font-family: inherit;

    font-size: 13px;

    font-weight: 600;

    cursor: pointer;
}


.button-primary {
    background: #6366f1;

    color: white;
}


.button-primary:hover {
    background: #4f46e5;
}


.button-secondary {
    background: #f3f4f6;

    color: #374151;
}


.button-secondary:hover {
    background: #e5e7eb;
}


.button-full {
    width: 100%;

    text-align: center;
}


/* =========================================================
   TABLE
   ========================================================= */

.table-wrapper {
    overflow-x: auto;
}


table {
    width: 100%;

    border-collapse: collapse;
}


th {
    padding: 12px 20px;

    background: #f9fafb;

    color: #6b7280;

    text-align: left;

    font-size: 11px;

    text-transform: uppercase;

    letter-spacing: .04em;
}


td {
    padding: 14px 20px;

    border-top: 1px solid #f0f0f0;

    font-size: 13px;
}


td small {
    display: block;

    margin-top: 3px;

    color: #9ca3af;
}


tbody tr:hover {
    background: #fafafa;
}


/* =========================================================
   STATUS
   ========================================================= */

.status {
    display: inline-block;

    padding: 4px 9px;

    border-radius: 20px;

    background: #f3f4f6;

    color: #4b5563;

    font-size: 11px;

    white-space: nowrap;
}


.status-confirmed,
.status-active,
.status-on_sale {
    background: #dcfce7;

    color: #166534;
}


.status-proposed,
.status-draft {
    background: #fef3c7;

    color: #92400e;
}


.status-sold_out {
    background: #fee2e2;

    color: #991b1b;
}


/* =========================================================
   EMPTY
   ========================================================= */

.empty {
    padding: 35px 20px;

    text-align: center;

    color: #9ca3af;
}


/* =========================================================
   VENUE LIST
   ========================================================= */

.venue-list {
    padding: 8px 0;
}


.venue-item {
    display: flex;

    align-items: center;

    gap: 12px;

    padding: 12px 20px;

    text-decoration: none;

    border-bottom: 1px solid #f0f0f0;
}


.venue-item:last-child {
    border-bottom: 0;
}


.venue-item:hover {
    background: #fafafa;
}


.venue-avatar {
    width: 40px;
    height: 40px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background: #eef2ff;

    color: #4f46e5;

    font-weight: 700;
}


.venue-info {
    min-width: 0;

    flex: 1;
}


.venue-info strong {
    display: block;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    font-size: 13px;
}


.venue-info span {
    display: block;

    margin-top: 3px;

    color: #9ca3af;

    font-size: 12px;
}


/* =========================================================
   ACTIVITY
   ========================================================= */

.activity-list {
    padding: 10px 20px;
}


.activity-item {
    display: flex;

    align-items: center;

    gap: 14px;

    padding: 15px 0;

    border-bottom: 1px solid #f0f0f0;
}


.activity-item:last-child {
    border-bottom: 0;
}


.activity-icon {
    width: 38px;
    height: 38px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #eef2ff;

    color: #4f46e5;

    font-weight: 700;
}


.activity-item strong {
    display: block;

    font-size: 18px;
}


.activity-item span {
    display: block;

    margin-top: 2px;

    color: #6b7280;

    font-size: 12px;
}


/* =========================================================
   CAMPAIGNS
   ========================================================= */

.campaign-summary {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 1px;

    background: #e5e7eb;

    margin: 20px;
}


.campaign-stat {
    padding: 18px;

    background: white;

    text-align: center;
}


.campaign-stat span {
    display: block;

    color: #6b7280;

    font-size: 12px;
}


.campaign-stat strong {
    display: block;

    margin-top: 5px;

    font-size: 24px;
}


.campaign-action {
    padding: 0 20px 20px;
}


/* =========================================================
   QUICK ACTIONS
   ========================================================= */

.quick-actions {
    margin-top: 10px;
}


.section-title {
    margin-bottom: 15px;
}


.section-title h2 {
    margin: 0 0 4px;

    font-size: 18px;
}


.section-title p {
    margin: 0;

    color: #6b7280;

    font-size: 13px;
}


.quick-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 15px;
}


.quick-action {
    display: block;

    padding: 20px;

    background: white;

    border: 1px solid #e5e7eb;

    border-radius: 10px;

    text-decoration: none;

    transition:
        transform .15s,
        box-shadow .15s;
}


.quick-action:hover {
    transform: translateY(-2px);

    box-shadow:
        0 5px 15px
        rgba(0, 0, 0, .06);
}


.quick-icon {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 50px;
    height: 38px;

    margin-bottom: 12px;

    border-radius: 8px;

    background: #eef2ff;

    color: #4f46e5;

    font-size: 20px;
}


.quick-action strong {
    display: block;

    font-size: 14px;
}


.quick-action small {
    display: block;

    margin-top: 4px;

    color: #9ca3af;

    font-size: 12px;
}


/* =========================================================
   LOGIN
   ========================================================= */

.login-page {
    min-height: 100vh;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 20px;

    background: #111827;
}


.login-container {
    width: 100%;

    max-width: 420px;
}


.login-card {
    padding: 40px;

    background: white;

    border-radius: 14px;

    box-shadow:
        0 20px 50px
        rgba(0, 0, 0, .25);
}


.login-logo {
    text-align: center;

    margin-bottom: 30px;
}


.login-logo .logo-icon {
    margin: 0 auto 15px;
}


.login-logo h1 {
    margin: 0;

    font-size: 24px;
}


.login-logo p {
    margin: 5px 0 0;

    color: #6b7280;

    font-size: 13px;
}


/* =========================================================
   ALERT
   ========================================================= */

.alert {
    padding: 12px 14px;

    margin-bottom: 20px;

    border-radius: 8px;

    font-size: 13px;
}


.alert-error {
    background: #fee2e2;

    color: #991b1b;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {

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


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

}


@media (max-width: 850px) {

    .sidebar {
        width: 210px;
    }


    .main {
        padding: 24px;
    }


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

}


@media (max-width: 650px) {

    .app {
        display: block;
    }


    .sidebar {
        width: 100%;

        min-height: auto;

        padding: 12px;
    }


    .logo {
        padding-bottom: 15px;
    }


    .sidebar nav {
        display: flex;

        gap: 5px;

        overflow-x: auto;
    }


    .nav-item {
        flex-shrink: 0;

        margin: 0;
    }


    .nav-divider {
        display: none;
    }


    .main {
        padding: 20px 15px;
    }


    .topbar {
        align-items: flex-start;
    }


    .user-menu span {
        display: none;
    }


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


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


    .card-header {
        align-items: flex-start;
    }

}

/* =========================================================
   RICH PERFORMANCE POPUP
========================================================= */

.performance-modal-heading {
    min-width: 0;
}


.performance-modal-heading h2 {
    margin: 0;
    padding-right: 20px;

    font-size: 25px;
    line-height: 1.25;

    color: #111827;
}


.popup-status-badge {

    display: inline-flex;

    align-items: center;

    margin-top: 10px;

    padding: 5px 10px;

    border-radius: 999px;

    background: #eff6ff;

    color: #2563eb;

    font-size: 11px;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: .5px;
}


.popup-status-badge.confirmed {

    background: #ecfdf5;

    color: #047857;
}


.popup-status-badge.on_sale {

    background: #eff6ff;

    color: #2563eb;
}


.popup-status-badge.sold_out {

    background: #fff7ed;

    color: #c2410c;
}


.popup-status-badge.cancelled {

    background: #fef2f2;

    color: #b91c1c;
}


.performance-detail-wide {

    grid-column: 1 / -1;
}


.detail-subvalue {

    margin-top: 4px;

    color: #64748b;

    font-size: 13px;

    line-height: 1.45;
}


.detail-value a {

    display: inline-flex;

    align-items: center;

    gap: 5px;
}


.external-arrow {

    font-size: 15px;
}


.performance-notes {

    border-top: 1px solid #f1f5f9;
}


.notes-content.empty {

    color: #94a3b8;

    font-style: italic;
}


.performance-modal-footer {

    justify-content: flex-end;

    gap: 8px;
}


.performance-modal-footer .btn {

    min-height: 40px;

    padding: 0 15px;
}


@media (max-width: 650px) {

    .performance-detail-wide {

        grid-column: auto;
    }

    .performance-modal-heading h2 {

        font-size: 21px;

    }

    .performance-modal-footer {

        flex-direction: column;

        align-items: stretch;

    }

    .performance-modal-footer .btn {

        width: 100%;

    }

}
/* ============================================================
   EVENT FINANCIAL DASHBOARD
   ============================================================ */

.financial-dashboard {
    margin-bottom: 30px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 24px;
}

.financial-dashboard-header,
.financial-attention-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.financial-dashboard-header h2,
.financial-attention-header h3 {
    margin: 0 0 5px;
}

.financial-dashboard-header p,
.financial-attention-header p {
    margin: 0;
    color: #6b7280;
}

.financial-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.financial-stat-card {
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
}

.financial-stat-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6b7280;
    margin-bottom: 8px;
}

.financial-stat-card strong {
    display: block;
    font-size: 25px;
    line-height: 1.1;
}

.financial-stat-card small,
.financial-table td small {
    display: block;
    margin-top: 4px;
    color: #6b7280;
}

.financial-positive strong,
.financial-result-positive {
    color: #166534;
}

.financial-negative strong,
.financial-result-negative {
    color: #b91c1c;
}

.financial-table-wrapper {
    overflow-x: auto;
}

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

.financial-table th,
.financial-table td {
    padding: 13px 12px;
    border-bottom: 1px solid #eef0f2;
    text-align: left;
    vertical-align: middle;
}

.financial-table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .035em;
    color: #6b7280;
    white-space: nowrap;
}

.financial-table td strong {
    white-space: nowrap;
}

.financial-event-link {
    color: inherit;
    text-decoration: none;
}

.financial-event-link:hover {
    text-decoration: underline;
}

.financial-not-configured {
    display: inline-block;
    font-weight: 600;
    color: #92400e;
    margin-right: 10px;
}

.financial-action-link {
    font-size: 13px;
    font-weight: 600;
}

.financial-empty {
    padding: 24px;
    text-align: center;
    border: 1px dashed #d1d5db;
    border-radius: 10px;
    color: #6b7280;
}

.financial-attention {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid #e5e7eb;
}

.financial-attention-list {
    display: grid;
    gap: 10px;
}

.financial-attention-item {
    display: grid;
    grid-template-columns: minmax(180px, 1.3fr) minmax(220px, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 14px 16px;
    border: 1px solid #f3e8cf;
    border-radius: 10px;
    background: #fffbeb;
}

.financial-attention-item > div:first-child span {
    display: block;
    margin-top: 3px;
    color: #6b7280;
    font-size: 13px;
}

.financial-attention-reason {
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
}

@media (max-width: 1000px) {
    .financial-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .financial-attention-item {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .financial-dashboard {
        padding: 18px;
    }

    .financial-dashboard-header {
        flex-direction: column;
    }

    .financial-stat-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   ESTIMATE VS ACTUAL — COMPLETED EVENTS
   ============================================================ */

.financial-completed {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.financial-completed-stat-grid {
    margin-bottom: 20px;
}

.completed-financial-table {
    min-width: 1120px;
}

.completed-financial-table td:nth-child(n+4),
.completed-financial-table th:nth-child(n+4) {
    white-space: nowrap;
}

.financial-actual-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.financial-actual-complete {
    background: #ecfdf5;
    color: #166534;
}

.financial-actual-incomplete {
    background: #fffbeb;
    color: #92400e;
}

.financial-actual-missing {
    background: #fef2f2;
    color: #991b1b;
}

.financial-completed-footer {
    margin-top: 12px;
    color: #6b7280;
    font-size: 12px;
}

/* Dashboard attention cards — same padding and visual rhythm as dashboard */
.attention-dashboard{margin:28px 0;background:#fff;border:1px solid #dfe4ee;border-radius:16px;padding:28px}
.attention-heading,.attention-card-heading,.attention-event{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.attention-heading{margin-bottom:22px;align-items:center}
.attention-heading h2{font-size:23px;color:#1f2937;margin:0 0 5px}
.attention-heading p,.attention-card-heading p{color:#667085;margin:0;font-size:14px}
.attention-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.attention-card{border:1px solid #e3e7ef;border-radius:12px;padding:20px;min-width:0}
.attention-card h3{font-size:16px;color:#263142;margin:0 0 7px}
.attention-card-heading p{font-size:12px;line-height:1.5}
.attention-count{flex:0 0 auto;min-width:34px;height:34px;display:flex;align-items:center;justify-content:center;border-radius:9px;background:#eef2ff;color:#3b4ee7;font-weight:800}
.attention-event-list{margin-top:17px;border-top:1px solid #e5e7eb}
.attention-event{padding:12px 0;border-bottom:1px solid #eef0f4;align-items:center}
.attention-event:last-child{border-bottom:0;padding-bottom:0}
.attention-event-details{min-width:0;display:flex;flex-direction:column;gap:4px}
.attention-event-details strong{font-size:13px;color:#253044}
.attention-event-details span{font-size:12px;color:#667085}
.attention-icon-link{display:inline-flex;align-items:center;justify-content:center;flex:0 0 36px;width:36px;height:36px;border:1px solid #e0e5ee;border-radius:9px;color:#345bdc;text-decoration:none;background:#fff}
.attention-icon-link:hover{background:#eef2ff}
.attention-icon-link svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.attention-empty{font-size:13px;color:#667085;margin:18px 0 0}
@media(max-width:850px){.attention-grid{grid-template-columns:1fr}.attention-dashboard{padding:20px}}



/* ShowMan EPK action theme — shared across CRM pages */
.showman-icon-action {
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  width:40px !important;
  min-width:40px !important;
  height:40px !important;
  padding:8px !important;
  border-radius:9px !important;
  vertical-align:middle;
  text-decoration:none !important;
  box-sizing:border-box;
}
.showman-icon-action svg {
  width:19px !important;
  height:19px !important;
  fill:none !important;
  stroke:currentColor !important;
  stroke-width:1.8 !important;
  stroke-linecap:round !important;
  stroke-linejoin:round !important;
}
.showman-icon-action:hover { text-decoration:none !important; }
.showman-icon-action:focus-visible { outline:3px solid #93c5fd !important; outline-offset:2px; }
.epk-icon-danger { color:#b91c1c !important; }
.epk-icon-success { color:#047857 !important; }
.row-actions, .action-links { display:flex; align-items:center; gap:8px; white-space:nowrap; }
