/* ============================================
   PINHO-NETO Dashboard — style.css
   v6.0 · iCloud-inspired design
   Apple iCloud web aesthetic — clean, light, airy
   ============================================ */

/* ===== DARK MODE (default) ===== */
:root {
    --bg:           #000000;
    --bg-gradient:  #1a1a1a;
    --surface:      #1c1c1e;
    --surface-2:    #2c2c2e;
    --surface-3:    #3a3a3c;
    --glass:        rgba(28, 28, 30, 0.72);
    --glass-brd:    rgba(255, 255, 255, 0.08);
    --glass-brd-hi: rgba(255, 255, 255, 0.16);

    --text:         #f5f5f7;
    --text-2:       #d1d1d6;
    --text-dim:     #8e8e93;
    --text-faint:   #48484a;

    --accent:       #0a84ff;
    --accent-glow:  rgba(10, 132, 255, 0.25);
    --accent-text:  #ffffff;

    --ok:           #30d158;
    --warn:         #ff9f0a;
    --bad:          #ff453a;
    --unknown:      #8e8e93;

    --radius:       18px;
    --radius-sm:    12px;
    --radius-icon:  22%;
    --gap:          16px;

    --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --shadow-modal: 0 20px 60px rgba(0, 0, 0, 0.5);
    --shadow-card:  0 2px 12px rgba(0, 0, 0, 0.20);
}

/* ===== LIGHT MODE ===== */
:root[data-theme="light"] {
    --bg:           #f5f5f7;
    --bg-gradient:  #e8e8ed;
    --surface:      #ffffff;
    --surface-2:    #f2f2f7;
    --surface-3:    #e5e5ea;
    --glass:        rgba(255, 255, 255, 0.72);
    --glass-brd:    rgba(0, 0, 0, 0.06);
    --glass-brd-hi: rgba(0, 0, 0, 0.12);

    --text:         #1d1d1f;
    --text-2:       #424245;
    --text-dim:     #86868b;
    --text-faint:   #c7c7cc;

    --accent:       #007aff;
    --accent-glow:  rgba(0, 122, 255, 0.15);
    --accent-text:  #ffffff;

    --ok:           #34c759;
    --warn:         #ff9f0a;
    --bad:          #ff3b30;
    --unknown:      #8e8e93;

    --shadow-modal: 0 20px 60px rgba(0, 0, 0, 0.12);
    --shadow-card:  0 2px 12px rgba(0, 0, 0, 0.06);
}

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

html, body { height: 100%; overflow: hidden; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.45;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    transition: background .3s, color .3s;
}

/* ===== Ambient bg ===== */
.bg-ambient {
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-gradient) 100%);
}
:root[data-theme="light"] .bg-ambient {
    background: linear-gradient(180deg, #f5f5f7 0%, #e8e8ed 100%);
}

/* ===== Header — iCloud style bar ===== */
.site-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px clamp(20px, 4vw, 40px);
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    background: transparent;
    border-bottom: none;
}

.logo { display: flex; align-items: center; gap: 10px; }

.logo-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 8px;
    background: linear-gradient(135deg, #0a84ff, #5e5ce6);
    box-shadow: 0 2px 8px rgba(10, 132, 255, 0.3);
}
.logo-mark svg { width: 18px; height: 18px; }

.logo-text {
    font-weight: 600; font-size: clamp(16px, 1.6vw, 19px);
    letter-spacing: -0.4px; line-height: 1;
}
.logo-pin { color: var(--text); }
.logo-dash { color: var(--text-dim); margin: 0 1px; }
.logo-net { color: var(--text); }

.header-right { display: flex; align-items: center; gap: 12px; }

/* Config button */
.config-btn {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--surface-2); border: none;
    color: var(--text-2); cursor: pointer;
    transition: background .15s, color .15s, transform .1s;
    -webkit-tap-highlight-color: transparent;
}
.config-btn:hover { background: var(--surface-3); color: var(--text); }
.config-btn:active { transform: scale(0.92); }
.config-btn svg { width: 18px; height: 18px; }

/* User avatar */
.header-avatar {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, #0a84ff, #5e5ce6);
    color: #fff; font-size: 14px; font-weight: 600;
    cursor: pointer; box-shadow: 0 2px 8px rgba(10, 132, 255, 0.2);
}

