@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --bg: #F5F7FA;
    --bg-elevated: #FFFFFF;
    --surface: #FFFFFF;
    --surface-hover: #F8FAFC;
    --border: #E2E8F0;
    --border-light: #CBD5E1;

    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;

    --accent: #2563EB;
    --accent-dim: #1D4ED8;
    --accent-glow: rgba(37, 99, 235, 0.08);

    --success: #16A34A;
    --success-dim: rgba(22, 163, 74, 0.08);
    --warning: #D97706;
    --warning-dim: rgba(217, 119, 6, 0.08);
    --danger: #DC2626;
    --danger-dim: rgba(220, 38, 38, 0.08);

    --sidebar-bg: #F1F4F9;
    --sidebar-text: #4A5A6E;
    --sidebar-text-active: #1E293B;
    --sidebar-active-bg: #FFFFFF;
    --sidebar-border: #DCE3EC;
    --sidebar-hover: #E8EDF5;
    --sidebar-shadow: 0 2px 8px rgba(0,0,0,0.04);

    --font-ui: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;

    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --content-max: 1920px;
    --page-gutter: clamp(20px, 2.25vw, 44px);
    --shadow-card: 0 1px 2px rgba(15,23,42,0.04), 0 4px 14px rgba(15,23,42,0.04);
    --shadow-hover: 0 12px 30px rgba(15,23,42,0.09);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    background:
        radial-gradient(circle at 100% 0, rgba(37,99,235,0.045), transparent 28rem),
        var(--bg);
}

::selection { background: rgba(37,99,235,0.18); color: var(--text-primary); }

.bg-grid { display: none; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; margin: 0 0 4px; }
h1 { font-size: 24px; color: var(--text-primary); }
h2 { font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }

code, .mono { font-family: var(--font-mono); }

/* ---------- Auth (login/cadastro) ---------- */

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    background: var(--bg);
}

@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
}

.auth-brand {
    background: #0f172a;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 64px;
    position: relative;
    overflow: hidden;
}

.auth-brand::before {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37,99,235,0.2) 0%, transparent 70%);
    top: -100px; right: -100px;
}

.auth-logo {
    font-family: var(--font-mono);
    font-size: 13px;
    color: #60A5FA;
    letter-spacing: 0.1em;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-logo .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #4ADE80;
    box-shadow: 0 0 8px #4ADE80;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.auth-brand h1 { font-size: 32px; color: #FFFFFF; max-width: 400px; line-height: 1.2; }
.auth-brand p { color: #94A3B8; max-width: 360px; margin-top: 12px; }

.auth-stats {
    display: flex;
    gap: 32px;
    margin-top: 48px;
    font-family: var(--font-mono);
}
.auth-stats div strong { display: block; font-size: 20px; color: #FFFFFF; }
.auth-stats div span { font-size: 11px; color: #64748B; text-transform: uppercase; letter-spacing: 0.04em; }

.auth-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: var(--bg);
}

.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { font-size: 22px; margin-bottom: 6px; }
.auth-card .sub { color: var(--text-secondary); font-size: 14px; margin-bottom: 28px; }

/* ---------- Formulários ---------- */

.field { margin-bottom: 16px; }
.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="search"],
input[type="number"],
input[type="date"],
input[type="url"],
textarea,
select {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 13px;
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

input::placeholder { color: var(--text-muted); }
input:disabled { background: var(--bg); color: var(--text-muted); cursor: not-allowed; }

select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpolyline points='6,9 12,15 18,9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--accent);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    width: 100%;
    text-decoration: none;
}
.btn:hover { background: var(--accent-dim); box-shadow: 0 4px 12px rgba(37,99,235,0.25); text-decoration: none; color: #fff; }
.btn:active { transform: scale(0.98); }

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--surface-hover); box-shadow: var(--shadow-hover); color: var(--text-primary); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #B91C1C; box-shadow: 0 4px 12px rgba(220,38,38,0.25); }

.btn-warning { background: var(--warning); color: #fff; }
.btn-sm { padding: 7px 13px; font-size: 13px; width: auto; }

.divider-text { text-align: center; color: var(--text-muted); font-size: 13px; margin-top: 20px; }

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 18px;
    border: 1px solid transparent;
}
.alert-error { background: var(--danger-dim); border-color: rgba(220,38,38,0.2); color: #DC2626; }
.alert-success { background: var(--success-dim); border-color: rgba(22,163,74,0.2); color: #16A34A; }

/* ---------- Badges ---------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

.badge-ativa { background: rgba(22,163,74,0.1); color: #16A34A; border: 1px solid rgba(22,163,74,0.2); }
.badge-ativa::before { background: #16A34A; }

.badge-pendente { background: rgba(217,119,6,0.1); color: #D97706; border: 1px solid rgba(217,119,6,0.2); }
.badge-pendente::before { background: #D97706; }

.badge-suspensa, .badge-erro { background: rgba(220,38,38,0.1); color: #DC2626; border: 1px solid rgba(220,38,38,0.2); }
.badge-suspensa::before, .badge-erro::before { background: #DC2626; }

.badge-provisionando { background: rgba(37,99,235,0.1); color: #2563EB; border: 1px solid rgba(37,99,235,0.2); }
.badge-provisionando::before { background: #2563EB; animation: pulse 1s ease-in-out infinite; }

.badge-cancelada { background: #F1F5F9; color: var(--text-muted); border: 1px solid var(--border); }
.badge-cancelada::before { background: var(--text-muted); }

/* ---------- Tabela ---------- */

table { width: 100%; border-collapse: collapse; }
th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 11px 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    background: #F8FAFC;
}
td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #F8FAFC; }

/* ---------- Cards ---------- */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    width: 100%;
}
.card-pad { padding: clamp(20px, 2vw, 30px); }

/* ---------- Planos ---------- */

.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.plan-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    position: relative;
    box-shadow: var(--shadow-card);
}
.plan-card:hover { border-color: var(--accent); box-shadow: var(--shadow-hover); }
.plan-card input[type="radio"] { position: absolute; top: 14px; right: 14px; accent-color: var(--accent); }
.plan-card.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

.plan-price { font-size: 20px; font-weight: 800; color: var(--accent); margin: 8px 0; font-family: var(--font-mono); }
.plan-price small { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.plan-specs { font-size: 13px; color: var(--text-secondary); line-height: 1.9; }

/* ---------- Empty state ---------- */

.empty-state { text-align: center; padding: 64px 24px; color: var(--text-muted); }
.empty-state h3 { color: var(--text-secondary); margin-bottom: 8px; }

.section-divider { height: 1px; background: var(--border); margin: 28px 0; }
.action-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }

/* ========== ADMIN SIDEBAR ========== */

.admin-shell { display: flex; min-height: 100vh; }

.admin-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: var(--sidebar-shadow);
    z-index: 100;
    transition: transform 0.3s ease;
}

