* {
    margin: 0; padding: 0; box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5; color: #1a1a2e; line-height: 1.6;
}
.container {
    max-width: 98%; margin: 0 auto; padding: 16px 10px;
}
a { color: #4361ee; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header/Hero */
.hero { text-align: center; padding: 60px 20px; }
.hero h1 { font-size: 3em; margin-bottom: 10px; }
.hero p { font-size: 1.2em; color: #666; margin-bottom: 25px; }

/* Navigation */
.admin-nav {
    background: #1a1a2e; color: white; padding: 0 10px;
    display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 100;
}
.nav-brand { font-size: 1em; font-weight: 700; }
.nav-links { display: flex; gap: 0; }
.nav-links a {
    color: #ccc; padding: 12px 12px; display: block;
    font-size: 0.85em; transition: 0.2s; text-decoration: none;
}
.nav-links a:hover, .nav-links a.active { background: rgba(255,255,255,0.1); color: white; }
.nav-logout { color: #f8a5a5 !important; }

/* Buttons */
.btn {
    display: inline-block; padding: 10px 24px; background: #4361ee; color: white;
    text-decoration: none; border-radius: 8px; border: none; cursor: pointer;
    font-size: 0.95em; transition: 0.2s; text-align: center;
}
.btn:hover { background: #3651d4; text-decoration: none; }
.btn-secondary { background: #6c757d; }
.btn-secondary:hover { background: #5a6268; }
.btn-danger { background: #dc3545; }
.btn-danger:hover { background: #c82333; }
.btn-small { padding: 5px 12px; font-size: 0.85em; }
.btn-lg { padding: 14px 36px; font-size: 1.1em; }
.btn-block { display: block; width: 100%; margin-bottom: 8px; }

/* Cards */
.card {
    background: white; padding: 18px; border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08); margin-bottom: 16px;
}
.features {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px; margin-top: 40px;
}
.feature-card {
    background: white; padding: 30px 20px; border-radius: 12px;
    text-align: center; box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.feature-icon { font-size: 2.5em; margin-bottom: 10px; }
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { color: #666; font-size: 0.9em; }

/* Stats */
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px; margin: 25px 0;
}
.stat-card {
    background: white; padding: 25px; border-radius: 12px;
    text-align: center; box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.stat-value { font-size: 2.2em; font-weight: 700; color: #4361ee; }
.stat-label { font-size: 0.9em; color: #666; margin-top: 5px; }
.text-success { color: #28a745 !important; }
.text-danger { color: #dc3545 !important; }

/* Forms */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 0.9em; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 10px 14px; border: 1px solid #ddd;
    border-radius: 8px; font-size: 0.95em; transition: 0.2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none; border-color: #4361ee; box-shadow: 0 0 0 3px rgba(67,97,238,0.1);
}
.form-row { display: flex; gap: 15px; margin-bottom: 15px; }
.form-row .form-group { flex: 1; margin-bottom: 0; }
.code-editor { font-family: monospace; font-size: 0.9em; }

/* Two column layout */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Tables */
.table-wrapper { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td {
    padding: 10px 14px; text-align: left; font-size: 0.9em; border-bottom: 1px solid #eee;
}
.data-table th { background: #f8f9fa; font-weight: 600; color: #555; font-size: 0.85em; }
.data-table tr:hover td { background: #f8f9fa; }

/* Page header */
.page-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px;
}
.page-header h1 { margin-bottom: 0; }

/* Alerts */
.alert { padding: 12px 18px; border-radius: 8px; margin-bottom: 20px; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }

/* Login */
.login-card { max-width: 400px; margin: 80px auto; background: white; padding: 40px; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.login-card h1 { text-align: center; margin-bottom: 25px; }

/* Badges */
.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 0.85em; font-weight: 600; }
.badge-pending { background: #fff3cd; color: #856404; }
.badge-approved { background: #d4edda; color: #155724; }
.badge-completed { background: #d4edda; color: #155724; }
.badge-cancelled, .badge-bounced { background: #f8d7da; color: #721c24; }
.badge-draft { background: #e2e3e5; color: #383d41; }
.badge-sending { background: #cce5ff; color: #004085; }
.badge-active { background: #d4edda; color: #155724; }
.badge-unsubscribed { background: #e2e3e5; color: #383d41; }
.badge-refunded { background: #f8d7da; color: #721c24; }
.badge-sent { background: #d4edda; color: #155724; }
.badge-failed { background: #f8d7da; color: #721c24; }
.badge-opened { background: #cce5ff; color: #004085; }

/* Template items */
.template-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0; border-bottom: 1px solid #eee;
}
.template-item:last-child { border-bottom: none; }
.template-actions { display: flex; gap: 6px; }

/* Quick actions */
.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
hr { margin: 20px 0; border: none; border-top: 1px solid #eee; }
.smtp-help p { font-size: 0.85em; color: #555; margin-bottom: 4px; }
.small { font-size: 0.85em; }
.text-muted { color: #888; }
.text-center { text-align: center; }

/* Import Steps */
.import-steps { display: flex; gap: 10px; margin-bottom: 20px; justify-content: center; }
.step { display: flex; align-items: center; gap: 6px; font-size: 0.85em; color: #aaa; }
.step.active { color: #4361ee; font-weight: 600; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: #ddd; color: white; font-size: 12px; font-weight: 700; }
.step.active .step-num { background: #4361ee; }
.input-hint { font-size: 0.8em; color: #888; margin-bottom: 3px; }

/* Responsive */
@media (max-width: 768px) {
    .admin-nav { flex-direction: column; }
    .nav-links { flex-wrap: wrap; }
    .nav-links a { padding: 10px 12px; font-size: 0.8em; }
    .two-col { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; }
    .form-row .form-group { margin-bottom: 15px; }
    .hero h1 { font-size: 2em; }
    .page-header { flex-direction: column; gap: 10px; }
}
