:root {
    --primary: #0f172a;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --bg: #f1f5f9;
    --surface: #ffffff;
    --border: #e2e8f0;
    --text: #1e293b;
    --muted: #64748b;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --pub-color: #2563eb;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
}

.pub-themed .btn-primary,
.pub-themed .logo-badge {
    background: var(--pub-color);
    border-color: var(--pub-color);
}

.pub-themed .pub-card.selected {
    border-color: var(--pub-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--pub-color) 18%, transparent);
}

.sub-preview-wrapper {
    margin-top: 2rem;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #d1d5db;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.sub-preview-topbar {
    background: #ffffff;
    padding: 1.1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e5e7eb;
}

.sub-preview-topbar img {
    max-height: 44px;
    max-width: 240px;
    object-fit: contain;
}

.sub-preview-stage {
    background: #eceef1;
    padding: 2.5rem 1.25rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sub-offer-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border: 2px solid var(--preview-accent, #ce171e);
    border-radius: 18px;
    padding: 2.25rem 2rem;
    text-align: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.sub-offer-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.55rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
}

.sub-offer-desc {
    font-size: 0.98rem;
    color: #374151;
    margin-bottom: 1.15rem;
}

.sub-offer-price {
    font-size: 1.15rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1.6rem;
}

.sub-offer-btn {
    display: inline-block;
    width: 100%;
    max-width: 260px;
    padding: 0.85rem 1.5rem;
    background: var(--preview-accent, #ce171e);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 6px;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.sub-offer-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.navbar {
    background: var(--primary);
    color: #fff;
    padding: 0.85rem 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.nav-brand {
    font-weight: 700;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.logo-badge {
    background: var(--accent);
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 800;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
}

.nav-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
    transition: 0.2s;
}

.nav-links a:hover {
    color: #fff;
}

.nav-user-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.notif-wrapper {
    position: relative;
    cursor: pointer;
    font-size: 1.2rem;
}

.notif-count {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--danger);
    color: #fff;
    font-size: 0.7rem;
    padding: 1px 5px;
    border-radius: 99px;
    font-weight: 700;
}

.notif-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 35px;
    width: 320px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 100;
    max-height: 255px; /* Fits ~2 notification items cleanly and scrolls for more */
    overflow-y: auto;
}

.notif-dropdown.show {
    display: block;
}

.notif-header {
    position: sticky;
    top: 0;
    background: var(--surface);
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    z-index: 1;
}

.notif-item {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    line-height: 1.4;
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-item.unread {
    background: #eff6ff;
}

.notif-empty {
    padding: 15px;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
}

.container {
    max-width: 1220px;
    margin: 2rem auto;
    padding: 0 1.25rem;
}

.page-header {
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.65rem;
    font-weight: 700;
}

.page-header p {
    color: var(--muted);
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}

.kpi-label {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 500;
}

.kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 6px;
}

.pub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 10px;
}

.pub-card {
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    background: #f8fafc;
}

.pub-card:hover {
    border-color: var(--accent);
}

.pub-card.selected {
    border-color: var(--accent);
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.pub-card img {
    max-height: 55px;
    max-width: 100%;
    object-fit: contain;
    margin-bottom: 10px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 5px;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.btn {
    display: inline-block;
    padding: 0.65rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    border: none;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-dark {
    background: var(--primary);
    color: #fff;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-outline {
    border: 1px solid var(--border);
    background: transparent;
    color: inherit;
}

.btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.82rem;
}

.btn-block {
    width: 100%;
}

.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.table th,
.table td {
    padding: 0.85rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--muted);
}

.badge {
    padding: 3px 9px;
    border-radius: 99px;
    font-size: 0.76rem;
    font-weight: 600;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #e0f2fe;
    color: #075985;
}

.badge-neutral {
    background: #e2e8f0;
    color: #334155;
}

.alert {
    padding: 0.85rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.copy-box {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.auth-card {
    background: var(--surface);
    width: 100%;
    max-width: 440px;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.auth-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.25rem;
}

.tab-btn {
    flex: 1;
    padding: 0.6rem;
    background: none;
    border: none;
    font-weight: 600;
    cursor: pointer;
    color: var(--muted);
}

.tab-btn.active {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    margin-bottom: -2px;
}

.arena-custom-logo {
    height: 60px;
    max-height: 68px;
    max-width: 280px;
    width: auto;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.auth-logo .arena-custom-logo {
    height: 120px;
    max-height: 135px;
    max-width: 340px;
    margin: 0 auto 10px;
    display: block;
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }

    .form-row-2 {
        grid-template-columns: 1fr;
    }

    .copy-box {
        flex-direction: column;
    }

    .arena-custom-logo {
        height: 48px;
        max-height: 54px;
        max-width: 220px;
    }

    .auth-logo .arena-custom-logo {
        height: 96px;
        max-height: 110px;
        max-width: 280px;
    }
}

.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.pagination-info {
    font-size: 0.88rem;
    color: var(--muted);
}

.pagination-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.65rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: 0.15s ease;
}

a.page-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.page-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

.page-btn.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.page-ellipsis {
    padding: 0 0.25rem;
    color: var(--muted);
    font-weight: 600;
}

@media (max-width: 600px) {
    .pagination-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}