/* ── ALPE Campaigns Frontend ── */
*, *::before, *::after { box-sizing: border-box; }

.alpecmp-wrap {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    color: #2d2d2d;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0 48px;
}

.alpecmp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 12px;
}

.alpecmp-header-left { flex: 1; }

.alpecmp-header-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
}

.alpecmp-header-sub {
    font-size: 13px;
    color: #999;
    margin-top: 4px;
}

.alpecmp-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.alpecmp-nav-btn {
    font-size: 13px;
    color: #fff;
    text-decoration: none;
    background: #F79420;
    border: 1px solid #F79420;
    border-radius: 6px;
    padding: 6px 16px;
    white-space: nowrap;
    transition: all .15s;
    font-weight: 600;
}

.alpecmp-nav-btn:hover { background: #e07a10; border-color: #e07a10; color: #fff; }

.alpecmp-logout-btn {
    font-size: 13px;
    color: #F79420;
    text-decoration: none;
    border: 1px solid #F79420;
    border-radius: 6px;
    padding: 6px 16px;
    white-space: nowrap;
    transition: all .15s;
}
.alpecmp-logout-btn:hover { background: #F79420; color: #fff; }

/* ── Summary cards ── */
.alpecmp-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.alpecmp-card {
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,.04);
}

.alpecmp-card-label {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #aaa !important;
    text-transform: uppercase !important;
    letter-spacing: .05em !important;
    margin-bottom: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    white-space: nowrap !important;
    gap: 4px !important;
}

.alpecmp-card-value {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
}

/* ── Campaign table ── */
.alpecmp-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #ebebeb;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    background: #fff;
}

.alpecmp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 900px;
}

.alpecmp-table thead th {
    background: #F79420;
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 11px 12px;
    text-align: left;
    white-space: nowrap;
}

.alpecmp-table thead th:first-child { border-radius: 11px 0 0 0; }
.alpecmp-table thead th:last-child  { border-radius: 0 11px 0 0; }

.alpecmp-col-subject { min-width: 240px; }
.alpecmp-col-date    { min-width: 100px; }
.alpecmp-col-num     { min-width: 90px; text-align: right !important; }

.alpecmp-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background .1s;
}

.alpecmp-table tbody tr:last-child { border-bottom: none; }
.alpecmp-table tbody tr:hover { background: #fffaf4; }

.alpecmp-table td {
    padding: 11px 12px;
    vertical-align: top;
    color: #444;
}

.alpecmp-subject {
    font-weight: 600;
    color: #1a1a1a;
}

.alpecmp-campaign-title {
    font-size: 11px;
    color: #aaa;
    font-weight: 400;
    margin-top: 2px;
}

.alpecmp-date    { white-space: nowrap; color: #888; }
.alpecmp-num     { text-align: right; font-variant-numeric: tabular-nums; }
.alpecmp-rate    { font-weight: 700 !important; color: #F79420 !important; }
.alpecmp-bounce  { color: #e07a10 !important; }
.alpecmp-unsub   { color: #c0392b !important; }

@media (max-width: 600px) {
    .alpecmp-card-value { font-size: 18px; }
    .alpecmp-summary-cards { grid-template-columns: repeat(2, 1fr); }
}

/* ── Login form ── */
.alpecmp-login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.alpecmp-login-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,.1);
    padding: 40px 36px;
    width: 100%;
    max-width: 420px;
}

.alpecmp-login-title {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 6px;
    color: #1a1a1a;
}

.alpecmp-login-sub {
    font-size: 14px;
    color: #888;
    text-align: center;
    margin: 0 0 24px;
}

.alpecmp-login-form { display: flex; flex-direction: column; gap: 16px; }

.alpecmp-field { display: flex; flex-direction: column; gap: 6px; }
.alpecmp-field label { font-size: 13px; font-weight: 600; color: #444; }
.alpecmp-field input {
    padding: 11px 14px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    color: #1a1a1a;
    width: 100%;
}
.alpecmp-field input:focus { outline: none; border-color: #F79420; box-shadow: 0 0 0 3px rgba(247,148,32,.12); }

.alpecmp-btn-primary {
    background: #F79420 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 13px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    width: 100% !important;
    margin-top: 4px;
}
.alpecmp-btn-primary:hover { background: #e07a10 !important; }

.alpecmp-alert { border-radius: 8px; padding: 12px 16px; font-size: 14px; }
.alpecmp-alert-error { background: #fdecea; border: 1px solid #f5c6cb; color: #c0392b; }

/* ── Info icon & modal ── */
.alpecmp-card-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.alpecmp-info-btn {
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    color: #F79420 !important;
    font-size: 18px !important;
    font-style: italic !important;
    font-weight: 700 !important;
    font-family: Georgia, serif !important;
    padding: 0 0 0 5px !important;
    margin: 0 !important;
    line-height: 1 !important;
    box-shadow: none !important;
    outline: none !important;
    transition: color .15s !important;
}
.alpecmp-info-btn:hover { color: #e07a10 !important; background: none !important; }

.alpecmp-info-overlay {
    position: fixed !important;
    top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
    background: rgba(0,0,0,.5) !important;
    z-index: 999999 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
}
.alpecmp-info-overlay.alpecmp-open {
    display: flex !important;
}

.alpecmp-info-modal {
    background: #fff !important;
    border-radius: 10px !important;
    padding: 12px 18px !important;
    max-width: 400px !important;
    width: auto !important;
    white-space: nowrap !important;
    position: relative !important;
    box-shadow: 0 4px 24px rgba(0,0,0,.18) !important;
    font-size: 18px !important;
    line-height: 1.6 !important;
    color: #333 !important;
    white-space: pre-wrap !important;
    border: none !important;
}

.alpecmp-info-close {
    position: absolute !important;
    top: 4px !important;
    right: 8px !important;
    background: none !important;
    border: none !important;
    font-size: 18px !important;
    cursor: pointer !important;
    color: #aaa !important;
    line-height: 1 !important;
    padding: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}
.alpecmp-info-close:hover { color: #333 !important; background: none !important; }

/* ── View Email button ── */
.alpecmp-wrap a.alpecmp-view-btn,
.alpecmp-wrap a.alpecmp-view-btn:link,
.alpecmp-wrap a.alpecmp-view-btn:visited {
    display: inline-block !important;
    margin-top: 6px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    background: #F79420 !important;
    background-color: #F79420 !important;
    border: none !important;
    border-radius: 5px !important;
    padding: 4px 10px !important;
    text-decoration: none !important;
    letter-spacing: .04em !important;
    text-transform: uppercase !important;
    transition: background .15s !important;
    box-shadow: none !important;
    outline: none !important;
    line-height: 1.4 !important;
}
.alpecmp-wrap a.alpecmp-view-btn:hover,
.alpecmp-wrap a.alpecmp-view-btn:focus {
    background: #e07a10 !important;
    background-color: #e07a10 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}
