/* =============================================
   TENET FLOW — CSS Principal
   Baseado no MIV e inspirado no Ionic Framework
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@300;400;600;700&family=Secular+One&display=swap');

/* ── Tokens de Design ─────────────────────── */
:root {
    --n-accent:       #06B6D4; /* Cyan oficial */
    --bg:             #f8fafc;
    --text:           #0f172a;
    --border:         #e2e8f0;
    --bg-card:        #ffffff;
    --bg-sidebar:     #ffffff;
    --input-bg:       #f1f5f9;
    --toolbar-bg:     rgba(248,250,252,0.92);
    --shadow:         none;
    --shadow-card:    none;
    --overlay:        rgba(15,23,42,0.4);
    --text-muted:     #64748b;
}

body.dark {
    --n-accent:       #06B6D4;
    --bg:             #020617;
    --text:           #f1f5f9;
    --border:         rgba(255,255,255,0.1);
    --bg-card:        rgba(30, 41, 59, 0.4);
    --bg-sidebar:     #020617;
    --input-bg:       rgba(255,255,255,0.05);
    --toolbar-bg:     rgba(2,6,23,0.92);
    --overlay:        rgba(0,0,0,0.7);
    --text-muted:     #94a3b8;
}

/* ── Reset / Base ─────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Assistant', sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: background 0.3s, color 0.3s;
    min-height: 100vh;
}

.geometric { font-family: 'Secular One', sans-serif; }

/* ── Botões — Sem Gradientes ──────────────── */
.n-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 8px;
    font-family: 'Assistant', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    box-shadow: none !important;
}
.n-btn:active { transform: scale(0.98); }

.n-btn-primary {
    background: var(--n-accent);
    color: #FFFFFF !important;
}
.n-btn-primary:hover { opacity: 0.9; }

.n-btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}
.n-btn-outline:hover { border-color: var(--n-accent); color: var(--n-accent); }

.n-btn-sm { padding: 7px 18px; font-size: 12px; }

/* ── Logo Mark — Minimalist ────────────────── */
.n-logo-mark {
    width: 44px; height: 44px;
    background: var(--n-accent); /* Fundo Cyan */
    border: none;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.n-logo-mark span {
    color: #FFFFFF !important; /* Ícone Branco */
}
.mono { font-family: 'DM Mono', monospace; }

a { text-decoration: none; color: inherit; }

/* ── Animação Logo ────────────────────────── */
.rhythm-bar { display: flex; align-items: flex-end; gap: 3px; height: 28px; }
.rhythm-bar .bar {
    width: 4px;
    background: var(--n-accent);
    border-radius: 2px;
    animation: rhythm 1.5s ease-in-out infinite;
}
@keyframes rhythm {
    0%, 100% { height: 20%; }
    50%       { height: 100%; }
}

/* ── Ionic-style App Shell ────────────────── */
.n-app { display: flex; height: 100vh; overflow: hidden; }

/* Sidebar / ion-menu */
.n-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: background 0.35s, border 0.35s, transform 0.3s;
    z-index: 200;
}

.n-sidebar-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.n-brand { font-size: 18px; font-weight: 900; letter-spacing: -0.5px; }

/* Nav items — ion-item style */
.n-nav { flex: 1; padding: 12px 8px; overflow-y: auto; }

.n-nav-section {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 12px 12px 6px;
}

.n-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 2px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    transition: background 0.2s, color 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    text-decoration: none;
}
.n-nav-item:hover { background: rgba(16,185,129,0.08); color: var(--n-accent); }
.n-nav-item.active { background: rgba(16,185,129,0.12); color: var(--n-accent); }

.n-nav-item svg { width: 20px; height: 20px; flex-shrink: 0; }

.n-nav-badge {
    margin-left: auto;
    background: var(--n-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 99px;
}

/* Sidebar footer */
.n-sidebar-footer {
    display: block;
    padding: 12px 8px;
    border-top: 1px solid var(--border);
}

.n-user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}
.n-user-chip:hover { background: var(--input-bg); }

.n-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--n-accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800;
    color: #fff; flex-shrink: 0;
}

