/* dashboard-extra.css */
/* Dashboard specific layout reusing existing vars/tokens where possible */
.dashboard-grid {
    display: grid;
    gap: 24px;
    margin-top: 24px;
}


/* Activity Overview: 2 columns */
.dashboard-activity-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}


/* Snapshot Cards - Flattened */
.snapshot-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.snapshot-head {
    padding: 18px 24px;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.snapshot-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
}

.snapshot-link {
    font-size: 13px;
    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
}

.snapshot-link:hover {
    text-decoration: underline;
}

.snapshot-body {
    padding: 24px;
    flex: 1;
}

/* Updated Calendar List - Flat Modern Style */
.calendar-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.calendar-item {
    display: grid;
    grid-template-columns: 50px 1fr auto;
    /* Date | Info | Actions */
    align-items: center;
    /* Center vertically */
    gap: 16px;
    padding: 20px 0;
    /* More spacing top/bottom */
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}

.calendar-item:last-child {
    border-bottom: none;
}

/* Date Styling Matching Reference */
.calendar-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
}

.calendar-day {
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
    /* Dark slate */
    line-height: 1;
    margin-bottom: 2px;
}

.calendar-month {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.5px;
}

.calendar-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
}

/* Title Row */
.calendar-item-top {
    display: block;
    width: 100%;
    margin-bottom: 4px;
}

/* Meta Row: Tag + Location */
.calendar-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.calendar-item-title {
    font-weight: 800;
    /* Bolder */
    font-size: 16px;
    color: #0f172a;
    /* Very dark */
    text-decoration: none;
    line-height: 1.3;
    display: block;
}

.calendar-item-title:hover {
    color: var(--blue);
    text-decoration: underline;
}

/* Location Row */
.calendar-loc {
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.calendar-loc svg {
    color: #94a3b8;
    width: 14px;
    height: 14px;
}

/* Pill Badges - Soft rounded */
.cal-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    /* Pill shape */
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* New colors based on image reference */
.tag-gray {
    background: #f1f5f9;
    color: #475569;
}

.tag-blue {
    background: #e0f2fe;
    color: #0284c7;
}

/* Lighter blue bg, darker text */
.tag-green {
    background: #dcfce7;
    color: #166534;
}

.tag-orange {
    background: #ffedd5;
    color: #c2410c;
}

.tag-red {
    background: #fee2e2;
    color: #991b1b;
}

.tag-gold {
    background: #fef9c3;
    color: #854d0e;
}

.tag-purple {
    background: #f3e8ff;
    color: #6b21a8;
}

.tag-teal {
    background: #ccfbf1;
    color: #0f766e;
}

/* Actions: aligned right, minimal icons */
.calendar-actions {
    display: flex;
    gap: 8px;
    /* More space between icons */
    align-items: center;
}

.cal-action-btn {
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    color: #94a3b8;
    /* Muted gray */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
}

.cal-action-btn:hover {
    background: #f1f5f9;
    color: var(--ink);
}

.cal-action-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2px;
}

/* Metrics Grid inside cards */
.metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.metric-box {
    background: var(--bg);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.metric-val {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.2;
}

/* Budget Progress - Hub Style */
.budget-progress-container {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hub-budget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.hub-budget-label-green {
    color: #10b981;
    /* Green */
    font-weight: 700;
}

.hub-budget-values {
    color: var(--muted);
    font-weight: 600;
    font-size: 11px;
}

.budget-progress-bar {
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0;
    /* Remove bottom margin */
}

.budget-progress-fill {
    height: 100%;
    background: #10b981;
    /* Flat Green */
    border-radius: 4px;
    /* Slightly rounded */
    width: 0%;
    transition: width 1s ease-in-out;
}

.budget-stats {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
}

/* ROI Trend */
.roi-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    margin-top: 8px;
}

.roi-positive {
    background: #dcfce7;
    color: #166534;
}

.roi-negative {
    background: #fee2e2;
    color: #991b1b;
}

.roi-neutral {
    background: #f1f5f9;
    color: #475569;
}

/* Icon Boxes for CRM */
.card-inner-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.icon-metric-card {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.icon-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
}

.icon-blue {
    background: #eff6ff;
    color: #3b82f6;
}

.icon-orange {
    background: #fff7ed;
    color: #f97316;
}

.icon-purple {
    background: #faf5ff;
    color: #a855f7;
}

.icon-green {
    background: #f0fdf4;
    color: #22c55e;
}

.metric-num {
    font-size: 22px;
    font-weight: 800;
    color: var(--ink);
    display: block;
}

.metric-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
}

/* Progress Circle for Reviews */
.circular-progress-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
}

.circular-progress {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: conic-gradient(var(--blue) 0%, #e2e8f0 0%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 1s ease-in-out;
}

.circular-progress::before {
    content: "";
    position: absolute;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: #fff;
}

.circular-progress-val {
    position: relative;
    font-size: 16px;
    font-weight: 800;
    color: var(--ink);
}

.reviews-summary {
    text-align: left;
}

.reviews-summary p {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.4;
}

.reviews-summary strong {
    color: var(--ink);
    font-size: 15px;
}

.metric-lbl {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-top: 6px;
    font-weight: 500;
}

.metric-missing {
    color: var(--gray-muted);
    font-style: italic;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 900px) {
    .dashboard-kpi-row {
        grid-template-columns: 1fr 1fr;
    }

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

@media (max-width: 600px) {
    .dashboard-kpi-row {
        grid-template-columns: 1fr;
    }
}

/* Modal Styles (from Scadenziario/CRM) */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    width: min(520px, calc(100% - 32px));
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.15);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal h2,
.contact-form-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    border-bottom: none;
    padding-bottom: 0;
}

.form-control,
.trade-fairs-field input,
.trade-fairs-field select,
.trade-fairs-field textarea {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    color: var(--ink);
    transition: all 0.2s;
}

.form-control:focus,
.trade-fairs-field input:focus {
    outline: 2px solid rgba(11, 60, 93, 0.2);
    border-color: rgba(11, 60, 93, 0.3);
    background: #fff;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.modal-close-btn {
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    color: #64748b;
    line-height: 1;
    padding: 4px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

/* CRM Contact Form Specifics */
.contact-form-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.full-width {
    grid-column: 1 / -1;
}

.contact-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}


/* Custom Select Stub */
.crm-custom-select {
    position: relative;
}

.crm-select-trigger {
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.eval-fair-link {
    color: #334155;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.eval-fair-link:hover {
    color: var(--blue);
    text-decoration: underline;
}

.crm-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 50;
    margin-top: 4px;
    padding: 4px;
}

.crm-select-search input {
    width: 100%;
    border: none;
    padding: 8px;
    outline: none;
    border-bottom: 1px solid #f1f5f9;
}
