:root {
    --bg-color: #12151e; /* Deeper dark for premium feel */
    --surface-color: #1c2130;
    --surface-hover: #262d40;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #3b82f6;
    --accent-light: #60a5fa;
    --eff-color: #f59e0b;
    --border-color: #2b3245;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* HEADER */
.header {
    background-color: transparent;
    padding: 2rem 2rem 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-box {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    border-radius: 6px;
}

.title-group h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, #f8fafc, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.title-group p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.period-badge {
    color: #a78bfa;
    font-weight: 500;
}

/* TOGGLE SWITCH */
.view-mode-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.toggle-switch {
    display: flex;
    background: #151923;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 4px;
}

.toggle-switch input[type="radio"] {
    display: none;
}

/* ── HEADER ACTIONS & LOGOUT ── */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}
.btn-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

#view-volume:checked ~ .volume-btn {
    background-color: var(--accent-light);
    color: #1e3a8a;
}

#view-efficiency:checked ~ .eff-btn {
    background-color: var(--eff-color);
    color: #78350f;
}

#view-creative:checked + label,
#view-month:checked + label,
#view-day:checked + label {
    background-color: #a78bfa;
    color: #2e1065;
}

/* CONTROLS ROW 2 */
.controls-row-2 {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.view-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* MONTHLY LEGEND */
.monthly-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* CONTAINER */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem 2rem 2rem;
}