.n-user-info { flex: 1; min-width: 0; }
.n-user-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.n-user-role { font-size: 11px; color: var(--text-muted); font-weight: 500; }

/* ── Main Content ──────────────────────────── */
.n-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* Header / ion-header + ion-toolbar */
.n-header {
    background: var(--toolbar-bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    transition: background 0.35s, border 0.35s;
    z-index: 100;
}

.n-header-title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.3px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Botões de página (variam por página) */
.n-header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* Ações globais: push pill + perfil — sempre fixas à direita, nunca competem com botões de página */
.n-header-global { flex-shrink: 0; gap: 8px; }

/* Botão de luz ─ ícone */
.n-btn-icon {
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background 0.2s, border 0.2s;
    color: var(--text-muted);
}
.n-btn-icon:hover { background: var(--input-bg); color: var(--n-accent); }
.n-btn-icon svg { width: 18px; height: 18px; }

/* ion-content */
.n-content {
    flex: 1;
    overflow-y: auto;
    padding: 28px 28px;
    background: var(--bg);
    transition: background 0.35s;
}

/* ── Botões ────────────────────────────────── */
.n-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 99px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.n-btn:active { transform: scale(0.97); }

.n-btn-primary {
    background: var(--n-accent);
    color: #fff;
    box-shadow: 0 4px 16px rgba(16,185,129,0.3);
}
.n-btn-primary:hover { box-shadow: 0 6px 24px rgba(16,185,129,0.45); transform: translateY(-1px); }

.n-btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text);
}
.n-btn-outline:hover { border-color: var(--n-accent); color: var(--n-accent); }

.n-btn-sm { padding: 7px 18px; font-size: 12px; }

.n-btn-danger {
    background: rgba(239,68,68,0.1);
    color: #ef4444;
    border: 1.5px solid rgba(239,68,68,0.2);
}
.n-btn-danger:hover { background: #ef4444; color: #fff; }

/* ── Cards ─────────────────────────────────── */
.n-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-card);
    transition: background 0.35s, border 0.35s, box-shadow 0.35s;
}

.n-card-sm { padding: 16px 20px; border-radius: 14px; }