/* Clock */
.clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.clock-time { font-variant-numeric: tabular-nums; font-weight: 600; font-size: clamp(13px, 1.4vw, 15px); letter-spacing: 0.2px; color: var(--text); }
.clock-date { font-size: 11px; color: var(--text-dim); margin-top: 2px; font-variant-numeric: tabular-nums; }

/* ===== Toolbar ===== */
.toolbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px clamp(20px, 4vw, 40px) 4px;
    background: transparent;
    border-bottom: none;
}

.search-wrap { position: relative; flex: 0 0 auto; width: clamp(160px, 24vw, 300px); }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-dim); pointer-events: none; }
.search-input {
    width: 100%; padding: 9px 14px 9px 36px; border-radius: 999px;
    border: 1px solid var(--glass-brd); background: var(--surface);
    color: var(--text); font-size: 14px; font-family: var(--font);
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.search-input::placeholder { color: var(--text-dim); }
.search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); background: var(--surface); }

.filter-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; flex: 1; }
.filter-chips::-webkit-scrollbar { display: none; }

.chip {
    flex: 0 0 auto; padding: 7px 16px; border-radius: 999px;
    border: 1px solid var(--glass-brd); background: var(--surface);
    color: var(--text-dim); font-family: var(--font); font-size: 13px; font-weight: 500;
    cursor: pointer; white-space: nowrap;
    transition: color .15s, background .15s, border-color .15s, transform .1s;
    -webkit-tap-highlight-color: transparent;
}
.chip:hover { color: var(--text-2); border-color: var(--glass-brd-hi); }
.chip:active { transform: scale(0.96); }
.chip.active { color: var(--accent-text); background: var(--accent); border-color: var(--accent); }

/* ===== Services grid — iCloud app grid ===== */
.services-wrap {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
    padding: clamp(12px, 2vw, 24px) clamp(20px, 4vw, 40px);
    padding-bottom: calc(clamp(12px, 2vw, 24px) + env(safe-area-inset-bottom, 0px));
    -webkit-overflow-scrolling: touch;
}
.services-wrap::-webkit-scrollbar { width: 6px; }
.services-wrap::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 999px; }

.services {
    display: grid; width: 100%; gap: var(--gap);
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    align-content: start;
}

.no-results { grid-column: 1 / -1; text-align: center; color: var(--text-dim); font-size: 15px; padding: 40px 0; }

/* ===== Card — iCloud app tile ===== */
.card {
    position: relative; display: flex; flex-direction: column; align-items: center;
    gap: 8px; padding: 16px 8px 12px; border-radius: var(--radius);
    background: transparent; border: none;
    text-decoration: none; color: inherit; overflow: visible;
    transition: transform .2s cubic-bezier(.2,.8,.2,1);
    animation: rise .35s ease both; min-height: 0;
    cursor: pointer;
}
@keyframes rise { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
.card:hover { transform: scale(1.05); }
.card:active { transform: scale(0.95); }

.card-top { display: none; } /* Hidden — status dot moves to icon corner */

/* App icon — rounded square with brand gradient */
.card-icon {
    position: relative;
    flex: 0 0 auto;
    width: 64px; height: 64px; border-radius: var(--radius-icon);
    display: flex; align-items: center; justify-content: center;
    background: var(--icon-bg, var(--surface-2));
    box-shadow: 0 4px 16px var(--icon-shadow, rgba(0,0,0,0.15));
    transition: box-shadow .2s;
    overflow: hidden;
}
.card:hover .card-icon { box-shadow: 0 6px 24px var(--icon-shadow, rgba(0,0,0,0.20)); }
.card-icon svg { width: 32px; height: 32px; }
.card-icon svg path { fill: var(--icon-color, #fff); }

/* Status dot on icon corner */
.card-status {
    position: absolute; top: 14px; right: 14px;
    display: flex; align-items: center; gap: 3px;
    font-size: 0; /* Only the dot shows on the icon */
}

.dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--unknown); position: relative; flex-shrink: 0;
    border: 1.5px solid var(--bg);
}
.dot.ok { background: var(--ok); box-shadow: 0 0 6px rgba(48, 209, 88, 0.5); }
.dot.warn { background: var(--warn); box-shadow: 0 0 6px rgba(255, 159, 10, 0.5); }
.dot.bad { background: var(--bad); box-shadow: 0 0 6px rgba(255, 69, 58, 0.5); }
.dot.unknown { background: var(--unknown); }
.dot.pulse::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 1px solid currentColor; color: inherit; animation: pulse 2s ease-out infinite; opacity: 0; }
@keyframes pulse { 0% { transform: scale(.7); opacity: .5; } 100% { transform: scale(2.2); opacity: 0; } }
.dot-text { display: none; }