/* Scrollbar personalizada */
.admin-sidebar::-webkit-scrollbar {
    width: 4px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 2px;
}

.admin-sidebar::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* Brand */
.admin-sidebar .brand {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--sidebar-border);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: sticky;
    top: 0;
    background: var(--sidebar-bg);
    z-index: 10;
}

.brand-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 12px rgba(22, 163, 74, 0.3);
    flex-shrink: 0;
}

.brand-text {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}

.brand-badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--accent-glow);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(37, 99, 235, 0.15);
    margin-left: auto;
}

/* Navegação */
.admin-nav {
    padding: 8px 12px 20px;
}

/* ===== SEPARADORES - TÍTULO À ESQUERDA ===== */
.nav-divider {
    display: flex;
    align-items: center;
    padding: 16px 12px 8px 12px;
    gap: 12px;
}

.nav-divider span {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--sidebar-border);
}

.nav-divider:not(:has(span)) {
    padding: 8px 12px;
}

.nav-divider:not(:has(span))::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--sidebar-border);
}

.nav-divider::before {
    display: none;
}

.nav-divider:first-of-type {
    padding-top: 4px;
}

.nav-divider:last-of-type {
    padding-bottom: 16px;
}

/* Itens do menu */
.admin-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    color: var(--sidebar-text);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
    position: relative;
    min-height: 38px;
}

.admin-nav a:hover {
    color: var(--sidebar-text-active);
    background: var(--sidebar-hover);
    text-decoration: none;
}

.admin-nav a.active {
    color: var(--accent);
    background: var(--sidebar-active-bg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    font-weight: 600;
}

.admin-nav a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background: var(--accent);
    border-radius: 0 2px 2px 0;
}

/* Ícones */
.nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.6;
    color: var(--sidebar-text);
}

.admin-nav a:hover .nav-icon {
    opacity: 0.8;
    color: var(--sidebar-text-active);
}

.admin-nav a.active .nav-icon {
    opacity: 1;
    color: var(--accent);
}

/* Badge de tickets */
.ticket-nav {
    justify-content: flex-start;
    gap: 10px;
}

