/* AntiTheft Shield - Clean High-Contrast Light Theme UI */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-card-elevated: #f1f5f9;
    --border-subtle: #e2e8f0;
    --border-strong: #cbd5e1;
    
    --primary: #0284c7;
    --primary-hover: #0369a1;
    --accent: #6366f1;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #0284c7;
    
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --bs-body-bg: #f8fafc;
    --bs-body-color: #334155;
    --bs-heading-color: #0f172a;
}

* {
    box-sizing: border-box;
}

html, body {
    font-family: var(--font-main);
    background-color: #f8fafc !important;
    color: #334155 !important;
    min-height: 100vh;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
}

/* Headings */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    color: #0f172a !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em;
}

p, span, div, li, label {
    color: #334155;
}

.text-dark-title {
    color: #0f172a !important;
}

.text-dark {
    color: #0f172a !important;
}

.text-muted {
    color: #64748b !important;
}

.text-primary-accent {
    color: #0284c7 !important;
}

/* Clean Surface Cards */
.card, .glass-card, .card-pro {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover, .glass-card:hover, .card-pro:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

/* Navbar */
.navbar-custom {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.25rem;
    color: #0f172a !important;
    letter-spacing: -0.03em;
}

.brand-badge {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #0284c7, #2563eb);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

.nav-link {
    color: #475569 !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.55rem 1rem !important;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.nav-link:hover {
    color: #0284c7 !important;
    background-color: #f1f5f9;
}

.nav-link.active {
    color: #ffffff !important;
    background-color: #0284c7 !important;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

/* Stat Cards */
.stat-card {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.25rem 1.4rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.02);
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b !important;
    margin-bottom: 0.4rem;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: #0f172a !important;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.stat-icon-blue { background: #e0f2fe; color: #0284c7; border: 1px solid #bae6fd; }
.stat-icon-green { background: #dcfce7; color: #16a34a; border: 1px solid #bbf7d0; }
.stat-icon-red { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }
.stat-icon-gold { background: #fef3c7; color: #d97706; border: 1px solid #fde68a; }

/* Online Pulse Indicator */
.pulse-online {
    display: inline-block;
    width: 9px;
    height: 9px;
    background-color: #16a34a;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
    animation: pulseGlow 1.8s infinite;
}

.pulse-offline {
    display: inline-block;
    width: 9px;
    height: 9px;
    background-color: #94a3b8;
    border-radius: 50%;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7); }
    70% { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0); }
    100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

/* Quick Action Action Tiles */
.action-tile {
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
    font-weight: 600;
    padding: 0.9rem 1.1rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    transition: all 0.2s ease;
}

.action-tile:hover {
    background-color: #f1f5f9 !important;
    border-color: #0284c7 !important;
    color: #0284c7 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Tables */
.table-custom {
    color: #0f172a !important;
    vertical-align: middle;
    margin-bottom: 0;
    background-color: #ffffff !important;
}

.table-custom thead th {
    background-color: #f8fafc !important;
    color: #475569 !important;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 0.85rem 1rem;
}

.table-custom tbody td {
    padding: 0.9rem 1rem;
    color: #0f172a !important;
    background-color: #ffffff !important;
    border-bottom: 1px solid #f1f5f9;
}

.table-custom tbody tr:hover td {
    background-color: #f8fafc !important;
}

/* Badges */
.badge {
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.4em 0.75em;
    border-radius: 6px;
}

.badge-pro {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(245, 158, 11, 0.3);
}

.badge-free {
    background-color: #f1f5f9;
    color: #64748b !important;
    border: 1px solid #e2e8f0;
}

/* Code Pills */
.code-badge {
    font-family: var(--font-mono);
    background-color: #f1f5f9;
    color: #0284c7 !important;
    border: 1px solid #e2e8f0;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #0284c7, #0ea5e9) !important;
    border: none !important;
    font-weight: 600;
    color: #ffffff !important;
    border-radius: 9px;
    padding: 0.55rem 1.1rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0369a1, #0284c7) !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
    transform: translateY(-1px);
}

.btn-action {
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
    border-radius: 8px;
    font-weight: 600;
}

/* Forms */
.form-control, .form-select {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    border-radius: 9px;
    padding: 0.55rem 0.85rem;
}

.form-control:focus, .form-select:focus {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
    background-color: #ffffff !important;
    color: #0f172a !important;
}

.form-control::placeholder {
    color: #94a3b8 !important;
}

/* Modals */
.modal-content {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.modal-header, .modal-footer {
    border-color: #e2e8f0 !important;
    background-color: #ffffff !important;
}

.modal-body {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

/* Intruder Thumbnails */
.intruder-thumb {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.intruder-thumb:hover {
    transform: scale(1.08);
    border-color: #0284c7;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Map */
#leaflet-map, #device-map {
    height: 380px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    z-index: 1;
}