.card-body { text-align: center; width: 100%; }
.card-name {
    font-size: 13px; font-weight: 500; margin: 0; color: var(--text);
    letter-spacing: -0.1px; line-height: 1.3;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-desc { display: none; }
.card-cat { display: none; }
.card-chevron { display: none; }

/* ===== Footer ===== */
.site-footer {
    flex: 0 0 auto; text-align: center;
    padding: 8px 16px; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    color: var(--text-faint); font-size: 11px;
}

/* ===== Login overlay ===== */
.login-overlay { display: none; }
.login-overlay.show { display: flex; position: fixed; inset: 0; z-index: 300; align-items: center; justify-content: center; background: var(--bg); animation: fadeIn .3s ease; }

.login-card {
    width: min(360px, 90vw); padding: 40px 32px;
    background: var(--surface); border-radius: 24px;
    border: 1px solid var(--glass-brd); box-shadow: var(--shadow-modal);
    animation: rise .3s ease;
}

.login-logo { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-bottom: 32px; }
.login-logo .logo-mark { width: 56px; height: 56px; border-radius: 14px; }
.login-logo .logo-mark svg { width: 30px; height: 30px; }
.login-title { font-size: 24px; font-weight: 700; color: var(--text); text-align: center; }
.login-sub { font-size: 14px; color: var(--text-dim); text-align: center; margin-top: 4px; }

.login-field { margin-bottom: 16px; }
.login-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-dim); margin-bottom: 6px; }
.login-input {
    width: 100%; padding: 14px 16px; border-radius: 12px;
    border: 1px solid var(--glass-brd); background: var(--surface-2);
    color: var(--text); font-size: 16px; font-family: var(--font);
    transition: border-color .2s, box-shadow .2s;
}
.login-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); }
.login-input::placeholder { color: var(--text-faint); }

.login-error { font-size: 13px; color: var(--bad); margin-bottom: 12px; display: block; }

.login-btn {
    width: 100%; padding: 14px; border-radius: 12px;
    border: none; background: var(--accent); color: var(--accent-text);
    font-size: 16px; font-weight: 600; font-family: var(--font);
    cursor: pointer; transition: opacity .15s, transform .1s;
}
.login-btn:disabled { opacity: 0.6; }
.login-btn:active { transform: scale(0.98); }

.login-hint { font-size: 12px; color: var(--text-faint); text-align: center; margin-top: 20px; }

/* ===== Config drawer ===== */
.config-overlay { display: none; }
.config-overlay.show { display: block; position: fixed; inset: 0; z-index: 199; background: rgba(0, 0, 0, 0.40); animation: fadeIn .2s ease; }

.config-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 200;
    width: min(380px, 90vw); background: var(--surface);
    border-left: 1px solid var(--glass-brd); box-shadow: var(--shadow-modal);
    transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1);
    overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.config-drawer.open { transform: translateX(0); }

.config-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px; border-bottom: 1px solid var(--glass-brd);
    position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.config-title { font-size: 19px; font-weight: 700; color: var(--text); }
.config-close {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--surface-2); border: none; color: var(--text-dim); cursor: pointer;
    transition: color .15s, background .15s, transform .1s;
}
.config-close:hover { color: var(--text); background: var(--surface-3); }
.config-close:active { transform: scale(0.9); }
.config-close svg { width: 18px; height: 18px; }

.config-body { padding: 20px 24px; }