.ticket-nav .badge-count {
    background: var(--danger);
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    flex-shrink: 0;
    margin-left: auto;
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Ações do usuário */
.nav-action {
    margin-top: 2px;
}

.nav-action.logout {
    color: #DC2626;
}

.nav-action.logout:hover {
    background: rgba(220, 38, 38, 0.08);
    color: #B91C1C;
}

.nav-action.logout .nav-icon {
    color: #DC2626;
    opacity: 0.7;
}

.nav-action.logout:hover .nav-icon {
    opacity: 1;
}

/* ---------- Admin Main ---------- */

.admin-main {
    margin-left: 240px;
    flex: 1;
    min-width: 0;
    width: calc(100% - 240px);
    min-height: 100vh;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    box-shadow: var(--shadow-card);
}
.stat-card strong { display: block; font-size: 26px; font-family: var(--font-mono); color: var(--text-primary); }
.stat-card span { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }

.tag-warning { color: var(--warning); }
.tag-danger { color: var(--danger); }
.tag-success { color: var(--success); }

/* ---------- Cliente layout (sidebar) ---------- */

.client-shell { display: flex; min-height: 100vh; }

.client-sidebar {
    width: 230px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: var(--sidebar-shadow);
}

/* Scrollbar para client sidebar */
.client-sidebar::-webkit-scrollbar {
    width: 4px;
}

.client-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.client-sidebar::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 2px;
}

.client-sidebar::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

.client-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 22px 20px;
    border-bottom: 1px solid var(--sidebar-border);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
    position: sticky;
    top: 0;
    background: var(--sidebar-bg);
    z-index: 10;
}

.brand-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #2563EB;
    color: #FFFFFF;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.client-nav {
    flex: 1;
    padding: 16px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.client-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
    min-height: 38px;
}
.client-nav-item:hover { background: var(--sidebar-hover); color: var(--text-primary); text-decoration: none; }
.client-nav-item.active { background: rgba(37,99,235,0.12); color: #2563EB; border: 1px solid rgba(37,99,235,0.2); font-weight: 600; }

.client-nav-item .nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.6;
    color: var(--sidebar-text);
}

.client-nav-item:hover .nav-icon {
    opacity: 0.8;
    color: var(--sidebar-text-active);
}

.client-nav-item.active .nav-icon {
    opacity: 1;
    color: var(--accent);
}

/* Badge de tickets no cliente */
.client-nav-item.ticket-nav {
    justify-content: flex-start;
    gap: 10px;
}

.client-nav-item .badge-count {
    background: var(--danger);
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    flex-shrink: 0;
    margin-left: auto;
    animation: pulse-badge 2s ease-in-out infinite;
}

.client-nav-item.logout-action {
    color: #DC2626;
}

.client-nav-item.logout-action:hover {
    background: rgba(220, 38, 38, 0.08);
    color: #B91C1C;
}

.client-nav-item.logout-action .nav-icon {
    color: #DC2626;
    opacity: 0.7;
}

.client-nav-item.logout-action:hover .nav-icon {
    opacity: 1;
}

.client-sidebar-footer {
    padding: 16px 14px;
    border-top: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: var(--sidebar-bg);
    position: sticky;
    bottom: 0;
}

.sidebar-user { display: flex; align-items: center; gap: 10px; min-width: 0; }

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

.client-main { margin-left: 230px; flex: 1; min-width: 0; width: calc(100% - 230px); min-height: 100vh; }

.client-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px var(--page-gutter);
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 0 var(--border);
    min-height: 64px;
}

.client-topbar h2 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: none;
    letter-spacing: -0.01em;
    margin: 0;
}

.client-content {
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: clamp(24px, 2.4vw, 46px) var(--page-gutter) 56px;
}

/* ========== MENU MOBILE ========== */

/* Botão do menu hambúrguer */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--text-primary);
    font-size: 24px;
    line-height: 1;
    z-index: 200;
    position: fixed;
    top: 12px;
    left: 12px;
    background: var(--surface);
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}

.menu-toggle:hover {
    background: var(--surface-hover);
    border-color: var(--accent);
}

.menu-toggle svg {
    width: 22px;
    height: 22px;
    stroke: var(--text-primary);
}

/* Overlay para fechar o menu */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 98;
}

.menu-overlay.active {
    display: block;
}

/* VPS cards */
.vps-grid-pro {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
    gap: 20px;
    margin-top: 24px;
}

.vps-card-pro {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}
.vps-card-pro:hover { box-shadow: var(--shadow-hover); border-color: rgba(37,99,235,0.25); transform: translateY(-2px); }

.vps-card-header {
    padding: 18px 20px 14px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--border);
}