/* SUMMARY CARDS */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.summary-title {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.summary-value {
    color: var(--text-primary);
    font-size: 1.6rem;
    font-weight: 700;
}

.summary-note {
    font-size: 0.7rem;
    color: var(--eff-color);
    margin-top: 0.4rem;
    line-height: 1.2;
}

/* MAIN DASHBOARD */
.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.controls-area {
    margin-bottom: 2rem;
}

.selectors-group {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.selector-box {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
    min-width: 250px;
}

.selector-box label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.metric-select {
    background-color: #151923;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    width: 100%;
    max-width: 100%;
    text-overflow: ellipsis;
}

.metric-select:focus {
    outline: none;
    border-color: var(--accent-light);
}

/* CHART WRAPPER */
.chart-wrapper {
    background-color: var(--surface-color);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.chart-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.chart-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.badge-volume {
    padding: 0.2rem 0.6rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    font-size: 0.7rem;
    margin-left: auto;
    color: var(--text-secondary);
}

.canvas-container {
    position: relative;
    height: 400px;
    width: 100%;
}

/* DATA TABLE */
.data-table-container {
    background-color: var(--surface-color);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th, .data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table th {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

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

.ad-name-cell {
    font-weight: 500;
    color: #e2e8f0;
    position: relative;
    max-width: 350px;
    line-height: 1.4;
    cursor: pointer;
}
.ad-name-cell:hover {
    color: var(--accent-light);
    text-decoration: underline;
    text-decoration-color: rgba(96,165,250,0.4);
    text-underline-offset: 3px;
}

.action-btn {
    background-color: var(--border-color);
    color: var(--text-primary);
    border: none;
    border-radius: 4px;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s;
}

.action-btn:hover { background-color: #3b82f6; }
.action-btn.disabled { background-color: #151923; color: var(--text-secondary); cursor: not-allowed; }

.hidden { display: none !important; }

/* TOOLTIP */
#creative-preview {
    position: absolute;
    background-color: #0f172a;
    border: 1px solid var(--accent-light);
    border-radius: 8px;
    padding: 1rem;
    width: 280px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    pointer-events: none;
    transition: opacity 0.2s;
}
.preview-content { display: flex; flex-direction: column; gap: 0.5rem; }
.text-accent { color: var(--accent-light); text-decoration: none; font-weight: 600; pointer-events: auto; }

/* ── INFO BUTTON (cards) ── */
.info-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 16px; height: 16px; border-radius: 50%;
    background: rgba(167,139,250,0.2); color: #a78bfa;
    font-size: 10px; font-weight: 800; font-style: normal;
    cursor: default; margin-left: 5px; vertical-align: middle;
    border: 1px solid rgba(167,139,250,0.4);
    user-select: none;
    transition: background 0.2s;
}
.info-btn:hover { background: rgba(167,139,250,0.4); }

/* ── INFO TOOLTIP (floating) ── */
.info-tooltip {
    position: absolute;
    background: #0f172a;
    border: 1px solid #a78bfa;
    border-radius: 8px;
    padding: 0.7rem 0.9rem;
    font-size: 0.78rem;
    color: #e2e8f0;
    line-height: 1.5;
    max-width: 240px;
    z-index: 2000;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    transform: translateX(-50%) translateY(-100%);
}

/* ── ACTION CELL ── */
.action-cell { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }

.detail-btn {
    background: rgba(167,139,250,0.15);
    color: #a78bfa;
    border: 1px solid rgba(167,139,250,0.35);
    border-radius: 4px;
    padding: 0.35rem 0.7rem;
    font-size: 0.78rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.detail-btn:hover { background: rgba(167,139,250,0.3); }

/* ── MODAL OVERLAY ── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 800;
    display: flex; justify-content: flex-end;
}
.modal-overlay.hidden { display: none !important; }

/* ── MODAL PANEL (drawer from right) ── */
.modal-panel {
    background: #151b28;
    width: min(680px, 96vw);
    height: 100vh;
    overflow-y: auto;
    border-left: 1px solid var(--border-color);
    box-shadow: -24px 0 60px rgba(0,0,0,0.5);
    animation: slideInRight 0.25s cubic-bezier(.4,0,.2,1);
    display: flex; flex-direction: column;
}
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);   opacity: 1; }
}

.modal-top-bar {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 1.75rem 2rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    position: sticky; top: 0; background: #151b28; z-index: 10;
}
.modal-tag {
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; color: #a78bfa; margin-bottom: 0.3rem;
}
.modal-ad-title {
    font-size: 1.05rem; font-weight: 700; color: #f8fafc;
    line-height: 1.4; max-width: 90%;
}
.modal-close-btn {
    background: rgba(255,255,255,0.05); border: 1px solid var(--border-color);
    color: var(--text-secondary); border-radius: 6px; width: 32px; height: 32px;
    cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; flex-shrink: 0;
}
.modal-close-btn:hover { background: rgba(244,63,94,0.2); color: #f43f5e; border-color: #f43f5e; }

.modal-body { padding: 1.5rem 2rem 2.5rem; flex: 1; }

.modal-section { margin-bottom: 2rem; }
.modal-section-title {
    display: flex; align-items: center; gap: 0.6rem;
    font-size: 0.85rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.5px; color: var(--text-secondary);
    margin-bottom: 1rem; padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* ── CAMPAIGN INFO ── */
.campaign-info-list { display: flex; flex-direction: column; gap: 0.5rem; }

/* ── MODAL FEEDBACK BLOCK ── */
.modal-feedback-section {
    background: linear-gradient(135deg, rgba(251,191,36,0.07), rgba(245,158,11,0.1));
    border: 1px solid rgba(251,191,36,0.2);
    border-left: 4px solid #f59e0b;
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.25rem 1.25rem;
    margin-bottom: 1.5rem;
}
.modal-feedback-body {
    font-size: 0.88rem;
    color: #e2e8f0;
    line-height: 1.7;
    margin-top: 0.75rem;
    white-space: pre-wrap;
}
.modal-feedback-body p:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}
.info-row {
    display: grid; grid-template-columns: 180px 1fr;
    gap: 0.75rem; padding: 0.6rem 0.75rem;
    background: rgba(255,255,255,0.03); border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.05);
    font-size: 0.82rem;
}
.info-row-label { color: var(--text-secondary); font-weight: 600; }
.info-row-val { color: #f8fafc; word-break: break-all; }

/* ── METRIC GROUPS (modal) ── */
.metric-group { margin-bottom: 1.5rem; }
.metric-group-title {
    font-size: 0.82rem; font-weight: 700; color: var(--text-secondary);
    margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.4px;
}
.metric-group-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.6rem;
}
.metric-detail-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px; padding: 0.75rem;
    display: flex; flex-direction: column; gap: 0.25rem;
}
.metric-detail-label { font-size: 0.72rem; color: var(--text-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.metric-detail-value { font-size: 1.05rem; font-weight: 700; color: #f8fafc; }

/* ── OPTGROUP STYLING ── */
select optgroup { background: #1c2130; color: #94a3b8; font-style: normal; }
select option  { background: #151923; color: #f8fafc; }

/* ── DATE PICKER ── */
.date-picker { position: relative; }

.date-range-btn {
    display: flex; align-items: center; gap: 0.5rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px; padding: 0.55rem 1rem;
    color: var(--text-primary); font-family: inherit;
    font-size: 0.85rem; font-weight: 500; cursor: pointer;
    transition: border-color 0.2s;
}
.date-range-btn:hover { border-color: #a78bfa; }
.date-range-btn svg { color: #a78bfa; }

.date-panel {
    position: absolute; right: 0; top: calc(100% + 8px);
    background: #1c2130; border: 1px solid var(--border-color);
    border-radius: 12px; z-index: 500;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    min-width: 420px;
}
.date-panel-inner { display: flex; }

.preset-col {
    padding: 1.25rem;
    border-right: 1px solid var(--border-color);
    min-width: 175px;
}
.preset-label {
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.8px; color: var(--text-secondary); margin-bottom: 0.75rem;
}
.preset-list { display: flex; flex-direction: column; gap: 2px; }

.preset-btn {
    background: none; border: none; text-align: left;
    padding: 0.45rem 0.75rem; font-family: inherit;
    font-size: 0.85rem; color: var(--text-secondary);
    cursor: pointer; border-radius: 6px; transition: all 0.15s;
}
.preset-btn:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.preset-btn.active { background: rgba(167,139,250,0.15); color: #a78bfa; font-weight: 600; }

.custom-col { padding: 1.25rem; flex: 1; }
.custom-fields { display: flex; flex-direction: column; gap: 1rem; }
.field-group { display: flex; flex-direction: column; gap: 0.35rem; }
.field-group label { font-size: 0.78rem; color: var(--text-secondary); }

.date-input {
    background: #151923; border: 1px solid var(--border-color);
    border-radius: 6px; padding: 0.5rem; color: var(--text-primary);
    font-family: inherit; font-size: 0.85rem; cursor: pointer;
    color-scheme: dark;
}
.date-input:focus { outline: none; border-color: #a78bfa; }

.date-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 0.5rem; }
.btn-cancel {
    background: none; border: 1px solid var(--border-color);
    border-radius: 6px; padding: 0.45rem 1rem;
    color: var(--text-secondary); font-family: inherit; cursor: pointer;
    transition: all 0.15s;
}
.btn-cancel:hover { border-color: var(--text-secondary); color: var(--text-primary); }
.btn-apply {
    background: #a78bfa; border: none; border-radius: 6px;
    padding: 0.45rem 1.2rem; color: #1e0f5c;
    font-family: inherit; font-weight: 700; cursor: pointer; transition: all 0.15s;
}
.btn-apply:hover { background: #c4b5fd; }

/* ── OVERVIEW SECTION ── */
.overview-section { margin-bottom: 2rem; }
.overview-header {
    display: flex; flex-direction: column; gap: 1rem;
    margin-bottom: 1rem;
}
.overview-title-row { display: flex; align-items: center; gap: 0.75rem; }

.overview-toggles {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.overview-toggle-btn {
    display: flex; align-items: center; gap: 0.5rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 20px; padding: 0.35rem 0.85rem;
    font-family: inherit; font-size: 0.8rem;
    color: var(--text-secondary); cursor: pointer; transition: all 0.2s;
}
.overview-toggle-btn:hover { border-color: rgba(255,255,255,0.2); color: var(--text-primary); }
.overview-toggle-btn.active {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.2);
    color: var(--text-primary);
}
.toggle-dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}

/* misc */
.loading-text { color: var(--text-secondary); padding: 1rem; }

/* ==========================================
   AGENCY FEEDBACK (N8N) — Collapsible
   ========================================== */
.agency-feedback {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(245, 158, 11, 0.12));
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-left: 4px solid #f59e0b;
    border-radius: 0 10px 10px 0;
    margin-bottom: 2rem;
    overflow: hidden;
    animation: fadeInDown 0.5s ease-out forwards;
}

.feedback-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}
.feedback-header:hover {
    background: rgba(251, 191, 36, 0.06);
}

.feedback-title {
    margin: 0;
    color: #fbbf24;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.feedback-title svg {
    color: #f59e0b;
    flex-shrink: 0;
}

.feedback-badge {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: rgba(245, 158, 11, 0.25);
    color: #fcd34d;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    border: 1px solid rgba(245, 158, 11, 0.35);
    animation: softPulse 2.5s ease-in-out infinite;
}

@keyframes softPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.feedback-chevron {
    color: #fbbf24;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.agency-feedback.expanded .feedback-chevron {
    transform: rotate(180deg);
}

.feedback-body {
    max-height: 0;
    opacity: 0;
    padding: 0 1.5rem;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
    overflow: hidden;
}

.agency-feedback.expanded .feedback-body {
    max-height: 2000px;
    opacity: 1;
    padding: 0 1.5rem 1.25rem;
}

#agency-feedback-text {
    margin: 0;
    color: #e2e8f0;
    font-size: 0.92rem;
    line-height: 1.7;
    border-top: 1px solid rgba(251, 191, 36, 0.15);
    padding-top: 0.85rem;
}
#agency-feedback-text p {
    margin: 0 0 0.5rem 0;
}
#agency-feedback-text p:last-child {
    margin-bottom: 0;
}
mark.n8n-mark {
    background: rgba(251, 191, 36, 0.25);
    color: #fcd34d;
    border-radius: 3px;
    padding: 0 3px;
    font-style: normal;
}
ul.n8n-list {
    margin: 0.25rem 0 0.5rem 1.25rem;
    padding: 0;
}
ul.n8n-list li {
    margin-bottom: 0.2rem;
}

/* ==========================================
   MOBILE & RESPONSIVE TWEAKS
   ========================================== */
@media (max-width: 768px) {
    .selectors-group {
        flex-direction: column;
        gap: 1rem;
    }
    .selector-box {
        min-width: 0;
        width: 100%;
    }
    
    .date-panel {
        position: fixed;
        top: 50%;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%);
        min-width: auto;
        width: 90vw;
        max-width: 360px;
        z-index: 9999;
    }
    
    .date-panel-inner {
        flex-direction: column;
    }
    
    .preset-col {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1rem;
    }
    
    .preset-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .custom-col {
        padding: 1rem;
    }
    
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chart-wrapper {
        min-height: 250px;
    }

    /* Tabela em formato de Cards no Mobile */
    .data-table, .data-table tbody, .data-table tr, .data-table td {
        display: block;
        width: 100%;
    }
    .data-table thead {
        display: none;
    }
    .data-table tr {
        background: rgba(255, 255, 255, 0.02);
        margin-bottom: 1rem;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 1rem;
    }
    .data-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        text-align: right;
    }
    .data-table td:last-child {
        border-bottom: none;
    }
    .data-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-secondary);
        text-transform: uppercase;
        font-size: 0.75rem;
        margin-right: 1rem;
        text-align: left;
    }
    .data-table td.ad-name-cell {
        display: block;
        text-align: left;
        font-size: 1rem;
        margin-bottom: 0.5rem;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 1rem;
        line-height: 1.4;
    }
    .data-table td.ad-name-cell::before {
        display: none;
    }
    .data-table td.action-cell {
        justify-content: flex-end;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }
    .data-table td.action-cell::before {
        display: none;
    }
}

@media (max-width: 480px) {
    .summary-cards {
        grid-template-columns: 1fr;
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}
.shake { animation: shake 0.4s ease-in-out; }

/* ==========================================
   AGENCY & AUTH
   ========================================== */
#auth-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh;
    background-color: rgba(15, 18, 25, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}
.auth-panel {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
    max-width: 420px;
    width: 90%;
    margin: 0 auto;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    position: relative;
    z-index: 10000;
}
.auth-panel h2 {
    color: var(--text-primary); margin-bottom: 0.5rem; font-size: 1.4rem;
}
.auth-panel p {
    color: var(--text-secondary); font-size: 0.9rem; line-height: 1.4;
}

/* Tooltips */
.tooltip-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.help-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 14px; height: 14px; border-radius: 50%;
    background: rgba(255,255,255,0.15); color: #cbd5e1;
    font-size: 0.65rem; font-weight: 700; cursor: help;
    transition: background 0.2s;
}
.help-icon:hover { background: #60a5fa; color: #1e0f5c; }

/* Footer */
.agency-footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 1rem;
    margin-top: 4rem;
    text-align: center;
    background: rgba(21, 25, 35, 0.4);
}
.footer-content { max-width: 1400px; margin: 0 auto; }
.footer-content p { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 0.75rem; }
.footer-links { display: flex; align-items: center; justify-content: center; gap: 0.75rem; flex-wrap: wrap; }
.footer-links a { color: var(--text-secondary); text-decoration: none; font-size: 0.8rem; transition: color 0.2s; }
.footer-links a:hover { color: #60a5fa; }
.footer-links .separator { color: var(--border-color); }

/* Floating WhatsApp Button Premium */
.floating-whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4), inset 0 -2px 5px rgba(0,0,0,0.1);
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: pulse-whatsapp 2s infinite;
}

.floating-whatsapp-btn img,
.floating-whatsapp-btn svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
}

.floating-whatsapp-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6), inset 0 -2px 5px rgba(0,0,0,0.1);
    animation: none;
}

@keyframes pulse-whatsapp {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

