/* 1. Variables & Reset */
:root {
    --primary: #2563eb;          /* Cironet Blue */
    --primary-hover: #1d4ed8;
    --dark: #0f172a;             /* Sidebar Background */
    --light-bg: #f8fafc;
    --text-main: #334155;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --white: #ffffff;
    --sidebar-width: 260px;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-main);
    display: flex; /* Creates the Sidebar/Content split */
    min-height: 100vh;
}

/* 2. Sidebar (Fixed Left) */
.sidebar {
    width: var(--sidebar-width);
    background: var(--dark);
    color: var(--white);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.sidebar h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 40px;
    letter-spacing: -1px;
}

.sidebar h2 span { color: var(--primary); }

.sidebar a {
    display: flex;
    align-items: center;
    color: #94a3b8;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar a i { margin-right: 12px; width: 20px; }

.sidebar a:hover, .sidebar a.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
}

.sidebar a.active {
    background: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* 3. Main Content Wrapper */
.main-wrapper {
    margin-left: var(--sidebar-width); /* Pushes content past the fixed sidebar */
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevents flex items from overflowing */
}

.main-content {
    padding: 40px;
    flex: 1; /* Pushes footer to bottom */
}

/* 4. UI Components (Cards & Tables) */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

h1 { font-size: 28px; color: var(--dark); font-weight: 700; margin-bottom: 8px; }

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 12px 16px;
    border-bottom: 2px solid var(--light-bg);
}

td {
    padding: 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

/* 5. Status Badges */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-sent { background: #dcfce7; color: #166534; }
.status-failed { background: #fee2e2; color: #991b1b; }
.bg-api { background: #e0f2fe; color: #0369a1; }
.bg-web { background: #fef9c3; color: #854d0e; }

/* 6. Footer (The "Floating Fix") */
.main-footer {
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 13px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
}