.vps-card-name { font-family: var(--font-mono); font-weight: 600; font-size: 14px; color: var(--text-primary); }
.vps-card-plan { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

.vps-card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid var(--border);
    background: #F8FAFC;
}
.vps-stat { padding: 12px 16px; border-right: 1px solid var(--border); }
.vps-stat:last-child { border-right: none; }
.vps-stat strong { display: block; font-family: var(--font-mono); font-size: 15px; font-weight: 700; color: var(--text-primary); }
.vps-stat small { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }

.vps-card-footer {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--surface);
}

.vps-ip { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); }

/* Perfil */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
    width: 100%;
}

/* Gerenciar VPS */
.vps-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
    width: 100%;
}

.vps-info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow-card);
}

.vps-info-card label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.vps-info-card .val {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    word-break: break-all;
}

.copy-btn-inline {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 2px;
    flex-shrink: 0;
    transition: color 0.15s;
}
.copy-btn-inline:hover { color: var(--accent); }

.reveal-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 2px;
    flex-shrink: 0;
    font-size: 13px;
    transition: color 0.15s;
}
.reveal-btn:hover { color: var(--accent); }

.resource-bars { display: flex; flex-direction: column; gap: 14px; }

.resource-bar-item label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: normal;
}
.resource-bar-item label span:first-child { color: var(--text-secondary); }
.resource-bar-item label span:last-child { font-family: var(--font-mono); color: var(--text-primary); font-weight: 600; }

.bar-track { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; }

.power-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
    width: 100%;
}

.power-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font-ui);
    box-shadow: var(--shadow-card);
}
.power-btn:hover { box-shadow: var(--shadow-hover); }
.power-btn svg { width: 22px; height: 22px; }
.power-btn.start:hover { border-color: var(--success); color: var(--success); background: var(--success-dim); }
.power-btn.stop:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-dim); }
.power-btn.reboot:hover { border-color: var(--warning); color: var(--warning); background: var(--warning-dim); }

.danger-zone {
    background: var(--danger-dim);
    border: 1px solid rgba(220,38,38,0.15);
    border-radius: var(--radius);
    padding: 20px;
}

.text-danger-soft { color: var(--text-secondary); }
.text-danger-soft strong { color: var(--danger); }

/* Admin topbar */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}
.topbar .brand { font-family: var(--font-mono); font-weight: 600; color: var(--accent); display: flex; align-items: center; gap: 8px; font-size: 14px; }
.topbar .user-menu { display: flex; align-items: center; gap: 16px; font-size: 14px; color: var(--text-secondary); }

.container {
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: clamp(28px, 2.5vw, 48px) var(--page-gutter) 56px;
}
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; flex-wrap: wrap; gap: 16px; }

/* ---------- Acabamento visual global ---------- */

.admin-main > .client-topbar,
.client-main > .client-topbar { width: 100%; }

.container > h1,
.client-content > h1 { font-size: clamp(23px, 1.7vw, 30px); margin-bottom: 6px; }

.card table { border-radius: inherit; overflow: hidden; }

