@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-dark: #0a0a0a;
    --sidebar-bg: #111111;
    --card-bg: #161616;
    --border: #262626;
    --primary: #10b981;
    --primary-hover: #059669;
    --text-main: #ededed;
    --text-muted: #a1a1a1;
    --sidebar-width: 240px;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* --- Layout --- */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    height: 100vh;
    position: fixed;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    z-index: 100;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem 3rem;
}

/* --- Sidebar Items --- */
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 2rem;
}

.logo-box {
    width: 28px;
    height: 28px;
    background-color: var(--primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.08);
    color: white;
    box-shadow: inset 4px 0 0 var(--primary);
    border-radius: 0 8px 8px 0;
    margin-left: -1rem;
    padding-left: 1.75rem;
}

.nav-link i { font-size: 1.1rem; }

/* --- Dashboard Cards --- */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    height: 100%;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
}

/* --- Typography --- */
h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

/* --- Enterprise Tables --- */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    padding: 0.75rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    background-color: rgba(255, 255, 255, 0.02);
}

td {
    padding: 0.875rem 0.75rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

tr:hover td {
    background-color: rgba(255, 255, 255, 0.03);
}

/* --- Status Pills --- */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-sent { background-color: rgba(16, 185, 129, 0.1); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.2); }
.status-failed { background-color: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }

/* --- Inputs --- */
.form-input {
    width: 100%;
    background-color: #1a1a1a;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    color: white;
    font-size: 0.875rem;
    outline: none;
    transition: all 0.2s;
}

.form-input:focus {
    border-color: var(--primary);
    background-color: #222;
}

/* --- Buttons --- */
.btn-primary {
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

/* --- Terminal --- */
.terminal {
    background-color: #000;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.8rem;
    padding: 1rem;
    height: 300px;
    overflow-y: auto;
    color: #10b981;
}

/* --- Utilities --- */
.mb-1 { margin-bottom: 0.25rem; }
.mb-4 { margin-bottom: 1.5rem; }
.text-muted { color: var(--text-muted); }
.small { font-size: 0.8rem; }
.fw-bold { font-weight: 700; }

@media (max-width: 1024px) {
    .sidebar { width: 70px; padding: 1rem 0.5rem; }
    .sidebar-logo span, .nav-link span { display: none; }
    .main-content { margin-left: 70px; }
    .metric-grid { grid-template-columns: 1fr 1fr; }
}

.d-none { display: none !important; }
.text-primary { color: var(--primary) !important; }
