/* ============================================
   CRONOGRAMA — SLATE PROFISSIONAL
   Layout: Sidebar lateral fixa
   Paleta: Slate escuro + Índigo + Branco
   Tipografia: Inter
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* === VARIÁVEIS === */
:root {
    /* Sidebar */
    --sidebar-width: 240px;
    --sidebar-bg: #0f172a;
    --sidebar-border: #1e293b;
    --sidebar-text: #94a3b8;
    --sidebar-text-hover: #f1f5f9;
    --sidebar-active-bg: #1e293b;
    --sidebar-active-text: #fff;
    --sidebar-active-accent: #6366f1;

    /* Topbar */
    --topbar-height: 56px;
    --topbar-bg: #fff;
    --topbar-border: #e2e8f0;

    /* Página */
    --page-bg: #f8fafc;
    --content-padding: 28px;

    /* Índigo (ação primária) */
    --indigo-50:  #eef2ff;
    --indigo-100: #e0e7ff;
    --indigo-200: #c7d2fe;
    --indigo-300: #a5b4fc;
    --indigo-400: #818cf8;
    --indigo-500: #6366f1;
    --indigo-600: #4f46e5;
    --indigo-700: #4338ca;

    /* Slate (neutros) */
    --slate-50:  #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;

    /* Semânticas */
    --success-50:  #f0fdf4;
    --success-100: #dcfce7;
    --success-500: #22c55e;
    --success-600: #16a34a;
    --success-700: #15803d;

    --warning-50:  #fffbeb;
    --warning-100: #fef3c7;
    --warning-500: #f59e0b;
    --warning-600: #d97706;

    --danger-50:  #fef2f2;
    --danger-100: #fee2e2;
    --danger-500: #ef4444;
    --danger-600: #dc2626;

    --info-50:  #eff6ff;
    --info-100: #dbeafe;
    --info-500: #3b82f6;
    --info-600: #2563eb;

    /* Sombras */
    --shadow-xs:   0 1px 2px rgba(15,23,42,.04);
    --shadow-sm:   0 1px 3px rgba(15,23,42,.07), 0 1px 2px rgba(15,23,42,.04);
    --shadow-md:   0 4px 8px rgba(15,23,42,.08), 0 2px 4px rgba(15,23,42,.04);
    --shadow-lg:   0 12px 24px rgba(15,23,42,.10), 0 4px 8px rgba(15,23,42,.04);
    --shadow-xl:   0 24px 48px rgba(15,23,42,.12);
    --shadow-card: 0 1px 3px rgba(15,23,42,.08);
    --shadow-card-hover: 0 8px 24px rgba(15,23,42,.12);

    /* Raios */
    --radius-sm:   5px;
    --radius-md:   8px;
    --radius-lg:   12px;
    --radius-xl:   16px;
    --radius-full: 9999px;

    /* Transições */
    --transition-fast: 120ms ease;
    --transition-base: 200ms ease;
}

/* ============================================================
   BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--slate-700);
    background: var(--page-bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.has-sidebar {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.35;
    color: var(--slate-900);
    letter-spacing: -0.01em;
    margin-bottom: 0;
}
p { margin-bottom: 0; }
a { text-decoration: none; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    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: 200;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
}

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

.sidebar-logo-icon {
    width: 30px;
    height: 30px;
    background: var(--indigo-600);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-logo-icon i {
    color: #fff;
    font-size: 0.875rem;
}

.sidebar-logo-img {
    max-height: 32px;
    max-width: 160px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.sidebar-logo-text {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-nav {
    padding: 12px 0;
    flex: 1;
}

.sidebar-section-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--slate-600);
    padding: 12px 20px 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    color: var(--sidebar-text);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition-fast);
    border-left: 3px solid transparent;
    text-decoration: none;
}

.sidebar-link i {
    width: 16px;
    text-align: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.sidebar-link:hover {
    color: var(--sidebar-text-hover);
    background: var(--sidebar-active-bg);
}

.sidebar-link.active {
    color: #fff;
    background: var(--sidebar-active-bg);
    border-left-color: var(--indigo-500);
}

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

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
    height: var(--topbar-height);
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--topbar-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--content-padding);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-xs);
}

.topbar-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--slate-900);
}

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

/* ============================================================
   MAIN CONTENT WRAPPER
   ============================================================ */
