/* ═══════════════════════════════════════════════════════════════
   ZeeApps — Enterprise App Governance Platform
   apps.zeemedia.com
   ═══════════════════════════════════════════════════════════════ */

:root {
    --sidebar-bg:      #1a2236;
    --sidebar-width:   260px;
    --topbar-height:   64px;
    --content-bg:      #f0f2f8;
    --card-bg:         #ffffff;
    --card-shadow:     0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --card-shadow-md:  0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.05);
    --card-radius:     10px;
    --primary:         #3b5bdb;
    --primary-dark:    #2f4ac4;
    --primary-light:   #eef2ff;
    --brand:           #e30613;
    --brand-light:     #fff0f0;
    --success:         #0ca678;
    --success-light:   #e6fcf5;
    --warning:         #f08c00;
    --warning-light:   #fff9db;
    --danger:          #e03131;
    --danger-light:    #fff5f5;
    --info:            #1971c2;
    --info-light:      #e7f5ff;
    --text-primary:    #1a2236;
    --text-secondary:  #495057;
    --text-muted:      #868e96;
    --border:          #dee2e6;
    --border-light:    #f1f3f5;
    --sidebar-text:    rgba(255,255,255,0.65);
    --sidebar-border:  rgba(255,255,255,0.07);
}

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

html { height: 100%; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--content-bg);
    height: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }

/* ═══════════════════════════════════════════════════════════════
   ADMIN LAYOUT
   ═══════════════════════════════════════════════════════════════ */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--content-bg);
    min-width: 0;
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════ */
.admin-sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0; top: 0; bottom: 0;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Logo area */
.sidebar-logo {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
}

.sidebar-logo-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--brand) 0%, #7c3aed 100%);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(227,6,19,0.3);
}

.sidebar-brand-text { color: white; font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }
.sidebar-brand-sub  { font-size: 9px; font-weight: 600; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 0.08em; }

/* Platform domain badge */
.sidebar-domain {
    margin: 0 12px 4px;
    background: rgba(59,91,219,0.2);
    border: 1px solid rgba(59,91,219,0.3);
    border-radius: 7px;
    padding: 8px 12px;
    display: flex; align-items: center; gap: 8px;
}
.sidebar-domain-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #40c057; box-shadow: 0 0 6px rgba(64,192,87,0.6);
    flex-shrink: 0;
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot { 0%,100%{opacity:1} 50%{opacity:0.5} }
.sidebar-domain-name { font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.75); }

/* Nav */
.sidebar-nav { flex: 1; padding: 6px 0 12px; overflow-y: auto; }

.sidebar-section {
    padding: 14px 18px 5px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.22);
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 1px 8px;
    padding: 9px 12px;
    border-radius: 7px;
    color: var(--sidebar-text);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-item:hover { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.9); }
.sidebar-item.active { background: rgba(59,91,219,0.3); color: #fff; font-weight: 600; }
.sidebar-item.active .si-icon { opacity: 1; }

.si-icon { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.6; }
.sidebar-item:hover .si-icon { opacity: 0.9; }
.sidebar-item.active .si-icon { opacity: 1; }

.sidebar-badge {
    margin-left: auto;
    background: rgba(59,91,219,0.4);
    color: rgba(255,255,255,0.8);
    font-size: 10px; font-weight: 700;
    padding: 1px 7px; border-radius: 10px;
}

/* Footer */
.sidebar-footer {
    border-top: 1px solid var(--sidebar-border);
    padding: 10px 10px;
    flex-shrink: 0;
}

.sidebar-user-row {
    display: flex; align-items: center; gap: 10px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}
.sidebar-user-row:hover { background: rgba(255,255,255,0.06); }

.sidebar-avatar {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--brand), #7c3aed);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 12px; font-weight: 700; flex-shrink: 0;
}