.n-card-link {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}
.n-card-link:hover {
    box-shadow: 0 4px 20px rgba(16,185,129,0.15);
    border-color: rgba(16,185,129,0.3);
    transform: translateY(-2px);
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

/* ── Inputs — ion-item style ───────────────── */
.n-form-group { margin-bottom: 20px; }
.n-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.n-input-wrap { position: relative; }

.n-input {
    width: 100%;
    background: var(--input-bg);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 13px 16px;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.35s;
    outline: none;
}
.n-input:focus {
    border-color: var(--n-accent);
    box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
}
.n-input.has-icon-right { padding-right: 48px; }

.n-input-icon-right {
    position: absolute;
    right: 14px; top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
    background: none; border: none; padding: 4px;
    display: flex; align-items: center;
}
.n-input-icon-right:hover { color: var(--n-accent); }
.n-input-icon-right svg { width: 20px; height: 20px; }

/* ── Alert / Badge ─────────────────────────── */
.n-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.n-badge-green  { background: rgba(16,185,129,0.12);  color: #10b981; }
.n-badge-cyan   { background: rgba(6,182,212,0.12);   color: #06b6d4; }
.n-badge-yellow { background: rgba(234,179,8,0.12);   color: #ca8a04; }
.n-badge-red    { background: rgba(239,68,68,0.12);   color: #ef4444; }
.n-badge-gray   { background: rgba(100,116,139,0.12); color: #64748b; }

/* ── Badges de prazo ────────────────────────── */
.n-prazo-badge {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 11px; font-weight: 700; padding: 2px 7px;
    border-radius: 6px; white-space: nowrap;
}
@keyframes n-pulse { 0%,100% { opacity:1 } 50% { opacity:.45 } }
.n-prazo-vencida, .n-prazo-hoje { animation: n-pulse 1.4s ease-in-out infinite; }

/* ── Alert box ─────────────────────────────── */
.n-alert {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    display: none;
}
.n-alert.show { display: flex; align-items: center; gap: 10px; }
.n-alert-error   { background: rgba(239,68,68,0.1);  color: #ef4444;  border: 1px solid rgba(239,68,68,0.2);  }
.n-alert-success { background: rgba(16,185,129,0.1); color: #10b981;  border: 1px solid rgba(16,185,129,0.2); }

/* ── Grid ──────────────────────────────────── */
.n-grid { display: grid; gap: 20px; }
.n-grid-2 { grid-template-columns: repeat(2, 1fr); }
.n-grid-3 { grid-template-columns: repeat(3, 1fr); }
.n-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Stat card ─────────────────────────────── */
.n-stat { display: flex; flex-direction: column; gap: 8px; }
.n-stat-label { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.n-stat-value { font-size: 32px; font-weight: 900; line-height: 1; letter-spacing: -1px; }
.n-stat-sub   { font-size: 12px; color: var(--text-muted); font-weight: 500; }

/* ── Progress bar ──────────────────────────── */
.n-progress-bar {
    height: 6px; background: var(--border); border-radius: 99px; overflow: hidden;
}
.n-progress-fill {
    height: 100%; background: var(--n-accent); border-radius: 99px;
    transition: width 0.6s ease;
}

/* ── Table ─────────────────────────────────── */
.n-table { width: 100%; border-collapse: collapse; }
.n-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
.n-table td {
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}
.n-table tr:last-child td { border-bottom: none; }
.n-table tbody tr:hover td { background: rgba(16,185,129,0.04); }

/* ── Divider ───────────────────────────────── */
.n-divider {
    height: 1px;
    background: var(--border);
    margin: 24px 0;
}

/* ── Hamburger (mobile) ────────────────────── */
.n-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    padding: 4px;
}
.n-hamburger svg { width: 24px; height: 24px; }

/* Overlay for mobile sidebar */
.n-overlay {
    display: none;
    position: fixed; inset: 0;
    background: var(--overlay);
    z-index: 190;
    backdrop-filter: blur(2px);
}

/* ── Login page ────────────────────────────── */
.n-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg);
    transition: background 0.35s;
}

.n-login-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 40px 36px;
    box-shadow: var(--shadow);
    transition: background 0.35s, border 0.35s;
}

.n-login-logo {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 36px;
}

.n-login-title { font-size: 26px; font-weight: 900; letter-spacing: -0.5px; margin-bottom: 4px; }
.n-login-subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 32px; }

.n-forgot-link {
    font-size: 13px;
    color: var(--n-accent);
    font-weight: 600;
    cursor: pointer;
    float: right;
    margin-bottom: 8px;
    background: none; border: none;
    transition: opacity 0.2s;
}
.n-forgot-link:hover { opacity: 0.7; }

/* ── Utilities ─────────────────────────────── */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.text-emerald { color: var(--n-accent); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.w-full { width: 100%; }

/* Modal */
.n-modal-overlay {
    display: none;
    position: fixed; inset: 0;
    background: var(--overlay);
    z-index: 500;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.n-modal-overlay.show { display: flex; }
.n-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow);
    animation: modalIn 0.25s ease;
}
@keyframes modalIn { from { opacity:0; transform: scale(0.95) translateY(8px); } to { opacity:1; transform: none; } }
.n-modal-title { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.n-modal-sub   { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }

/* ── Toast ──────────────────────────────────── */
#n-toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    transform: translateY(80px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), opacity 0.35s ease;
    pointer-events: none;
    max-width: 360px;
}
#n-toast.show    { transform: translateY(0); opacity: 1; }
#n-toast.success { background: var(--n-accent); color: #fff; }
#n-toast.error   { background: #ef4444; color: #fff; }
#n-toast.info    { background: var(--n-accent); color: #fff; }

/* ── Responsive helpers ─────────────────────── */
.n-desktop-only { display: flex; align-items: center; gap: 6px; }
/* .n-mobile-only não define display — cada elemento usa o seu natural (block/flex) */
@media (min-width: 769px) { .n-mobile-only  { display: none !important; } }
@media (max-width: 768px) { .n-desktop-only { display: none !important; } }

/* Notif status pill (topbar) */
.n-notif-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    color: var(--text-muted);
    white-space: nowrap;
    transition: border-color 0.2s, background 0.2s;
}
.n-notif-pill:hover { background: var(--input-bg); }
.n-notif-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    flex-shrink: 0;
    transition: background 0.3s;
}

/* Profile dropdown (topbar) */
.n-profile-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,.14);
    z-index: 500;
    overflow: hidden;
}
.n-profile-menu.open { display: block; }
.n-profile-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: var(--text);
    transition: background 0.15s;
}
.n-profile-menu-item:hover { background: var(--input-bg); }
.n-profile-menu-item.danger { color: #ef4444; }

/* ── Responsive ────────────────────────────── */
@media (max-width: 768px) {
    .n-sidebar {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        transform: translateX(-100%);
        box-shadow: var(--shadow);
    }
    .n-sidebar.open { transform: translateX(0); }
    .n-overlay.show { display: block; }
    .n-hamburger { display: flex; }
    .n-content { padding: 20px 16px; }
    .n-grid-4 { grid-template-columns: repeat(2,1fr); }
    .n-grid-3 { grid-template-columns: repeat(1,1fr); }
    .n-grid-2 { grid-template-columns: repeat(1,1fr); }
}

/* ── PWA Install FAB ─────────────────────────── */
#n-pwa-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    background: var(--n-accent);
    color: #fff;
    border: none;
    border-radius: 99px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(16,185,129,0.4);
    transition: transform 0.2s, opacity 0.3s;
    white-space: nowrap;
}
#n-pwa-fab:hover { transform: scale(1.05); }
#n-pwa-fab.n-fab-out {
    opacity: 0;
    transform: translateY(16px) scale(0.9);
    pointer-events: none;
}