/* User profile card in config */
.config-user-card {
    display: flex; align-items: center; gap: 14px; padding: 16px;
    background: var(--surface-2); border-radius: var(--radius); margin-bottom: 20px;
}
.config-avatar {
    display: flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, #0a84ff, #5e5ce6);
    color: #fff; font-size: 20px; font-weight: 600;
}
.config-user-info { flex: 1; }
.config-user-name { font-size: 16px; font-weight: 600; color: var(--text); }
.config-user-role { font-size: 13px; color: var(--text-dim); }

/* Config sections */
.config-section { margin-bottom: 24px; }
.config-section-title { font-size: 13px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }

.config-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 16px; background: var(--surface-2); border-radius: var(--radius-sm);
    margin-bottom: 8px;
}
.config-row-label { font-size: 15px; color: var(--text); font-weight: 500; }
.config-row-desc { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

/* Toggle switch (iOS style) */
.toggle {
    position: relative; width: 48px; height: 28px; flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; inset: 0; border-radius: 999px;
    background: var(--surface-3); transition: background .2s; cursor: pointer;
}
.toggle-slider::before {
    content: ""; position: absolute; left: 2px; top: 2px;
    width: 24px; height: 24px; border-radius: 50%;
    background: #fff; transition: transform .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle input:checked + .toggle-slider { background: var(--ok); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Input fields in config */
.config-input {
    width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
    border: 1px solid var(--glass-brd); background: var(--surface-2);
    color: var(--text); font-size: 15px; font-family: var(--font);
    margin-bottom: 8px; transition: border-color .2s, box-shadow .2s;
}
.config-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

.config-btn {
    padding: 12px 18px; border-radius: var(--radius-sm);
    border: 1px solid var(--glass-brd); background: var(--surface-2);
    color: var(--text); font-size: 15px; font-weight: 500; font-family: var(--font);
    cursor: pointer; transition: background .15s, border-color .15s, transform .1s;
    -webkit-tap-highlight-color: transparent;
}
.config-btn:hover { background: var(--surface-3); border-color: var(--glass-brd-hi); }
.config-btn:active { transform: scale(0.97); }
.config-btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.config-btn.primary:hover { opacity: 0.9; }
.config-btn.danger { color: var(--bad); border-color: rgba(255, 69, 58, 0.3); }
.config-btn.danger:hover { background: rgba(255, 69, 58, 0.1); }

.config-btn-row { display: flex; gap: 8px; margin-top: 8px; }

/* User list (admin) */
.user-row {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px;
    background: var(--surface-2); border-radius: var(--radius-sm); margin-bottom: 8px;
}
.user-row-info { flex: 1; min-width: 0; }
.user-row-name { font-size: 15px; font-weight: 500; color: var(--text); }
.user-row-badge { font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 4px; background: var(--accent); color: var(--accent-text); margin-left: 6px; }
.user-row-detail { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.user-row-edit, .user-row-delete {
    padding: 7px 12px; border-radius: 8px; border: 1px solid var(--glass-brd);
    background: var(--surface); color: var(--text-2); font-size: 13px; font-family: var(--font);
    cursor: pointer; transition: background .15s; white-space: nowrap;
}
.user-row-edit:hover { background: var(--surface-3); }
.user-row-delete { color: var(--bad); border-color: rgba(255,69,58,0.2); }
.user-row-delete:hover { background: rgba(255,69,58,0.1); }

/* Service checkboxes */
.svc-check {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    background: var(--surface-2); border-radius: var(--radius-sm); margin-bottom: 4px;
    cursor: pointer; font-size: 14px; color: var(--text);
}
.svc-check input { width: 18px; height: 18px; }
.edit-note { font-size: 13px; color: var(--text-dim); font-style: italic; }

/* Modal (user editor, new user form) */
.modal-overlay { display: none; }
.modal-overlay.show { display: flex; position: fixed; inset: 0; z-index: 250; align-items: center; justify-content: center; background: rgba(0,0,0,0.40); backdrop-filter: blur(8px); animation: fadeIn .2s ease; }

.modal-card {
    width: min(440px, 92vw); max-height: 80vh; overflow-y: auto;
    background: var(--surface); border-radius: var(--radius);
    border: 1px solid var(--glass-brd-hi); box-shadow: var(--shadow-modal);
    padding: 24px; animation: rise .25s ease;
}
.modal-title { font-size: 19px; font-weight: 700; color: var(--text); margin-bottom: 20px; }
.modal-field { margin-bottom: 14px; }
.modal-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-dim); margin-bottom: 6px; }

/* About modal */
.about-section { display: none; }
.about-section.show { display: flex; position: fixed; inset: 0; z-index: 200; align-items: center; justify-content: center; background: rgba(0,0,0,0.50); backdrop-filter: blur(16px); animation: fadeIn .2s ease; }
.about-panel { width: min(400px, 90vw); background: var(--surface); border-radius: var(--radius); border: 1px solid var(--glass-brd-hi); box-shadow: var(--shadow-modal); overflow: hidden; animation: rise .25s ease; }
.about-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--glass-brd); }
.about-title { font-size: 18px; font-weight: 600; color: var(--text); }
.about-close { background: none; border: none; cursor: pointer; color: var(--text-dim); padding: 6px; border-radius: 8px; transition: color .15s, background .15s; }
.about-close:hover { color: var(--text); background: var(--surface-2); }
.about-close svg { width: 18px; height: 18px; }
.about-row { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-bottom: 1px solid var(--glass-brd); }
.about-row:last-child { border-bottom: none; }
.about-row-icon { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--text-2); background: var(--surface-2); }
.about-row-icon svg { width: 18px; height: 18px; }
.about-row-content { flex: 1; }
.about-row-label { font-size: 11px; color: var(--text-faint); margin-bottom: 2px; }
.about-row-value { font-size: 15px; font-weight: 500; color: var(--text); }