.main-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-content {
    padding: var(--content-padding);
    flex: 1;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 4px;
}

.page-header p {
    color: var(--slate-500);
    font-size: 0.875rem;
}

.page-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.page-header-row h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--slate-900);
}

/* ============================================================
   CARDS PRINCIPAIS — Design Sofisticado
   ============================================================ */
.card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--slate-200);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
}

.main-container,
.card-panel {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--slate-200);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
    padding: 24px 28px;
    margin-bottom: 24px;
    transition: box-shadow 200ms ease;
}

.main-container:hover,
.card-panel:hover {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.03);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--slate-100);
}

.section-header h2,
.section-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--slate-800);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.01em;
}

.section-header h2 i,
.section-header h3 i {
    color: var(--indigo-500);
    font-size: 0.9375rem;
}

/* ============================================================
   ACTION CARDS (dashboard) — Design Sofisticado
   ============================================================ */
.action-card {
    background: linear-gradient(180deg, #fff 0%, var(--slate-50) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--slate-200);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    padding: 22px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    height: 100%;
    transition: all 220ms cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--indigo-500), var(--indigo-400));
    opacity: 0;
    transition: opacity 200ms ease;
}

.action-card:hover {
    border-color: var(--indigo-200);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12), 0 4px 8px rgba(15, 23, 42, 0.04);
    transform: translateY(-3px);
    background: #fff;
}

.action-card:hover::before {
    opacity: 1;
}

.action-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    flex-shrink: 0;
    transition: transform 200ms ease;
}

.action-card:hover .action-icon {
    transform: scale(1.05);
}

.action-icon.icon-indigo  { background: linear-gradient(135deg, var(--indigo-100) 0%, var(--indigo-50) 100%);   color: var(--indigo-600); }
.action-icon.icon-green   { background: linear-gradient(135deg, var(--success-100) 0%, var(--success-50) 100%);  color: var(--success-600); }
.action-icon.icon-amber   { background: linear-gradient(135deg, var(--warning-100) 0%, var(--warning-50) 100%);  color: var(--warning-600); }
.action-icon.icon-blue    { background: linear-gradient(135deg, var(--info-100) 0%, var(--info-50) 100%);     color: var(--info-600); }
.action-icon.icon-red     { background: linear-gradient(135deg, var(--danger-100) 0%, var(--danger-50) 100%);   color: var(--danger-600); }

/* mantendo compatibilidade com classes antigas */
.action-icon.text-success { background: linear-gradient(135deg, var(--success-100) 0%, var(--success-50) 100%); color: var(--success-600); }
.action-icon.text-info    { background: linear-gradient(135deg, var(--info-100) 0%, var(--info-50) 100%);    color: var(--info-600); }
.action-icon.text-warning { background: linear-gradient(135deg, var(--warning-100) 0%, var(--warning-50) 100%); color: var(--warning-600); }
.action-icon.text-primary { background: linear-gradient(135deg, var(--indigo-100) 0%, var(--indigo-50) 100%);  color: var(--indigo-600); }

.action-card h5 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--slate-800);
    margin-bottom: 2px;
    letter-spacing: -0.01em;
}

.action-card p {
    font-size: 0.8125rem;
    color: var(--slate-500);
    line-height: 1.5;
    margin-bottom: 0;
}

/* ============================================================
   CRONOGRAMA / ITEM CARDS — Design Sofisticado
   ============================================================ */
.cronograma-card,
.cliente-card,
.servico-card,
.feriado-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--slate-200);
    padding: 16px 20px;
    margin-bottom: 10px;
    transition: all 180ms cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.cronograma-card::before,
.cliente-card::before,
.servico-card::before,
.feriado-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--indigo-500);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    opacity: 0;
    transition: opacity 180ms ease;
}

.cronograma-card:hover,
.cliente-card:hover,
.servico-card:hover,
.feriado-card:hover {
    border-color: var(--indigo-200);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
    transform: translateX(2px);
}