/* ── PWA Install Banner ─────────────────────── */
#n-pwa-banner {
    position: fixed;
    bottom: 72px;
    right: 24px;
    z-index: 9999;
    width: calc(100% - 48px);
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    padding: 16px 20px;
    transition: transform 0.35s cubic-bezier(.34,1.56,.64,1), opacity 0.35s ease;
    transform: translateY(16px) scale(0.96);
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(16px);
}
#n-pwa-banner.n-pwa-visible {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}
.n-pwa-inner {
    display: flex;
    align-items: center;
    gap: 14px;
}
.n-pwa-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.n-pwa-text strong {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
}
.n-pwa-text span {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}
.n-pwa-btn {
    background: var(--n-accent);
    color: #fff;
    border: none;
    padding: 9px 16px;
    border-radius: 99px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(16,185,129,0.3);
    transition: transform 0.2s;
}
.n-pwa-btn:hover { transform: scale(1.04); }
.n-pwa-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1;
    padding: 4px;
    flex-shrink: 0;
    transition: color 0.2s;
}
.n-pwa-close:hover { color: var(--text); }

/* iOS tip sheet */
#n-pwa-ios-tip {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 10000;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-radius: 20px 20px 0 0;
    padding: 24px 24px 36px;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.18);
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(.34,1.4,.64,1);
}
#n-pwa-ios-tip.open { transform: translateY(0); }

/* ── Kanban drag & drop ─────────────────────── */
.n-kanban-card[draggable="true"] { cursor: grab; user-select: none; }
.n-kanban-card[draggable="true"]:active { cursor: grabbing; }
.n-card-dragging {
    opacity: 0.3 !important;
    transform: rotate(1.5deg) scale(0.97);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2) !important;
    transition: none !important;
}
.n-drop-target {
    background: rgba(16,185,129,0.07) !important;
    outline: 2px dashed rgba(16,185,129,0.45);
    outline-offset: 2px;
    border-radius: 12px;
}

