/**
 * VeriTag Enterprise Design System
 * Compliant with 60:30:10 Rule, HCI Guidelines, and Specified Color Palette
 */

:root {
    --primary-100: #3F51B5; /* Brand Deep Indigo */
    --primary-200: #757de8; /* Lighter Indigo */
    --primary-300: #dedeff; /* Soft Indigo Tint */
    --accent-100:  #2196F3; /* Electric Cyan Blue */
    --accent-200:  #003f8f; /* Deep Cobalt Accent */
    --text-100:    #333333; /* High-contrast Primary Text */
    --text-200:    #5c5c5c; /* Secondary Body Text */
    --bg-100:      #FFFFFF; /* 60% Dominant Clean Canvas */
    --bg-200:      #f5f5f5; /* Subtle Neutral Section Surface */
    --bg-300:      #cccccc; /* Structural Borders & Muted Dividers */

    /* Semantic Status Indicators */
    --status-genuine:    #10b981;
    --status-suspicious: #f59e0b;
    --status-invalid:    #ef4444;
    --status-expired:    #8b5cf6;

    /* Elevation Shadows */
    --shadow-sm: 0 2px 4px rgba(63, 81, 181, 0.04);
    --shadow-md: 0 4px 14px rgba(63, 81, 181, 0.08);
    --shadow-lg: 0 10px 25px rgba(63, 81, 181, 0.12);
    --shadow-glow: 0 0 20px rgba(33, 150, 243, 0.35);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 50px;
}

/* Global Typography & HCI Baseline */
body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-100);
    background-color: var(--bg-200);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--primary-100);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: var(--accent-100);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: var(--accent-200);
}

/* 60% Foundation: Top Navigation Bar */
.vt-navbar {
    background-color: var(--bg-100);
    border-bottom: 1px solid rgba(63, 81, 181, 0.1);
    box-shadow: var(--shadow-sm);
    padding: 0.85rem 1.5rem;
}

.vt-brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-100) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vt-brand .badge-subdomain {
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--primary-300);
    color: var(--primary-100);
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* 30% Structural Cards & Panels */
.vt-card {
    background: var(--bg-100);
    border: 1px solid rgba(63, 81, 181, 0.08);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    margin-bottom: 1.5rem;
}

.vt-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.vt-card-header {
    border-bottom: 1px solid var(--bg-200);
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Metric / Stat Card */
.vt-stat-card {
    background: var(--bg-100);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    border-left: 4px solid var(--primary-100);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.vt-stat-card:hover {
    border-left-color: var(--accent-100);
    transform: translateY(-2px);
}

.vt-stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: var(--primary-300);
    color: var(--primary-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.vt-stat-card .stat-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--primary-100);
    line-height: 1.2;
}

.vt-stat-card .stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-200);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* 10% Accent Call-to-Actions & Buttons */
.btn-vt-primary {
    background-color: var(--primary-100);
    border-color: var(--primary-100);
    color: #ffffff;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 0.55rem 1.25rem;
    box-shadow: 0 4px 10px rgba(63, 81, 181, 0.2);
    transition: all 0.2s ease;
}
.btn-vt-primary:hover {
    background-color: var(--accent-200);
    border-color: var(--accent-200);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(63, 81, 181, 0.3);
}

.btn-vt-accent {
    background-color: var(--accent-100);
    border-color: var(--accent-100);
    color: #ffffff;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 0.55rem 1.25rem;
    box-shadow: 0 4px 10px rgba(33, 150, 243, 0.25);
    transition: all 0.2s ease;
}
.btn-vt-accent:hover {
    background-color: var(--accent-200);
    border-color: var(--accent-200);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-vt-outline {
    background: transparent;
    border: 1px solid var(--primary-200);
    color: var(--primary-100);
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 0.5rem 1.15rem;
    transition: all 0.2s ease;
}
.btn-vt-outline:hover {
    background: var(--primary-300);
    border-color: var(--primary-100);
    color: var(--primary-100);
}

/* Status Badges */
.badge-vt {
    padding: 0.4em 0.75em;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.badge-vt-genuine {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.badge-vt-suspicious {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}
.badge-vt-invalid {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.badge-vt-expired {
    background-color: #ede9fe;
    color: #5b21b6;
    border: 1px solid #ddd6fe;
}
.badge-vt-active {
    background-color: var(--primary-300);
    color: var(--primary-100);
    border: 1px solid var(--primary-200);
}

/* QR Code & Scanner Animations */
.scanner-viewport {
    position: relative;
    width: 100%;
    max-width: 380px;
    height: 380px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #000000;
    box-shadow: var(--shadow-lg);
}

.scanner-laser {
    position: absolute;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, rgba(33, 150, 243, 0) 0%, #2196F3 50%, rgba(33, 150, 243, 0) 100%);
    box-shadow: 0 0 15px #2196F3;
    animation: laserSweep 2s ease-in-out infinite alternate;
    z-index: 10;
}

@keyframes laserSweep {
    0%   { top: 5%; }
    100% { top: 92%; }
}

.scanner-target-corners {
    position: absolute;
    inset: 24px;
    border: 2px dashed rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-md);
    pointer-events: none;
    z-index: 5;
}

/* Verification Result Banner */
.verification-banner {
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    margin-bottom: 2rem;
}
.verification-banner.genuine {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid #10b981;
}
.verification-banner.suspicious {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 2px solid #f59e0b;
}
.verification-banner.invalid {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid #ef4444;
}
.verification-banner.expired {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border: 2px solid #8b5cf6;
}

.verification-icon-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.75rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-md);
}

/* Tables */
.vt-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}
.vt-table th {
    background-color: var(--bg-200);
    color: var(--primary-100);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--bg-300);
}
.vt-table td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid rgba(63, 81, 181, 0.06);
}
.vt-table tbody tr:hover {
    background-color: rgba(222, 222, 255, 0.25);
}

/* Sidebar navigation */
.vt-sidebar {
    background-color: var(--bg-100);
    min-height: calc(100vh - 65px);
    border-right: 1px solid rgba(63, 81, 181, 0.08);
    padding: 1.5rem 1rem;
}

.vt-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-200);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
}

.vt-nav-link:hover, .vt-nav-link.active {
    color: var(--primary-100);
    background-color: var(--primary-300);
}

.vt-nav-link i {
    font-size: 1.1rem;
    color: var(--primary-200);
}

.vt-nav-link.active i {
    color: var(--primary-100);
}

/* Interactive Gateway Switcher Card */
.gateway-card {
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    background: var(--bg-100);
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}
.gateway-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--primary-100);
}
.gateway-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-100);
}
.gateway-card.admin::before { background: var(--primary-100); }
.gateway-card.manufacturer::before { background: var(--accent-100); }
.gateway-card.client::before { background: #10b981; }
.gateway-card.api::before { background: #8b5cf6; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .vt-sidebar {
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(63, 81, 181, 0.08);
        padding: 0.75rem;
    }
    .scanner-viewport {
        max-width: 300px;
        height: 300px;
    }
}
