/* ============================================================
   Orkestrator.my.id — Modern CSS (v2.0)
   Self-contained, no external dependencies required
   ============================================================ */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #64748b;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-lg: 16px;
    --transition: all 0.2s ease;
}

* { box-sizing: border-box; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    margin: 0;
}

/* ===== NAVBAR ===== */
.navbar {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%) !important;
    box-shadow: var(--shadow);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.navbar-brand {
    font-weight: 700;
    font-size: 1.35rem;
    color: #fff !important;
    letter-spacing: -0.02em;
}
.navbar-brand:hover { color: #e0e7ff !important; }
.nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: var(--transition);
}
.nav-link:hover { background: rgba(255,255,255,0.1); color: #fff !important; }
.nav-link i { width: 1.25em; text-align: center; }

/* ===== HERO ===== */
.hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    color: #fff;
    padding: 3.5rem 0;
    margin-bottom: 2.5rem;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 36v-4H0v4H0v2h6v4h2v-4h6v-2H6zM6 6V0H0v4H0v2h6v4h2V6h6V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}
.hero h1 { font-weight: 800; font-size: 2.5rem; margin-bottom: 0.75rem; letter-spacing: -0.02em; }
.hero p.lead { font-size: 1.25rem; font-weight: 400; opacity: 0.9; }
.hero .small { opacity: 0.75; font-size: 0.95rem; }

/* ===== CARDS ===== */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--bg-card);
    transition: var(--transition);
    overflow: hidden;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}
.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}
.card-body { padding: 1.5rem; }
.card-footer {
    background: transparent;
    border-top: 1px solid var(--border);
    padding: 1rem 1.5rem;
}

/* Agent Card */
.agent-card { cursor: pointer; text-decoration: none; color: inherit; }
.agent-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: var(--transition);
}
.agent-card:hover .agent-icon { transform: scale(1.05) rotate(3deg); }
.agent-card h6 { font-weight: 700; font-size: 1.05rem; margin-bottom: 0.25rem; }
.agent-card p { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.5rem; }

/* Stats Cards */
.stat-card {
    text-align: center;
    padding: 2rem 1.5rem;
}
.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #fff;
    margin-bottom: 1rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.stat-card h4 { font-size: 2.25rem; font-weight: 800; margin-bottom: 0.25rem; color: var(--text); }
.stat-card p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

/* ===== BADGES ===== */
.badge-status {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.badge-status i { font-size: 0.55rem; }
.status-online { background: #dcfce7; color: #16a34a; }
.status-offline { background: #fef2f2; color: #dc2626; }
.status-maintenance { background: #fef3c7; color: #f59e0b; }

/* ===== BUTTONS ===== */
.btn {
    font-weight: 600;
    padding: 0.7rem 1.5rem;
    border-radius: 10px;
    transition: var(--transition);
    border: none;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}
.btn-lg { padding: 0.875rem 2rem; font-size: 1.05rem; }
.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}
.btn-outline-primary:hover {
    background: var(--primary);
    color: #fff;
}

/* ===== FOOTER ===== */
.footer {
    margin-top: 4rem;
    padding: 2.5rem 0;
    background: #1e293b;
    color: #94a3b8;
    text-align: center;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.footer p { margin: 0.25rem 0; }
.footer strong { color: #fff; }

/* ===== UTILITIES ===== */
.text-muted { color: var(--text-muted) !important; }
.shadow-sm { box-shadow: var(--shadow) !important; }
.rounded-xl { border-radius: var(--radius-lg) !important; }

/* ===== ICONS (Font Awesome subset inline fallback) ===== */
@font-face {

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeInUp 0.5s ease forwards; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero { padding: 2.5rem 0; border-radius: 0 0 16px 16px; }
    .hero h1 { font-size: 2rem; }
    .stat-card h4 { font-size: 1.75rem; }
    .navbar-brand { font-size: 1.2rem; }
    .btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
}

/* ===== PRINT ===== */
@media print {
    .navbar, .footer, .btn { display: none !important; }
    .card { box-shadow: none; border: 1px solid #ccc; }
}

/* ===== LOADING STATE ===== */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== ACCESSIBILITY ===== */
:focus-visible {
    outline: 3px solid var(--primary-light);
    outline-offset: 2px;
}
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: var(--primary);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    z-index: 10000;
}
.skip-link:focus { top: 1rem; }