/* Borda lateral colorida por status */
.n-kanban-card { border-left-width: 4px !important; border-left-style: solid !important; transition: border-color 0.25s, opacity 0.25s; }
.n-ks-pendente     { border-left-color: #94a3b8 !important; }
.n-ks-em_andamento { border-left-color: #3b82f6 !important; }
.n-ks-concluida    { border-left-color: var(--n-accent) !important; }
.n-ks-cancelada    { border-left-color: #ef4444 !important; }

/* ── Novo Cliente btn: inline no desktop, abaixo no mobile ─── */
@media (max-width: 640px) {
    .n-cliente-select-wrap { flex-wrap: wrap; }
    .n-novo-cliente-btn    { width: 100%; justify-content: center; }
}

/* ── Tour Guide ──────────────────────────────────────────────*/
#n-tour-spot {
    position: fixed;
    z-index: 9000;
    pointer-events: auto;
    box-shadow: 0 0 0 9999px rgba(15,23,42,.68);
    transition: top .25s ease, left .25s ease, width .25s ease, height .25s ease, border-radius .25s ease;
    top: 50%; left: 50%; width: 0; height: 0;
    border-radius: 50%;
}
.n-tour-tip {
    position: fixed;
    z-index: 9001;
    width: 320px;
    max-width: calc(100vw - 32px);
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,.22);
    padding: 0;
    opacity: 0;
    transition: opacity .18s;
    pointer-events: auto;
}
body.dark .n-tour-tip {
    background: #1e293b;
    border-color: rgba(255,255,255,0.10);
}
.n-tour-tip.show { opacity: 1; animation: n-tip-in .22s cubic-bezier(.34,1.4,.64,1); }
@keyframes n-tip-in {
    from { transform: scale(.9) translateY(6px); opacity: 0; }
    to   { transform: scale(1)  translateY(0);   opacity: 1; }
}
.n-tt-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px 0;
}
.n-tt-step { font-size: 11px; color: var(--text-muted); font-weight: 600; letter-spacing: .4px; }
.n-tt-close {
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); font-size: 18px; line-height: 1;
    padding: 2px 4px; border-radius: 6px;
}
.n-tt-close:hover { color: var(--text); background: var(--hover); }
.n-tt-title { margin: 8px 14px 4px; font-size: 15px; font-weight: 700; }
.n-tt-body  { margin: 0 14px 12px; font-size: 13px; line-height: 1.55; color: var(--text-muted); }
.n-tt-foot  {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    gap: 8px;
}
.n-tt-btn {
    padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
    border: none; cursor: pointer; transition: background .15s, color .15s;
}
.n-tt-prev {
    background: var(--hover); color: var(--text);
}
.n-tt-prev:hover { background: var(--border); }
.n-tt-next {
    background: var(--n-accent); color: #fff; margin-left: auto;
}
.n-tt-next:hover { background: #059669; }

/* ? button in header */
.n-tour-help-btn {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--hover);
    border: 1.5px solid var(--border);
    color: var(--text-muted);
    font-size: 15px; font-weight: 700;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    flex-shrink: 0;
}
.n-tour-help-btn:hover {
    background: var(--n-accent);
    color: #fff;
    border-color: var(--n-accent);
}

/* ── PWA Standalone: força sempre layout mobile ──────────────
   display-mode:standalone é true no PWA independente do
   "Visualização de site para computador" do Chrome.
   Por vir depois das outras media queries, seus !important ganham. */
@media (display-mode: standalone) {
    /* Sempre oculta blocos exclusivos de desktop */
    .n-desktop-only { display: none !important; }

    /* Sempre exibe blocos exclusivos de mobile */
    .n-mobile-only  { display: block !important; }

    /* Sidebar comporta-se como overlay (mobile) */
    .n-sidebar {
        position: fixed !important;
        top: 0; left: 0; bottom: 0;
        transform: translateX(-100%);
        box-shadow: var(--shadow);
    }
    .n-sidebar.open { transform: translateX(0) !important; }
    .n-overlay.show { display: block !important; }

    /* Hamburger sempre visível */
    .n-hamburger { display: flex !important; }

    /* Padding de conteúdo mobile */
    .n-content { padding: 20px 16px !important; }

    /* Grids em coluna única / duas colunas */
    .n-grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
    .n-grid-3 { grid-template-columns: repeat(1, 1fr) !important; }
    .n-grid-2 { grid-template-columns: repeat(1, 1fr) !important; }
}