.cronograma-card:hover::before,
.cliente-card:hover::before,
.servico-card:hover::before,
.feriado-card:hover::before {
    opacity: 1;
}

.servico-card.inativo,
.feriado-card.inativo {
    opacity: 0.5;
    background: var(--slate-50);
}

.servico-card.inativo::before,
.feriado-card.inativo::before {
    background: var(--slate-400);
}

/* ============================================================
   BOTÕES — Design Sofisticado
   ============================================================ */
.btn {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.8125rem;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 180ms cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
}

.btn:active {
    transform: scale(0.97);
}

.btn:focus-visible {
    outline: 2px solid var(--indigo-400);
    outline-offset: 2px;
}

/* Primário — índigo com gradiente sutil */
.btn-primary {
    background: linear-gradient(180deg, var(--indigo-500) 0%, var(--indigo-600) 100%);
    color: #fff;
    border: 1px solid var(--indigo-600);
    box-shadow: 0 1px 2px rgba(79, 70, 229, 0.15), inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn-primary:hover {
    background: linear-gradient(180deg, var(--indigo-600) 0%, var(--indigo-700) 100%);
    border-color: var(--indigo-700);
    color: #fff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25), inset 0 1px 0 rgba(255,255,255,0.1);
    transform: translateY(-1px);
}

/* Secundário — elegante com borda refinada */
.btn-secondary {
    background: linear-gradient(180deg, #fff 0%, var(--slate-50) 100%);
    color: var(--slate-700);
    border: 1px solid var(--slate-300);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
.btn-secondary:hover {
    background: linear-gradient(180deg, var(--slate-50) 0%, var(--slate-100) 100%);
    border-color: var(--slate-400);
    color: var(--slate-800);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

/* Sucesso — verde sofisticado */
.btn-success {
    background: linear-gradient(180deg, var(--success-500) 0%, var(--success-600) 100%);
    color: #fff;
    border: 1px solid var(--success-600);
    box-shadow: 0 1px 2px rgba(22, 163, 74, 0.15), inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn-success:hover {
    background: linear-gradient(180deg, var(--success-600) 0%, var(--success-700) 100%);
    border-color: var(--success-700);
    color: #fff;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
    transform: translateY(-1px);
}

/* Aviso — âmbar elegante */
.btn-warning {
    background: linear-gradient(180deg, var(--warning-500) 0%, var(--warning-600) 100%);
    color: #fff;
    border: 1px solid var(--warning-600);
    box-shadow: 0 1px 2px rgba(217, 119, 6, 0.15), inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn-warning:hover {
    background: linear-gradient(180deg, var(--warning-600) 0%, #b45309 100%);
    border-color: #b45309;
    color: #fff;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25);
    transform: translateY(-1px);
}

/* Perigo — vermelho sofisticado */
.btn-danger {
    background: linear-gradient(180deg, var(--danger-500) 0%, var(--danger-600) 100%);
    color: #fff;
    border: 1px solid var(--danger-600);
    box-shadow: 0 1px 2px rgba(220, 38, 38, 0.15), inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn-danger:hover {
    background: linear-gradient(180deg, var(--danger-600) 0%, #b91c1c 100%);
    border-color: #b91c1c;
    color: #fff;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
    transform: translateY(-1px);
}

/* Info — azul refinado */
.btn-info {
    background: linear-gradient(180deg, var(--info-500) 0%, var(--info-600) 100%);
    color: #fff;
    border: 1px solid var(--info-600);
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.15), inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn-info:hover {
    background: linear-gradient(180deg, var(--info-600) 0%, #1d4ed8 100%);
    border-color: #1d4ed8;
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    transform: translateY(-1px);
}

/* Outline variants — elegantes e minimalistas */
.btn-outline-secondary {
    background: transparent;
    color: var(--slate-600);
    border: 1px solid var(--slate-300);
}
.btn-outline-secondary:hover {
    background: var(--slate-50);
    border-color: var(--slate-400);
    color: var(--slate-700);
}

.btn-outline-primary {
    background: transparent;
    color: var(--indigo-600);
    border: 1px solid var(--indigo-300);
}
.btn-outline-primary:hover {
    background: var(--indigo-50);
    border-color: var(--indigo-400);
    color: var(--indigo-700);
}

.btn-outline-success {
    background: transparent;
    color: var(--success-600);
    border: 1px solid var(--success-300, #86efac);
}
.btn-outline-success:hover {
    background: var(--success-50);
    border-color: var(--success-500);
    color: var(--success-700);
}

.btn-outline-danger {
    background: transparent;
    color: var(--danger-600);
    border: 1px solid var(--danger-100);
}
.btn-outline-danger:hover {
    background: var(--danger-50);
    border-color: var(--danger-500);
    color: var(--danger-600);
}

/* Ghost button — sem borda, apenas texto */
.btn-ghost {
    background: transparent;
    color: var(--slate-600);
    border: 1px solid transparent;
}
.btn-ghost:hover {
    background: var(--slate-100);
    color: var(--slate-800);
}

/* Icon-only button */
.btn-icon {
    padding: 6px;
    min-width: 32px;
    min-height: 32px;
}
.btn-icon.btn-sm {
    padding: 4px;
    min-width: 28px;
    min-height: 28px;
}

/* Aliases legados */
.btn-modern,
.btn-custom         { font-family: 'Inter', sans-serif; font-weight: 500; font-size: 0.8125rem; border-radius: var(--radius-md); display: inline-flex; align-items: center; gap: 6px; transition: var(--transition-fast); cursor: pointer; text-decoration: none; }
.btn-primary-modern,
.btn-primary-custom { background: linear-gradient(180deg, var(--indigo-500) 0%, var(--indigo-600) 100%); color: #fff; border: 1px solid var(--indigo-600); }
.btn-primary-modern:hover,
.btn-primary-custom:hover { background: linear-gradient(180deg, var(--indigo-600) 0%, var(--indigo-700) 100%); color: #fff; }
.btn-outline-modern { background: #fff; color: var(--slate-600); border: 1px solid var(--slate-300); }
.btn-outline-modern:hover { background: var(--slate-50); }
.btn-success-custom { background: linear-gradient(180deg, var(--success-500) 0%, var(--success-600) 100%); color: #fff; border: 1px solid var(--success-600); }
.btn-success-custom:hover { background: linear-gradient(180deg, var(--success-600) 0%, var(--success-700) 100%); color: #fff; }
.btn-warning-custom { background: linear-gradient(180deg, var(--warning-500) 0%, var(--warning-600) 100%); color: #fff; border: 1px solid var(--warning-500); }
.btn-warning-custom:hover { background: linear-gradient(180deg, var(--warning-600) 0%, #b45309 100%); color: #fff; }
.btn-danger-custom  { background: linear-gradient(180deg, var(--danger-500) 0%, var(--danger-600) 100%);  color: #fff; border: 1px solid var(--danger-500); }
.btn-danger-custom:hover  { background: linear-gradient(180deg, var(--danger-600) 0%, #b91c1c 100%);  color: #fff; }
.btn-info-custom    { background: linear-gradient(180deg, var(--info-500) 0%, var(--info-600) 100%);    color: #fff; border: 1px solid var(--info-500); }
.btn-info-custom:hover    { background: linear-gradient(180deg, var(--info-600) 0%, #1d4ed8 100%);    color: #fff; }

/* Tamanhos */
.btn-sm  { padding: 6px 12px;  font-size: 0.75rem; border-radius: 6px; }
.btn-md  { padding: 8px 16px;  font-size: 0.8125rem; }
.btn-lg  { padding: 12px 24px; font-size: 0.9375rem; border-radius: 10px; }
.btn:not(.btn-sm):not(.btn-lg):not(.btn-icon) { padding: 8px 16px; }

/* ============================================================
   TABELAS — Design Sofisticado
   ============================================================ */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}

.table thead th {
    background: linear-gradient(180deg, var(--slate-50) 0%, var(--slate-100) 100%);
    color: var(--slate-700);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 12px 16px;
    border-bottom: 2px solid var(--slate-200);
    text-align: left;
    white-space: nowrap;
}

.table thead th:first-child {
    border-radius: var(--radius-md) 0 0 0;
}

.table thead th:last-child {
    border-radius: 0 var(--radius-md) 0 0;
}

.table tbody tr {
    transition: all 150ms ease;
}

.table tbody tr:nth-child(even) {
    background: var(--slate-50);
}

.table tbody tr:hover {
    background: var(--indigo-50);
}

.table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--slate-100);
    color: var(--slate-700);
    vertical-align: middle;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:last-child td:first-child {
    border-radius: 0 0 0 var(--radius-md);
}

.table tbody tr:last-child td:last-child {
    border-radius: 0 0 var(--radius-md) 0;
}

/* Tabela compacta */
.table-sm thead th {
    padding: 10px 12px;
    font-size: 0.6875rem;
}

.table-sm tbody td {
    padding: 10px 12px;
}

/* Tabela com borda */
.table-bordered {
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Tabela responsiva */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
    border: 1px solid var(--slate-200);
    background: #fff;
}

.table-responsive .table {
    margin-bottom: 0;
}

/* Célula de ações */
.table .actions-cell {
    white-space: nowrap;
    text-align: right;
}

.table .actions-cell .btn {
    margin-left: 4px;
}

.table .actions-cell .btn:first-child {
    margin-left: 0;
}

/* ============================================================
   FORMULÁRIOS — Design Sofisticado
   ============================================================ */
.form-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--slate-600);
    margin-bottom: 6px;
    display: block;
    letter-spacing: 0.01em;
}

.form-control,
.form-select {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--slate-300);
    background: #fff;
    color: var(--slate-800);
    transition: all 180ms cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.form-control:hover,
.form-select:hover {
    border-color: var(--slate-400);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--indigo-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12), 0 1px 2px rgba(15, 23, 42, 0.04);
    outline: none;
}

.form-control::placeholder {
    color: var(--slate-400);
}

.form-control-sm {
    padding: 8px 12px;
    font-size: 0.8125rem;
}

.form-control-lg {
    padding: 12px 16px;
    font-size: 0.9375rem;
}

/* Textarea */
textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* Checkbox e Radio */
.form-check-input {
    width: 18px;
    height: 18px;
    border: 2px solid var(--slate-300);
    border-radius: 4px;
    transition: all 150ms ease;
    cursor: pointer;
}

.form-check-input:hover {
    border-color: var(--indigo-400);
}

.form-check-input:checked {
    background-color: var(--indigo-600);
    border-color: var(--indigo-600);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.form-check-input[type="radio"] {
    border-radius: 50%;
}

.form-check-label {
    font-size: 0.875rem;
    color: var(--slate-700);
    cursor: pointer;
    margin-left: 2px;
}

/* Input group */
.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .form-control {
    border-radius: 0;
}

.input-group .form-control:first-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.input-group .form-control:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.input-group-text {
    background: var(--slate-100);
    border: 1px solid var(--slate-300);
    padding: 10px 14px;
    font-size: 0.875rem;
    color: var(--slate-600);
}

/* Servico item */
.servico-item {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    margin-bottom: 8px;
    border: 1px solid var(--slate-200);
    transition: all 180ms cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.servico-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--indigo-500);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    opacity: 0;
    transition: opacity 150ms ease;
}

.servico-item:hover {
    border-color: var(--indigo-300);
    background: var(--indigo-50);
    transform: translateX(2px);
}

.servico-item.selecionado {
    border-color: var(--indigo-500);
    background: var(--indigo-50);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12);
}

.servico-item.selecionado::before {
    opacity: 1;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge, .badge-modern { font-family: 'Inter', sans-serif; font-weight: 500; font-size: 0.6875rem; padding: 3px 8px; border-radius: var(--radius-sm); display: inline-flex; align-items: center; gap: 4px; line-height: 1.4; }

.badge-primary  { background: var(--indigo-100);   color: var(--indigo-700); }
.badge-success  { background: var(--success-100);  color: var(--success-700); }
.badge-warning  { background: var(--warning-100);  color: var(--warning-600); }
.badge-danger   { background: var(--danger-100);   color: var(--danger-600); }
.badge-info     { background: var(--info-100);     color: var(--info-600); }
.badge-secondary { background: var(--slate-100);   color: var(--slate-600); }

/* Status badge — posicionado no canto superior direito do card */
.status-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1;
    white-space: nowrap;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-ativo {
    background: var(--success-100);
    color: var(--success-700);
    border: 1px solid rgba(22, 163, 74, 0.2);
}

.status-ativo::before {
    background: var(--success-500);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
    animation: pulse-green 2s ease-in-out infinite;
}

.status-inativo {
    background: var(--slate-100);
    color: var(--slate-500);
    border: 1px solid var(--slate-200);
}

.status-inativo::before {
    background: var(--slate-400);
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25); }
    50%       { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1); }
}

.tipo-badge { padding: 3px 8px; border-radius: var(--radius-sm); font-size: 0.6875rem; font-weight: 500; }
.tipo-nacional   { background: var(--success-100); color: var(--success-700); }
.tipo-estadual   { background: var(--info-100);    color: var(--info-600); }
.tipo-municipal  { background: var(--warning-100); color: var(--warning-600); }
.tipo-facultativo { background: var(--danger-100); color: var(--danger-600); }

.priority-badge { width: 26px; height: 26px; border-radius: var(--radius-full); background: var(--indigo-600); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.75rem; flex-shrink: 0; }
.prazo-badge { background: var(--indigo-100); color: var(--indigo-700); padding: 4px 8px; border-radius: var(--radius-sm); font-weight: 500; font-size: 0.75rem; display: inline-flex; align-items: center; gap: 4px; }

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 0; bottom: 0; width: 2px; background: var(--slate-200); }

.timeline-item { position: relative; margin-bottom: 10px; background: #fff; border-radius: var(--radius-md); padding: 14px 16px; border: 1px solid var(--slate-200); transition: var(--transition-fast); }
.timeline-item:hover { border-color: var(--indigo-200); box-shadow: var(--shadow-sm); }
.timeline-item::before { content: ''; position: absolute; left: -22px; top: 18px; width: 10px; height: 10px; border-radius: 50%; background: var(--indigo-500); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--indigo-200); }
.timeline-item .priority-badge { position: absolute; top: 14px; right: 14px; }

/* ============================================================
   INFO CARD + DATA DESTAQUE + MENSAGEM
   ============================================================ */
.info-card { background: var(--slate-900); color: #fff; border-radius: var(--radius-lg); padding: 20px 24px; margin-bottom: 20px; }
.info-card h5 { color: #fff; font-weight: 500; font-size: 0.9375rem; margin-bottom: 3px; }
.info-card p  { color: var(--slate-400); font-size: 0.8125rem; margin-bottom: 2px; }

.data-destaque { background: var(--warning-100); padding: 5px 10px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.8125rem; color: var(--slate-800); display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--warning-500); }

.mensagem-container { background: var(--slate-50); border-radius: var(--radius-md); padding: 14px 16px; margin-top: 10px; border-left: 3px solid var(--indigo-500); position: relative; }
.mensagem-container .copy-button { position: absolute; top: 8px; right: 8px; }

/* ============================================================
   MODAIS
   ============================================================ */
.modal-content { border-radius: var(--radius-lg); border: none; box-shadow: var(--shadow-xl); }
.modal-header { background: var(--slate-900); color: #fff; border: none; padding: 14px 20px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.modal-header .modal-title { font-weight: 600; font-size: 0.9375rem; color: #fff; }
.modal-header .btn-close { filter: brightness(0) invert(1); opacity: 0.7; }
.modal-body { padding: 20px; }
.modal-footer { border-top: 1px solid var(--slate-200); padding: 12px 20px; background: var(--slate-50); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

/* ============================================================
   ALERTAS
   ============================================================ */
.alert { border-radius: var(--radius-md); padding: 10px 14px; font-size: 0.875rem; display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.alert-success  { background: var(--success-50);  color: var(--success-700); border: 1px solid var(--success-100); }
.alert-danger   { background: var(--danger-50);   color: var(--danger-600);  border: 1px solid var(--danger-100); }
.alert-warning  { background: var(--warning-50);  color: var(--warning-600); border: 1px solid var(--warning-100); }
.alert-info     { background: var(--info-50);     color: var(--info-600);    border: 1px solid var(--info-100); }
.alert-modern   { border-left-width: 3px; }

/* ============================================================
   ANO HEADER (feriados)
   ============================================================ */
.ano-header { background: var(--slate-100); color: var(--slate-700); padding: 8px 14px; border-radius: var(--radius-md); margin-bottom: 10px; font-weight: 600; font-size: 0.875rem; border-left: 3px solid var(--indigo-500); }

/* ============================================================
   CONFIG PAGE
   ============================================================ */
.config-card { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--slate-200); box-shadow: var(--shadow-card); padding: 20px 24px; margin-bottom: 20px; }
.config-section { border-bottom: 1px solid var(--slate-200); padding-bottom: 20px; margin-bottom: 20px; }
.config-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.config-section h5 { font-weight: 600; font-size: 0.9375rem; margin-bottom: 12px; color: var(--slate-800); }
.logo-preview { max-width: 180px; border: 1px dashed var(--slate-300); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; padding: 12px; background: var(--slate-50); min-height: 72px; }
.logo-preview img { max-width: 100%; max-height: 60px; object-fit: contain; }
.user-card { background: var(--slate-50); border-radius: var(--radius-md); padding: 12px 16px; margin-bottom: 8px; border: 1px solid var(--slate-200); }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page { min-height: 100vh; background: var(--slate-900); display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-container { background: #fff; padding: 36px 32px; border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); width: 100%; max-width: 380px; }
.login-header { text-align: center; margin-bottom: 28px; }
.login-header .login-icon { width: 52px; height: 52px; border-radius: var(--radius-lg); background: var(--slate-900); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.login-header .login-icon i { font-size: 1.375rem; color: #fff; }
.login-header h2 { font-weight: 700; font-size: 1.25rem; margin-bottom: 4px; color: var(--slate-900); }
.login-header p  { color: var(--slate-500); font-size: 0.875rem; }
.btn-login { background: var(--slate-900); border: none; border-radius: var(--radius-md); padding: 10px; font-weight: 600; font-size: 0.875rem; color: #fff; width: 100%; transition: var(--transition-fast); cursor: pointer; display: block; text-align: center; }
.btn-login:hover { background: var(--slate-700); color: #fff; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state { text-align: center; padding: 48px 24px; color: var(--slate-500); }
.empty-state i  { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.35; display: block; }
.empty-state h5 { color: var(--slate-600); margin-bottom: 4px; font-size: 1rem; }
.empty-state p  { font-size: 0.875rem; }

/* ============================================================
   UTILITÁRIOS
   ============================================================ */
.text-primary { color: var(--indigo-600)  !important; }
.text-success { color: var(--success-600) !important; }
.text-warning { color: var(--warning-600) !important; }
.text-danger  { color: var(--danger-600)  !important; }
.text-info    { color: var(--info-600)    !important; }
.text-muted   { color: var(--slate-500)   !important; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 992px) {
    :root { --sidebar-width: 200px; }
}

@media (max-width: 768px) {
    :root { --sidebar-width: 0px; --content-padding: 16px; }

    .sidebar { transform: translateX(-100%); transition: transform var(--transition-base); }
    .sidebar.open { transform: translateX(0); width: 240px; }

    .main-wrapper { margin-left: 0; }

    .topbar { padding: 0 16px; }

    .main-container, .card-panel, .config-card {
        padding: 16px;
    }

    .page-header-row { flex-direction: column; align-items: flex-start; }

    .action-card { padding: 16px; }
    .action-icon { width: 36px; height: 36px; font-size: 1rem; }

    .timeline { padding-left: 22px; }
    .timeline-item { padding: 12px 14px; }

    .login-container { padding: 28px 24px; }
}

@media (max-width: 576px) {
    .btn-group { flex-wrap: wrap; }
    .btn-group .btn { font-size: 0.75rem; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
    .sidebar, .topbar, .btn, .no-print { display: none !important; }
    body { background: #fff !important; }
    .main-wrapper { margin-left: 0 !important; }
    .main-container, .card-panel { box-shadow: none !important; border: none !important; }
}
