/* --- Global Reset & Variables --- */
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --success: #10b981;
    --danger: #ef4444;
    --dark: #1e293b;
    --light: #f8fafc;
    --border: #e2e8f0;
    --text-main: #334155;
    --text-muted: #64748b;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--light);
    color: var(--text-main);
    line-height: 1.5;
}

/* --- Login Page Layout --- */
.login-bg {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--dark) 0%, #0f172a 100%);
}

.login-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-card h2 {
    margin-bottom: 1.5rem;
    color: var(--dark);
    font-weight: 700;
}

/* --- Dashboard Navigation --- */
nav {
    background: var(--dark);
    color: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav h1 {
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}

nav a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: 0.2s;
}

nav a:hover { opacity: 1; }

/* --- Main Layout --- */
.container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* For full width sections */
.full-width { grid-column: 1 / -1; }

/* --- Cards & Sections --- */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.card h2, .card h4 {
    margin-bottom: 1.25rem;
    color: var(--dark);
    border-left: 4px solid var(--primary);
    padding-left: 10px;
}

/* --- Forms & Inputs --- */
input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: border-color 0.2s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    ring: 2px var(--primary);
}

textarea {
    resize: vertical;
    min-height: 150px;
    font-family: monospace;
}

/* --- Buttons --- */
button {
    cursor: pointer;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 6px;
    transition: 0.2s;
    width: 100%;
}

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

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

button:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
}

/* --- Lists & Stats --- */
.scroll-box {
    max-height: 300px;
    overflow-y: auto;
    background: #fafafa;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.receiver-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.receiver-item:last-child { border-bottom: none; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: var(--light);
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.stat-val {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .container { grid-template-columns: 1fr; }
}