/* ===== Bottom tab bar (mobile) ===== */
.tab-bar { display: none; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ===== RESPONSIVE ===== */

/* Large desktop */
@media (min-width: 1400px) {
    .services { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 20px; }
    .card-icon { width: 72px; height: 72px; }
    .card-icon svg { width: 36px; height: 36px; }
    .card-name { font-size: 14px; }
}

@media (min-width: 900px) and (max-width: 1399px) {
    .services { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

@media (min-width: 600px) and (max-width: 899px) {
    .services { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}

@media (max-width: 599px) {
    .site-header { padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
    .logo-mark { width: 28px; height: 28px; }
    .logo-text { font-size: 15px; }
    .clock-date { display: none; }
    .toolbar { padding: 6px 16px 2px; gap: 8px; }
    .search-wrap { width: 140px; }
    .search-input { font-size: 13px; padding: 7px 12px 7px 32px; }
    .chip { padding: 6px 12px; font-size: 12px; }
    .services-wrap { padding: 12px 16px; padding-bottom: calc(12px + 60px + env(safe-area-inset-bottom, 0px)); }
    .services { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 12px; }
    .card { padding: 12px 6px 8px; gap: 6px; }
    .card-icon { width: 56px; height: 56px; }
    .card-icon svg { width: 28px; height: 28px; }
    .card-name { font-size: 12px; }
    .card-status { top: 10px; right: 10px; }

    .tab-bar {
        display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
        flex-direction: row; align-items: center; justify-content: space-around;
        padding: 6px 10px; padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
        background: var(--glass); backdrop-filter: blur(30px) saturate(160%); -webkit-backdrop-filter: blur(30px) saturate(160%);
        border-top: 1px solid var(--glass-brd);
    }
    .tab-item {
        flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
        padding: 6px 4px; background: none; border: none; cursor: pointer;
        color: var(--text-dim); font-family: var(--font); font-size: 10px; font-weight: 500;
        transition: color .15s; -webkit-tap-highlight-color: transparent;
    }
    .tab-item.active { color: var(--accent); }
    .tab-icon { width: 24px; height: 24px; }
}

@media (max-width: 360px) {
    .services { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .card { padding: 10px 4px 6px; gap: 4px; }
    .card-icon { width: 48px; height: 48px; }
    .card-icon svg { width: 24px; height: 24px; }
    .card-name { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
    .bg-ambient, .dot.pulse::after, .card, .login-overlay.show, .about-section.show, .config-drawer { animation: none !important; transition: none !important; }
}