/* =========================
   ROOT VARIABLES
========================= */

:root {
    --bg-main: #f5f7fb;
    --card-bg: #ffffff;
    --border-light: #e5e7eb;

    --primary: #2563eb;
    --success: #16a34a;
    --danger: #dc2626;

    --text-main: #111827;
    --text-muted: #6b7280;
}

/* =========================
   GLOBAL
========================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, system-ui, Arial, sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 24px;
}

/* =========================
   NAVBAR (SHARED)
========================= */

.navbar {
    height: 60px;
    background: linear-gradient(90deg, #0f172a, #020617);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
}

.nav-left a,
.nav-right a {
    color: #e5e7eb;
    text-decoration: none;
    margin-right: 18px;
    font-weight: 500;
}

.nav-left a:hover {
    color: #38bdf8;
}

.nav-right span {
    color: #cbd5f5;
    font-size: 14px;
}

/* =================================================
   DASHBOARD PAGE (OLD DESIGN — PRESERVED)
================================================= */

.dashboard-page .dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.dashboard-page .subtitle {
    color: var(--text-muted);
    font-size: 14px;
}

.dashboard-page .primary-btn {
    background: var(--primary);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
}

/* KPI */
.dashboard-page .kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.dashboard-page .kpi-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    padding: 18px;
    border-radius: 10px;
}

.dashboard-page .kpi-card.success {
    border-left: 4px solid var(--success);
}

.dashboard-page .kpi-card.danger {
    border-left: 4px solid var(--danger);
}

.dashboard-page .kpi-label {
    font-size: 13px;
    color: var(--text-muted);
}

.dashboard-page .kpi-value {
    font-size: 28px;
    font-weight: 600;
    margin-top: 6px;
}

/* Analytics panels */
.dashboard-page .analytics-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.dashboard-page .panel {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 20px;
}

.dashboard-page .panel h3 {
    margin-top: 0;
    font-size: 16px;
}

/* Lists inside dashboard */
.dashboard-page .campaign-list,
.dashboard-page .activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dashboard-page .campaign-list li,
.dashboard-page .activity-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
}

/* Status pills */
.dashboard-page .status {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 500;
}

.dashboard-page .status.sent {
    background: #dcfce7;
    color: #166534;
}

.dashboard-page .status.failed {
    background: #fee2e2;
    color: #991b1b;
}

.dashboard-page .status.pending {
    background: #fef3c7;
    color: #92400e;
}

/* =================================================
   CAMPAIGNS & EMAILS (NEW ZOHO STYLE)
================================================= */

.list-page .panel {
    background: white;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    margin-bottom: 24px;
}

/* Tables */
.list-page table {
    width: 100%;
    border-collapse: collapse;
}

.list-page th {
    text-align: left;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    padding: 14px 12px;
    border-bottom: 1px solid #e5e7eb;
}

.list-page td {
    padding: 14px 12px;
    border-bottom: 1px solid #f1f5f9;
}

.list-page tr:hover {
    background: #f8fafc;
    cursor: pointer;
}

/* Badges */
.list-page .badge {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.list-page .badge.sent {
    background: #dcfce7;
    color: #166534;
}

.list-page .badge.failed,
.list-page .badge.bounced {
    background: #fee2e2;
    color: #991b1b;
}

.list-page .badge.pending {
    background: #fef3c7;
    color: #92400e;
}

/* =================================================
   UPLOAD PAGE 
================================================= */

.upload-panel {
    max-width: 480px;
    margin: 40px auto;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 28px;
    text-align: center;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Choose file button */
.choose-btn {
    background: var(--primary);
    color: white;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.choose-btn:hover {
    background: #1d4ed8;
}

/* Selected file name box */
.file-name {
    font-size: 14px;
    color: var(--text-muted);
    background: #f9fafb;
    border: 1px dashed var(--border-light);
    padding: 12px;
    border-radius: 8px;
}

/* Upload button */
.upload-btn {
    background: var(--success);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.upload-btn:hover {
    background: #15803d;
}


/* ===== SEARCH / FILTER BAR (EMAILS + CAMPAIGNS) ===== */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.filter-bar input[type="text"],
.filter-bar input[type="search"],
.filter-bar select {
    height: 42px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    font-size: 14px;
    background: #ffffff;
    min-width: 220px;
    transition: all 0.2s ease;
}

.filter-bar input::placeholder {
    color: #9ca3af;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
    outline: none;
}

/* ===== SEARCH / FILTER BAR (EMAILS + CAMPAIGNS) ===== */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.filter-bar input[type="text"],
.filter-bar input[type="search"],
.filter-bar select {
    height: 42px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    font-size: 14px;
    background: #ffffff;
    min-width: 220px;
    transition: all 0.2s ease;
}

.filter-bar input::placeholder {
    color: #9ca3af;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
    outline: none;
}

.filter-bar .primary-btn {
    height: 42px;
    padding: 0 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.table tr {
    transition: background 0.15s ease;
}

.table tr:hover {
    background: #f8fafc;
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
}

.pagination a {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: white;
    text-decoration: none;
    color: #2563eb;
    font-weight: 500;
}

.pagination a:hover {
    background: #eff6ff;
}

.pagination span {
    font-size: 14px;
    color: #6b7280;
}