.sidebar-user-name { color: rgba(255,255,255,0.85); font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { color: rgba(255,255,255,0.35); font-size: 10.5px; }

.sidebar-logout-btn {
    background: none; border: none;
    color: rgba(255,255,255,0.25);
    cursor: pointer; padding: 4px; border-radius: 5px;
    transition: color 0.15s; margin-left: auto; flex-shrink: 0;
}
.sidebar-logout-btn:hover { color: var(--danger); background: rgba(224,49,49,0.12); }

/* ═══════════════════════════════════════════════════════════════
   TOPBAR
   ═══════════════════════════════════════════════════════════════ */
.admin-topbar {
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid var(--border-light);
    display: flex; align-items: center;
    padding: 0 24px; gap: 12px;
    position: sticky; top: 0; z-index: 50;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.topbar-search {
    display: flex; align-items: center; gap: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 13px; color: var(--text-muted);
    min-width: 220px; cursor: pointer;
    transition: all 0.15s; font-family: inherit;
    outline: none;
}
.topbar-search:hover { border-color: #ced4da; background: white; }

.topbar-kbd {
    margin-left: auto; background: white; border: 1px solid #dee2e6;
    border-radius: 4px; padding: 1px 6px; font-size: 10px; color: var(--text-muted);
}

.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.topbar-icon-btn {
    width: 34px; height: 34px;
    border-radius: 7px; border: 1px solid #e9ecef;
    background: white; color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.15s; position: relative;
}
.topbar-icon-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

.topbar-badge {
    position: absolute; top: -4px; right: -4px;
    background: var(--danger); color: white;
    font-size: 9px; font-weight: 700;
    min-width: 16px; height: 16px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid white; padding: 0 3px;
}

.topbar-user {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 10px; border-radius: 7px; cursor: pointer;
    transition: background 0.15s; border: 1px solid #e9ecef;
}
.topbar-user:hover { background: #f8f9fa; }

.topbar-avatar {
    width: 30px; height: 30px; border-radius: 7px;
    background: linear-gradient(135deg, var(--brand), #7c3aed);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 12px; font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════
   PAGE CONTENT
   ═══════════════════════════════════════════════════════════════ */
.admin-content { flex: 1; padding: 24px 28px; }

.page-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    margin-bottom: 24px;
}
.page-title  { font-size: 20px; font-weight: 700; color: var(--text-primary); line-height: 1.2; }

.breadcrumb {
    display: flex; align-items: center; gap: 5px;
    font-size: 12px; color: var(--text-muted); margin-top: 4px;
}
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════
   PLATFORM BANNER (Dashboard top)
   ═══════════════════════════════════════════════════════════════ */
.platform-banner {
    background: linear-gradient(135deg, #1a2236 0%, #2d3a56 50%, #1a3a5c 100%);
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 24px;
    display: flex; align-items: center; justify-content: space-between;
    position: relative; overflow: hidden;
    box-shadow: 0 4px 20px rgba(26,34,54,0.25);
}

.platform-banner::before {
    content: '';
    position: absolute; top: -60px; right: -60px;
    width: 240px; height: 240px;
    border-radius: 50%; background: rgba(59,91,219,0.12);
}
.platform-banner::after {
    content: '';
    position: absolute; bottom: -80px; right: 100px;
    width: 300px; height: 300px;
    border-radius: 50%; background: rgba(124,58,237,0.08);
}

.platform-banner-left { position: relative; z-index: 1; }
.platform-banner-greeting { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.5); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; }
.platform-banner-title { font-size: 22px; font-weight: 800; color: white; margin-bottom: 4px; }
.platform-banner-sub { font-size: 13px; color: rgba(255,255,255,0.55); margin-bottom: 18px; }

.platform-banner-actions { display: flex; gap: 10px; }
.banner-btn-primary {
    background: white; color: var(--primary);
    border: none; border-radius: 7px; padding: 8px 18px;
    font-size: 13px; font-weight: 700; cursor: pointer;
    text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
    transition: all 0.15s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.banner-btn-primary:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.2); transform: translateY(-1px); }
.banner-btn-ghost {
    background: rgba(255,255,255,0.1); color: white;
    border: 1px solid rgba(255,255,255,0.2); border-radius: 7px; padding: 8px 18px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
    transition: all 0.15s;
}
.banner-btn-ghost:hover { background: rgba(255,255,255,0.18); }

.platform-banner-right { position: relative; z-index: 1; display: flex; gap: 20px; }

.banner-stat {
    text-align: center;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px; padding: 14px 20px; min-width: 90px;
}
.banner-stat-value { font-size: 24px; font-weight: 800; color: white; line-height: 1; margin-bottom: 4px; }
.banner-stat-label { font-size: 10px; font-weight: 600; color: rgba(255,255,255,0.45); text-transform: uppercase; letter-spacing: 0.07em; }

/* Gateway status strip */
.gateway-strip {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 12px 20px;
    margin-bottom: 24px;
    display: flex; align-items: center; gap: 24px;
    box-shadow: var(--card-shadow);
}
.gateway-strip-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); margin-right: 8px; }
.gateway-item { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-secondary); }
.gateway-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.gateway-dot.online  { background: var(--success); box-shadow: 0 0 5px rgba(12,166,120,0.5); animation: pulse-dot 2s ease-in-out infinite; }
.gateway-dot.warning { background: var(--warning); }
.gateway-dot.offline { background: var(--danger); }

/* ═══════════════════════════════════════════════════════════════
   STAT CARDS
   ═══════════════════════════════════════════════════════════════ */
.stat-card {
    background: white; border-radius: var(--card-radius);
    padding: 18px 20px; box-shadow: var(--card-shadow);
    border: 1px solid var(--border-light);
    transition: box-shadow 0.2s, transform 0.2s;
}
.stat-card:hover { box-shadow: var(--card-shadow-md); transform: translateY(-1px); }

.stat-label {
    font-size: 11px; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 8px;
}
.stat-value { font-size: 28px; font-weight: 800; color: var(--text-primary); line-height: 1; margin-bottom: 8px; }

.stat-trend { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.stat-trend.up   { background: var(--success-light); color: var(--success); }
.stat-trend.down { background: var(--danger-light); color: var(--danger); }
.stat-trend.flat { background: #f1f3f5; color: var(--text-muted); }

.stat-icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }

/* ═══════════════════════════════════════════════════════════════
   ADMIN CARDS
   ═══════════════════════════════════════════════════════════════ */
.admin-card {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.admin-card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #f3f4f6;
}

.admin-card-title { font-size: 13.5px; font-weight: 700; color: var(--text-primary); }
.admin-card-sub   { font-size: 11.5px; color: var(--text-muted); }
.admin-card-body  { padding: 20px; }

/* Colored left-border accent cards */
.accent-card {
    background: white; border-radius: var(--card-radius);
    padding: 16px 18px; box-shadow: var(--card-shadow);
    border: 1px solid var(--border-light);
    border-left: 3px solid;
}
.accent-card.primary { border-left-color: var(--primary); }
.accent-card.success { border-left-color: var(--success); }
.accent-card.warning { border-left-color: var(--warning); }
.accent-card.danger  { border-left-color: var(--danger); }

/* Feature showcase cards */
.feature-card {
    background: white; border-radius: var(--card-radius);
    padding: 20px; box-shadow: var(--card-shadow);
    border: 1px solid var(--border-light);
    transition: box-shadow 0.2s;
}
.feature-card:hover { box-shadow: var(--card-shadow-md); }
.feature-card-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; margin-bottom: 12px;
}
.feature-card-title { font-size: 13.5px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.feature-card-desc  { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* ═══════════════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════════════ */
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }

.admin-table th {
    text-align: left; padding: 10px 18px;
    font-size: 10.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em;
    color: var(--text-muted); background: #f8f9fa;
    border-bottom: 1px solid var(--border-light); white-space: nowrap;
}

.admin-table td {
    padding: 12px 18px; color: var(--text-primary);
    border-bottom: 1px solid #f3f4f6; vertical-align: middle;
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td { background: #fafbff; }

/* ═══════════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════════ */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px; border-radius: 20px;
    font-size: 11px; font-weight: 600; white-space: nowrap;
}
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger  { background: var(--danger-light);  color: var(--danger); }
.badge-info    { background: var(--info-light);    color: var(--info); }
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-purple  { background: #f3f0ff; color: #7c3aed; }
.badge-gray    { background: #f1f3f5; color: #495057; }

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    border-radius: 7px; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: all 0.15s; font-family: inherit;
    border: 1px solid transparent; padding: 8px 16px;
    text-decoration: none;
}
.btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 4px 12px rgba(59,91,219,0.3); transform: translateY(-1px); }
.btn-brand   { background: var(--brand); color: white; border-color: var(--brand); }
.btn-brand:hover { background: #c30511; }
.btn-outline { background: white; color: var(--text-secondary); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-danger  { background: var(--danger); color: white; border-color: var(--danger); }
.btn-danger:hover  { background: #c92a2a; }
.btn-success { background: var(--success); color: white; border-color: var(--success); }
.btn-ghost   { background: transparent; color: var(--text-secondary); border-color: transparent; }
.btn-ghost:hover { background: #f1f3f5; }
.btn-sm  { padding: 5px 11px; font-size: 12px; border-radius: 6px; }
.btn-xs  { padding: 3px 8px; font-size: 11px; border-radius: 5px; }
.btn-lg  { padding: 10px 22px; font-size: 14px; border-radius: 8px; }

/* ═══════════════════════════════════════════════════════════════
   FORM INPUTS
   ═══════════════════════════════════════════════════════════════ */
.admin-input {
    width: 100%; padding: 9px 13px;
    border: 1px solid var(--border); border-radius: 7px;
    font-size: 13.5px; color: var(--text-primary);
    background: white; outline: none;
    transition: border-color 0.15s, box-shadow 0.15s; font-family: inherit;
}
.admin-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,91,219,0.1); }

.admin-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-group  { margin-bottom: 16px; }

/* ═══════════════════════════════════════════════════════════════
   KILL SWITCH TOGGLE
   ═══════════════════════════════════════════════════════════════ */
.ks-toggle { position: relative; display: inline-block; width: 38px; height: 22px; }
.ks-toggle input { opacity: 0; width: 0; height: 0; }
.ks-slider { position: absolute; cursor: pointer; inset: 0; background: #dee2e6; border-radius: 22px; transition: 0.25s; }
.ks-slider::before { content: ''; position: absolute; height: 16px; width: 16px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.25s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.ks-toggle input:checked + .ks-slider { background: var(--danger); }
.ks-toggle input:checked + .ks-slider::before { transform: translateX(16px); }

/* ═══════════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed; inset: 0; z-index: 500;
    background: rgba(10,15,30,0.5); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; padding: 24px;
}

.modal-card {
    background: white; border-radius: 14px; width: 100%; max-width: 460px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.2); overflow: hidden;
}

.modal-card-lg { max-width: 600px; }

.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 22px; border-bottom: 1px solid var(--border-light);
}

.modal-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }

.modal-close {
    background: none; border: none; font-size: 16px; cursor: pointer;
    color: var(--text-muted); width: 28px; height: 28px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.modal-close:hover { background: #f1f5f9; color: var(--text-primary); }

.modal-body { padding: 22px; }

/* ═══════════════════════════════════════════════════════════════
   NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════ */
.notif-dropdown {
    position: absolute; right: 0; top: calc(100% + 8px);
    width: 340px; background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border: 1px solid var(--border-light); z-index: 200; overflow: hidden;
}

.notif-header { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--border-light); }
.notif-title  { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.notif-item   { display: flex; gap: 12px; padding: 11px 16px; border-bottom: 1px solid #f8f9fa; cursor: pointer; transition: background 0.1s; }
.notif-item:hover { background: #fafbff; }
.notif-item.unread { background: #fafbff; }

/* ═══════════════════════════════════════════════════════════════
   ACTIVITY FEED
   ═══════════════════════════════════════════════════════════════ */
.activity-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 20px; border-bottom: 1px solid #f3f4f6;
    transition: background 0.1s;
}
.activity-item:hover { background: #fafbff; }
.activity-item:last-child { border-bottom: none; }
.activity-icon {
    width: 32px; height: 32px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; flex-shrink: 0; margin-top: 1px;
}

/* ═══════════════════════════════════════════════════════════════
   APP GATEWAY CARDS
   ═══════════════════════════════════════════════════════════════ */
.gateway-app-card {
    background: white; border-radius: var(--card-radius);
    border: 1px solid var(--border-light); box-shadow: var(--card-shadow);
    padding: 16px 18px;
    display: flex; align-items: center; gap: 14px;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.gateway-app-card:hover { box-shadow: var(--card-shadow-md); border-color: #c5d0fa; }
.gateway-app-icon {
    width: 42px; height: 42px; border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-light), #e0e7ff);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   UNIVERSAL SEARCH
   ═══════════════════════════════════════════════════════════════ */
.search-overlay {
    position: fixed; inset: 0; background: rgba(15,23,42,0.5);
    backdrop-filter: blur(4px); z-index: 1000;
    display: flex; align-items: flex-start; justify-content: center; padding-top: 80px;
}
.search-modal { background: white; border-radius: 14px; width: 100%; max-width: 580px; box-shadow: 0 20px 60px rgba(0,0,0,0.2); overflow: hidden; }
.search-input-row { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border-light); }
.search-input-field { flex: 1; border: none; outline: none; font-size: 15px; color: var(--text-primary); font-family: inherit; }
.search-results { max-height: 400px; overflow-y: auto; }
.search-group-label { padding: 10px 18px 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.search-result-item { display: flex; align-items: center; gap: 12px; padding: 10px 18px; cursor: pointer; transition: background 0.1s; }
.search-result-item:hover { background: #f8f9fa; }

/* ═══════════════════════════════════════════════════════════════
   EMPTY STATES
   ═══════════════════════════════════════════════════════════════ */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-state-icon  { font-size: 44px; margin-bottom: 14px; }
.empty-state-title { font-size: 15px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state-desc  { font-size: 13px; line-height: 1.5; }

/* SKELETON */
@keyframes shimmer { 0%{background-position:-800px 0} 100%{background-position:800px 0} }
.skeleton {
    background: linear-gradient(90deg,#f0f2f7 25%,#e6eaf2 50%,#f0f2f7 75%);
    background-size: 800px 100%; animation: shimmer 1.4s ease-in-out infinite; border-radius: 6px;
}

/* ═══════════════════════════════════════════════════════════════
   WORKFLOW NODES
   ═══════════════════════════════════════════════════════════════ */
.workflow-node { background: white; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; box-shadow: var(--card-shadow); transition: box-shadow 0.15s; }
.workflow-node:hover { box-shadow: var(--card-shadow-md); }
.workflow-node.condition { border-left: 3px solid var(--warning); }
.workflow-node.action    { border-left: 3px solid var(--success); }
.sortable-ghost { opacity: 0.3; background: var(--primary-light) !important; }

/* ═══════════════════════════════════════════════════════════════
   SCROLLBARS
   ═══════════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ced4da; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #adb5bd; }

/* ═══════════════════════════════════════════════════════════════
   BLAZOR ERROR UI
   ═══════════════════════════════════════════════════════════════ */
#blazor-error-ui {
    display: none; position: fixed; bottom: 16px; right: 16px;
    background: #fff5f5; border: 1px solid #ffc9c9;
    color: var(--danger); padding: 12px 18px; border-radius: 10px;
    font-size: 13px; z-index: 9999; box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .admin-sidebar { transform: translateX(-100%); transition: transform 0.3s; }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; }
}

@media (max-width: 768px) {
    .admin-content { padding: 16px; }
    .platform-banner { flex-direction: column; gap: 20px; }
    .platform-banner-right { flex-wrap: wrap; gap: 10px; }
    .banner-stat { min-width: 80px; }
}
