:root {
    --bg-body: #0b1120;
    --bg-header: #0f172a;
    --bg-sidebar: #020617;
    --bg-card: #020617;
    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --danger: #dc2626;
    --border-color: #1f2937;
    --radius: 10px;
    --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.7);
}

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

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #1d4ed8 0, #020617 45%, #000 100%);
    color: var(--text-main);
}

/* Layout */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-header {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    color: var(--text-main);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.app-header-title {
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #22c55e;
}

.app-header-user a {
    color: #f97316;
    text-decoration: none;
    margin-left: 6px;
}

.app-header-user a:hover {
    text-decoration: underline;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}


/* Sidebar */
.sidebar {
    width: 240px;
    background: rgba(15, 23, 42, 0.98);
    color: var(--text-main);
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin: 4px 4px 6px;
}

.sidebar-nav a {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 4px;
    transition: background 0.15s ease, transform 0.08s ease;
}

.sidebar-nav a:hover {
    background: rgba(37, 99, 235, 0.3);
    transform: translateX(2px);
}

/* Main */
.main-content-wrapper {
    flex: 1;
    padding: 20px 24px 32px;
    background: radial-gradient(circle at top left, rgba(59,130,246,0.25), transparent 65%),
                radial-gradient(circle at bottom, rgba(16,185,129,0.18), transparent 60%);
}

.main-card {
    background: rgba(15, 23, 42, 0.96);
    border-radius: 18px;
    padding: 20px 22px;
    box-shadow: var(--shadow-soft);
    color: var(--text-main);
}

.main-card h1 {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.main-card h2,
.main-card h3 {
    margin-top: 18px;
    margin-bottom: 8px;
    font-size: 1.05rem;
}

/* Summary cards */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-top: 6px;
}

.summary-card {
    background: linear-gradient(135deg, #111827, #1f2937);
    border-radius: 14px;
    padding: 10px 12px;
    border: 1px solid rgba(148,163,184,0.4);
}

.summary-card h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.summary-card p {
    font-size: 1.15rem;
    font-weight: 600;
}

/* Table */
.table-wrapper {
    margin-top: 10px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(55,65,81,0.9);
    background: rgba(15,23,42,0.98);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table th,
.table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(31,41,55,0.9);
}

.table th {
    background: #020617;
    text-align: left;
    font-weight: 500;
}

.table tr:nth-child(even) td {
    background: rgba(15,23,42,0.92);
}

.table tr:hover td {
    background: rgba(30,64,175,0.45);
}

/* Forms */
form {
    margin-top: 6px;
    margin-bottom: 12px;
}

label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 7px 8px;
    border-radius: 8px;
    border: 1px solid rgba(55,65,81,0.9);
    background: #020617;
    color: var(--text-main);
    font-size: 0.9rem;
}

textarea {
    min-height: 80px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 1px rgba(37,99,235,0.6);
}

/* Buttons – base */
.btn {
    display: inline-block;
    border-radius: 999px;
    padding: 7px 14px;
    border: 1px solid transparent;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.08s ease, box-shadow 0.12s ease;
}

/* Botão principal (uso em formulários, ações grandes) */
.btn-primary {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    border-color: #1d4ed8;
    color: #eef2ff;
    box-shadow: 0 10px 22px rgba(37,99,235,0.45);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(37,99,235,0.55);
}

/* Botão secundário */
.btn-secondary {
    background: #020617;
    border-color: rgba(148,163,184,0.7);
    color: #e5e7eb;
}

.btn-secondary:hover {
    background: rgba(30,64,175,0.7);
}

/* Botão vermelho principal */
.btn-danger {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border-color: #b91c1c;
    color: #fee2e2;
}

/* Tamanho pequeno base (refinado para combinar com .btn-clean) */
.btn-sm {
    padding: 4px 10px;
    font-size: 0.78rem;
    border-radius: 8px;
}

/* Alerts */
.alert {
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.alert-error {
    background: rgba(248,113,113,0.12);
    border: 1px solid #f97373;
    color: #fecaca;
}

.alert-success {
    background: rgba(34,197,94,0.10);
    border: 1px solid #22c55e;
    color: #bbf7d0;
}

/* Login */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, #1d4ed8, #020617);
}

.login-card {
    background: rgba(15,23,42,0.98);
    padding: 24px 26px;
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    color: var(--text-main);
    width: 100%;
    max-width: 360px;
}

.login-card h1 {
    font-size: 1.3rem;
    margin-bottom: 6px;
}

.login-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

/* Impressão */
.print-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.no-print {}

.print-only {
    display: none;
}

@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }

    .app-shell {
        display: block;
    }

    .sidebar,
    .app-header,
    .no-print {
        display: none !important;
    }

    .main-content-wrapper {
        padding: 0;
        background: #ffffff;
    }

    .main-card {
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        background: #ffffff;
        color: #000000;
    }

    .table-wrapper {
        border: 1px solid #000000;
        background: #ffffff;
    }

    .table th,
    .table td {
        border-color: #000000 !important;
        background: #ffffff !important;
        color: #000000 !important;
    }

    .print-only {
        display: block;
    }
}

/* ============================= */
/*  BOTÕES PEQUENOS SEM GLOW     */
/* ============================= */

/* Botões discretos, para ações rápidas (Nova OS, Nova venda, Editar, etc.) */
.btn-clean {
    display: inline-block;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    background: #1e3a8a !important; /* azul discreto */
    color: #e2e8f0 !important;
    border: 1px solid #1e40af !important;
    text-decoration: none;
    font-size: 0.82rem !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.08s ease;
}

.btn-clean:hover {
    background: #1d4ed8 !important;
    transform: translateY(-1px);
}

/* Versão discreta de perigo (ex: Remover, Excluir) */
.btn-clean-danger {
    display: inline-block;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    background: #7f1d1d !important;
    color: #fee2e2 !important;
    border: 1px solid #991b1b !important;
    text-decoration: none;
    font-size: 0.82rem !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.08s ease;
}

.btn-clean-danger:hover {
    background: #b91c1c !important;
    transform: translateY(-1px);
}