th {
    padding: 13px 18px;
    background: linear-gradient(180deg, #FAFBFD 0%, #F6F8FB 100%);
}

td { padding: 15px 18px; }
tbody tr { transition: background-color 0.15s; }
tr:hover td { background: #F8FAFD; }

.alert { border-radius: 10px; box-shadow: 0 1px 2px rgba(15,23,42,0.025); }

.btn { min-height: 40px; }
.btn-sm { min-height: 34px; }

@media (min-width: 1500px) {
    .vps-grid-pro { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
    .vps-card-header { padding: 22px 24px 17px; }
    .vps-card-footer { padding: 17px 24px; }
    .vps-stat { padding: 15px 20px; }
}

@media (max-width: 1100px) and (min-width: 769px) {
    .dashboard-grid,
    .dash-grid,
    .profile-grid,
    .ticket-layout,
    .template-editor { grid-template-columns: 1fr !important; }

    .container,
    .client-content { padding-left: 24px; padding-right: 24px; }
}

/* ===== RESPONSIVIDADE COMPLETA ===== */

@media (max-width: 768px) {
    /* Botão do menu */
    .menu-toggle {
        display: flex;
    }

    /* Sidebar - escondida por padrão */
    .client-sidebar,
    .admin-sidebar {
        transform: translateX(-100%);
        width: 280px;
        box-shadow: 0 0 30px rgba(0,0,0,0.15);
    }

    .client-sidebar.open,
    .admin-sidebar.open {
        transform: translateX(0);
    }

    /* Overlay */
    .menu-overlay.active {
        display: block;
    }

    /* Conteúdo principal */
    .client-main,
    .admin-main {
        margin-left: 0 !important;
        padding-top: 0;
        width: 100% !important;
    }

    /* Topbar fixa */
    .client-topbar,
    .topbar {
        padding: 12px 16px 12px 60px !important;
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        z-index: 50;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-card);
        min-height: 56px;
    }

    .client-topbar h2,
    .topbar .brand {
        font-size: 14px !important;
    }

    .client-content,
    .container {
        padding: 16px !important;
    }

    /* Estatísticas */
    .dashboard-stats {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }

    .stat-card-dash {
        padding: 14px 16px !important;
    }

    .stat-card-dash .stat-number {
        font-size: 22px !important;
    }

    /* Grids */
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .profile-grid {
        grid-template-columns: 1fr !important;
    }

    .vps-grid-pro {
        grid-template-columns: 1fr !important;
    }

    .vps-info-grid {
        grid-template-columns: 1fr !important;
    }

    .power-grid {
        grid-template-columns: 1fr !important;
    }

    .form-grid {
        grid-template-columns: 1fr !important;
    }

    /* Tabelas com scroll */
    .card {
        overflow-x: auto;
    }

    table {
        font-size: 13px;
        min-width: 600px;
    }

    th, td {
        padding: 8px 12px !important;
    }

    /* VPS cards */
    .vps-card-stats {
        grid-template-columns: 1fr 1fr !important;
    }

    .vps-card-header {
        flex-direction: column;
        gap: 8px;
    }

    .vps-card-footer {
        flex-direction: column;
        gap: 8px;
    }

    .vps-card-footer .btn {
        width: 100% !important;
    }

    /* Ações */
    .action-row,
    .action-buttons,
    [style*="display:flex; gap:12px; flex-wrap:wrap;"] {
        flex-direction: column;
    }

    .action-row .btn,
    .action-buttons .btn,
    [style*="display:flex; gap:12px; flex-wrap:wrap;"] .btn {
        width: 100% !important;
        justify-content: center;
    }

    /* Tickets */
    .msg-bubble {
        max-width: 95% !important;
    }

    .msg-admin {
        align-self: flex-end !important;
    }

    .msg-cliente {
        align-self: flex-start !important;
    }

    /* Tabs de serviço */
    .servico-type-tabs {
        flex-wrap: wrap;
    }

    .servico-type-tabs button {
        font-size: 12px;
        padding: 6px 12px;
        flex: 1;
        min-width: 80px;
    }

    .servico-select-group {
        grid-template-columns: 1fr !important;
    }

    /* Auth */
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        display: none;
    }

    .auth-form-side {
        padding: 20px;
    }

    /* Planos */
    .plan-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .dashboard-stats {
        grid-template-columns: 1fr !important;
    }

    .stat-card-dash .stat-number {
        font-size: 20px !important;
    }

    .client-topbar h2,
    .topbar .brand {
        font-size: 13px !important;
    }

    .client-topbar,
    .topbar {
        padding-left: 56px !important;
        padding-right: 12px !important;
        min-height: 50px;
    }

    .menu-toggle {
        width: 36px;
        height: 36px;
        top: 8px;
        left: 8px;
    }

    .menu-toggle svg {
        width: 18px;
        height: 18px;
    }

    .client-sidebar,
    .admin-sidebar {
        width: 260px;
    }

    .client-content,
    .container {
        padding: 12px !important;
    }

    .card-pad {
        padding: 16px !important;
    }

    .vps-card-header {
        padding: 14px 16px !important;
    }

    .vps-card-stats .vps-stat {
        padding: 8px 12px !important;
    }

    .vps-card-footer {
        padding: 12px 16px !important;
    }

    .vps-info-card {
        padding: 12px 14px !important;
    }

    .btn {
        font-size: 13px;
        padding: 8px 14px;
    }

    .btn-sm {
        font-size: 12px;
        padding: 5px 10px;
    }

    .badge {
        font-size: 10px;
        padding: 2px 7px;
    }

    .stat-card {
        padding: 14px 16px !important;
    }

    .stat-card strong {
        font-size: 20px !important;
    }

    .page-header h1 {
        font-size: 20px !important;
    }

    .empty-state {
        padding: 32px 16px !important;
    }

    .empty-state h3 {
        font-size: 16px !important;
    }

    .servico-type-tabs button {
        font-size: 11px;
        padding: 5px 10px;
        min-width: 60px;
    }

    .servico-mini {
        flex-wrap: wrap;
        padding: 10px 12px !important;
    }

    .servico-mini .servico-info {
        min-width: 100px;
    }
}
