/* Reset e estilos gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =============================================
   VARIÁVEIS GLOBAIS
   ============================================= */
:root {
    --red:          #c0392b;
    --red-dark:     #96281b;
    --red-light:    #e74c3c;
    --sidebar-bg:   #1a0a08;
    --sidebar-w:    260px;
    --topbar-h:     60px;
    --body-bg:      #f4f6fb;
    --card-bg:      #ffffff;
    --text-main:    #2d2d3a;
    --text-muted:   #888;
    --border:       #e4e4f0;
    --radius:       12px;
    --shadow:       0 2px 16px rgba(192,57,43,0.08);
    --sidebar-text: rgba(255,255,255,0.75);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--body-bg);
    min-height: 100vh;
    color: var(--text-main);
    scroll-behavior: smooth;
}

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform .3s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 18px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    text-decoration: none;
}

.sidebar-brand .brand-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 8px;
}

.sidebar-brand .brand-name {
    font-size: .95rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.sidebar-nav {
    flex: 1;
    padding: 10px 0;
}

.sidebar-nav .nav-section-title {
    font-size: .6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.3);
    padding: 14px 18px 5px;
    list-style: none;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px;
    color: var(--sidebar-text);
    border-radius: 8px;
    margin: 2px 8px;
    font-size: .88rem;
    font-weight: 500;
    text-decoration: none;
    transition: background .2s, color .2s;
}

.sidebar-nav .nav-link i {
    font-size: 1rem;
    width: 20px;
    flex-shrink: 0;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.sidebar-nav .nav-link.active {
    background: var(--red);
    color: #fff;
    box-shadow: 0 4px 14px rgba(192,57,43,0.4);
}

.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 12px;
    border-top: 1px solid rgba(255,255,255,0.07);
}

.sidebar-footer .user-info {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 1;
    min-width: 0;
}

.sidebar-footer .user-avatar i {
    font-size: 1.8rem;
    color: var(--red-light);
}

.sidebar-footer .user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar-footer .user-name {
    font-size: .82rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-footer .user-role {
    font-size: .7rem;
    color: rgba(255,255,255,0.4);
    text-transform: capitalize;
}

.sidebar-footer .logout-btn {
    color: rgba(255,255,255,0.45);
    font-size: 1.25rem;
    text-decoration: none;
    transition: color .2s;
    flex-shrink: 0;
    padding: 4px;
}

.sidebar-footer .logout-btn:hover { color: #ef4444; }

/* Overlay mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

/* =============================================
   TOPBAR
   ============================================= */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-w);
    right: 0;
    height: var(--topbar-h);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    z-index: 900;
    gap: 16px;
}

.topbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text-main);
    cursor: pointer;
    padding: 4px 8px;
}

.topbar-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    flex: 1;
}

/* =============================================
   LAYOUT PRINCIPAL
   ============================================= */
.main-content {
    margin-left: var(--sidebar-w);
    padding-top: var(--topbar-h);
    min-height: 100vh;
}

.page-content {
    padding: 0 28px 28px 28px;
}

/* =============================================
   CARDS NOVOS
   ============================================= */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--card-bg);
    overflow: hidden;
}

.card-header {
    padding: 16px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card-bg);
}

.card-header h2, .card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.card-header h2 i, .card-header h3 i {
    color: var(--red);
}

.card-body {
    padding: 22px;
}

/* Stat cards do dashboard */
.stat-card {
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s;
    text-decoration: none;
    color: inherit;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(192,57,43,0.12);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-icon.red    { background: rgba(192,57,43,.12); color: var(--red); }
.stat-icon.green  { background: rgba(34,197,94,.12);  color: #16a34a; }
.stat-icon.orange { background: rgba(245,158,11,.12); color: #d97706; }
.stat-icon.blue   { background: rgba(59,130,246,.12); color: #2563eb; }
.stat-icon.purple { background: rgba(124,58,237,.12); color: #7c3aed; }

.stat-info { min-width: 0; }

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1;
}

.stat-label {
    font-size: .78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Welcome section */
.welcome-section {
    margin-bottom: 28px;
}

.welcome-section h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.welcome-section .subtitle {
    font-size: .92rem;
    color: var(--text-muted);
}

/* =============================================
   RESPONSIVO SIDEBAR
   ============================================= */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-overlay.open {
        display: block;
    }
    .topbar {
        left: 0;
    }
    .topbar-toggle {
        display: block;
    }
    .main-content {
        margin-left: 0;
    }
    .page-content {
        padding: 0 16px 16px 16px;
    }
}

/* Container de Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 15px 50px rgba(102, 126, 234, 0.3);
    width: 100%;
    max-width: 450px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    animation: slideInUp 0.5s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.register-box {
    max-width: 500px;
}

.logo-container {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}

.logo {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.3));
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-subtitle {
    margin-top: 15px;
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.login-box h2 {
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
}

/* Formulários */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: normal !important;
    cursor: pointer;
    color: #666;
    font-size: 14px;
    transition: color 0.3s ease;
}

.checkbox-label:hover {
    color: #667eea;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

/* Botões */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-action {
    background: var(--red);
    color: white;
    width: 100%;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 7px;
    justify-content: center;
    border-radius: 8px;
    font-size: .88rem;
    padding: 9px 14px;
}

.btn-action:hover {
    background: var(--red-dark);
    color: white;
    transform: translateY(-1px);
}

.btn-logout {
    background: #e74c3c;
    color: white;
    padding: 8px 16px;
    font-size: 14px;
}

.btn-logout:hover {
    background: #c0392b;
}

/* Alertas */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background-color: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

/* Footer do Login */
.login-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
    color: #666;
    font-size: 14px;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
}

.login-footer a:hover {
    color: #764ba2;
}

.login-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.login-footer a:hover::after {
    width: 100%;
}

/* Navbar */
.navbar {
    background: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    padding: 18px 0;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-image-slice: 1;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.navbar.scrolled {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.25);
    padding: 12px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 5px 10px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.nav-logo:hover {
    background: rgba(102, 126, 234, 0.05);
}

.logo-nav {
    height: 55px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.2));
    transition: transform 0.3s ease;
}

.logo-nav:hover {
    transform: scale(1.05);
}

.nav-title {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-name {
    font-weight: 600;
    color: #333;
}

/* Container Principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px 20px 20px;
}

/* Seção de Boas-vindas */
.welcome-section {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.welcome-section h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.welcome-section .subtitle {
    font-size: 18px;
    opacity: 0.9;
}

/* Grid do Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

/* Cards */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
}

.card-header h2 {
    font-size: 22px;
}

.card-body {
    padding: 25px;
}

/* Informações */
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #666;
}

.info-value {
    color: #333;
}

/* Badges */
.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-ativo {
    background-color: #d4edda;
    color: #155724;
}

.badge-inativo {
    background-color: #f8d7da;
    color: #721c24;
}

/* Estatísticas */
.stat-item {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 10px;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: white;
    margin-top: 40px;
}

/* Responsividade */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .navbar {
        padding: 12px 0;
    }
    
    .nav-container {
        flex-direction: row;
        gap: 10px;
        padding: 0 15px;
    }
    
    .nav-logo {
        flex-direction: row;
        gap: 8px;
    }
    
    .logo-nav {
        height: 40px;
    }
    
    .nav-title {
        font-size: 16px;
    }
    
    .nav-user {
        gap: 10px;
    }
    
    .nav-user .user-name {
        display: none; /* Oculta nome do usuário em mobile para economizar espaço */
    }
    
    .nav-user .btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .container {
        padding-top: 10px;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .welcome-section h1 {
        font-size: 28px;
    }
    
    .login-box {
        padding: 30px 20px;
    }
    
    .logo-container {
        padding: 15px;
    }
    
    .logo {
        max-width: 150px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .table-responsive {
        overflow-x: auto;
    }
}

/* Estilos para Agendamentos */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 2px 0 10px 0;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-image-slice: 1;
}

.page-header h1 {
    color: #333;
    font-size: 26px;
    margin: 0;
}

/* Cards de Estatísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.stat-icon {
    font-size: 36px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.stat-icon-total {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-icon-pendente {
    background: linear-gradient(135deg, #ffa726 0%, #fb8c00 100%);
}

.stat-icon-confirmado {
    background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
}

.stat-icon-cancelado {
    background: linear-gradient(135deg, #ef5350 0%, #e53935 100%);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* Formulários de Agendamento */
.form-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.agendamento-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.form-section {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 25px;
}

.form-section:last-of-type {
    border-bottom: none;
}

.section-title {
    color: #667eea;
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 700;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group-small {
    flex: 0.5;
}

.form-group-large {
    flex: 2;
}

.form-group textarea {
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fafafa;
    resize: vertical;
}

.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-group select {
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafafa;
    cursor: pointer;
}

.form-group select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-help {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding-top: 20px;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Filtros */
.filters-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.filters-form {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Tabelas */
.table-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 24px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px; /* Garante largura mínima para não esconder botões */
}

.table td {
    vertical-align: middle;
}

@media (max-width: 900px) {
    .table {
        min-width: 700px;
    }
    .table-actions, .table td {
        white-space: nowrap;
    }
}

.btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 2px;
}

.btn-primary {
    background: #667eea;
    color: #fff;
}

.btn-primary:hover {
    background: #4b5fc1;
}

.btn-secondary {
    background: #dc3545;
    color: #fff;
}

.btn-secondary:hover {
    background: #a71d2a;
}

/* Badges de Status */
.badge-status-pendente {
    background: #fff3cd;
    color: #856404;
}

.badge-status-confirmado {
    background: #d4edda;
    color: #155724;
}

.badge-status-realizado {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-status-cancelado {
    background: #f8d7da;
    color: #721c24;
}

/* Badges para Orçamentos */
.badge-status-aprovado {
    background: #d4edda;
    color: #155724;
}

.badge-status-rejeitado {
    background: #f8d7da;
    color: #721c24;
}

.badge-status-expirado {
    background: #e2e3e5;
    color: #383d41;
}

/* Estado Vazio */
.empty-state {
    padding: 60px 20px;
    text-align: center;
}

.empty-state p {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

/* Botões de Status Rápido */
.status-actions {
    display: flex;
    gap: 5px;
    margin-top: 8px;
    justify-content: center;
}

.btn-status {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-block;
}

.btn-status-confirmado {
    background: #d4edda;
    color: #155724;
}

.btn-status-confirmado:hover {
    background: #c3e6cb;
    transform: scale(1.1);
}

.btn-status-realizado {
    background: #d1ecf1;
    color: #0c5460;
}

.btn-status-realizado:hover {
    background: #bee5eb;
    transform: scale(1.1);
}

.btn-status-cancelado {
    background: #f8d7da;
    color: #721c24;
}

.btn-status-cancelado:hover {
    background: #f5c6cb;
    transform: scale(1.1);
}

/* Estilos para Formulários de Orçamento */
.form-section {
    background: white;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.form-section h3 {
    color: #667eea;
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fafafa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
    margin-top: 30px;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 15px;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Filtros */
.filters-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.filters-form .form-group {
    flex: 1;
    margin-bottom: 0;
}

.filters-form .btn {
    margin-bottom: 0;
    white-space: nowrap;
}

/* Botões de Ação Rápida */
.quick-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-icon {
    padding: 8px 12px;
    font-size: 16px;
    min-width: 40px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-icon.btn-success {
    background: #28a745;
    color: white;
}

.btn-icon.btn-success:hover {
    background: #218838;
}

.btn-icon.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-icon.btn-danger:hover {
    background: #c82333;
}

.btn-icon.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-icon.btn-info:hover {
    background: #138496;
}

.btn-icon.btn-warning {
    background: #ffc107;
    color: #333;
}

.btn-icon.btn-warning:hover {
    background: #e0a800;
}

/* Responsividade para tabelas */
@media (max-width: 1200px) {
    .table {
        min-width: 1000px;
    }
    
    .table-responsive {
        border-radius: 0;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .table {
        min-width: 800px;
    }
    
    .page-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
    
    .filters-form {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Responsividade para Filtros */
@media (max-width: 768px) {
    .filters-form {
        flex-direction: column;
    }
    
    .filters-form .form-group {
        width: 100%;
    }
    
    .quick-actions {
        justify-content: flex-start;
    }
}

/* Media Query para Impressão */
@media print {
    .navbar {
        display: none !important;
    }
    
    .container {
        padding-top: 20px !important;
    }
    
    body {
        background: white !important;
    }
    
    .btn,
    .filters-card,
    .page-header .btn,
    .quick-actions,
    .footer {
        display: none !important;
    }
}

/* ========== Orçamentos - Topo Fixo ========== */
.orc-fixed-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 998;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.orc-fixed-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.orc-fixed-nav .logo-nav {
    height: 40px;
    filter: brightness(0) invert(1) drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

.orc-nav-btn {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    transition: all 0.25s ease;
}
.orc-nav-btn:hover {
    background: rgba(255,255,255,0.3);
}
.orc-nav-btn-logout {
    background: rgba(220,53,69,0.3);
    border-color: rgba(220,53,69,0.5);
}
.orc-nav-btn-logout:hover {
    background: rgba(220,53,69,0.5);
}

.orc-fixed-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 20px 14px 20px;
}

.orc-fixed-top .page-header {
    margin-bottom: 10px;
}

.orc-fixed-top .page-header h1 {
    color: #fff;
    font-size: 22px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.orc-fixed-top .page-header .btn {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.4);
    font-size: 14px;
    padding: 8px 18px;
}
.orc-fixed-top .page-header .btn:hover {
    background: rgba(255,255,255,0.35);
}

.orc-fixed-top .alert {
    margin-bottom: 8px;
    padding: 8px 14px;
    font-size: 14px;
    border-radius: 8px;
}

/* Stats compactos no topo fixo */
.orc-stats-compact {
    gap: 10px;
    margin-bottom: 10px;
}

.orc-stats-compact .stat-card {
    padding: 10px 16px;
    border-radius: 10px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(6px);
    box-shadow: none;
    border: 1px solid rgba(255,255,255,0.2);
}

.orc-stats-compact .stat-card:hover {
    background: rgba(255,255,255,0.25);
    transform: none;
    box-shadow: none;
}

.orc-stats-compact .stat-icon {
    width: 38px;
    height: 38px;
    font-size: 20px;
    border-radius: 8px;
}

.orc-stats-compact .stat-value {
    font-size: 22px;
    color: #fff;
}

.orc-stats-compact .stat-label {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
}

/* Filtros no topo fixo */
.orc-fixed-top .filters-card {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 10px;
    padding: 10px 16px;
    box-shadow: none;
}

.orc-fixed-top .filters-form {
    gap: 10px;
}

.orc-fixed-top .filter-group input,
.orc-fixed-top .filter-group select {
    padding: 9px 14px;
    border: 1.5px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
}

.orc-fixed-top .filter-group input::placeholder {
    color: rgba(255,255,255,0.6);
}

.orc-fixed-top .filter-group input:focus,
.orc-fixed-top .filter-group select:focus {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.6);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.1);
}

.orc-fixed-top .filter-group select {
    color: #fff;
}

.orc-fixed-top .filter-group select option {
    color: #333;
    background: #fff;
}

.orc-fixed-top .btn-action {
    background: rgba(255,255,255,0.25);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.4);
    padding: 9px 18px;
    font-size: 14px;
}
.orc-fixed-top .btn-action:hover {
    background: rgba(255,255,255,0.4);
}

.orc-fixed-top .btn-secondary {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 9px 18px;
    font-size: 14px;
}
.orc-fixed-top .btn-secondary:hover {
    background: rgba(255,255,255,0.2);
}

/* Conteúdo scrollável abaixo do topo fixo */
.orc-scroll-content {
    padding-top: 20px;
    margin-top: 0;
}

/* ========== Lista de Orçamentos - Cards Modernos ========== */
.orc-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
}

.orc-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #eef0f6;
}

.orc-card:hover {
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.18);
    transform: translateY(-2px);
}

.orc-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 0 20px;
}

.orc-card-id {
    font-size: 18px;
    font-weight: 800;
    color: #667eea;
    letter-spacing: -0.5px;
}

.orc-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.orc-badge-pendente {
    background: linear-gradient(135deg, #fff8e1, #fff3cd);
    color: #e65100;
    border: 1px solid #ffe0b2;
}

.orc-badge-aprovado {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    color: #1b5e20;
    border: 1px solid #a5d6a7;
}

.orc-badge-rejeitado {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    color: #b71c1c;
    border: 1px solid #ef9a9a;
}

/* Badges para status de entregas */
.orc-badge-realizada {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    color: #1b5e20;
    border: 1px solid #a5d6a7;
}

.orc-badge-cancelada {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    color: #b71c1c;
    border: 1px solid #ef9a9a;
}

.orc-badge-em_transito {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #0d6efd;
    border: 1px solid #90caf9;
}

.orc-badge-parcial {
    background: linear-gradient(135deg, #f3e5f5, #e1bee7);
    color: #7b1fa2;
    border: 1px solid #ce93d8;
}

.orc-badge-expirado {
    background: linear-gradient(135deg, #eceff1, #cfd8dc);
    color: #37474f;
    border: 1px solid #b0bec5;
}

.orc-card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    gap: 20px;
}

.orc-card-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.orc-card-cliente {
    display: flex;
    align-items: center;
    gap: 10px;
}

.orc-card-cliente .orc-icon {
    font-size: 20px;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #e8eaf6, #c5cae9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.orc-card-cliente div {
    display: flex;
    flex-direction: column;
}

.orc-card-cliente strong {
    font-size: 16px;
    color: #263238;
    line-height: 1.3;
}

.orc-card-cliente small {
    font-size: 13px;
    color: #78909c;
}

.orc-card-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.orc-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #546e7a;
}

.orc-meta-item .orc-icon {
    font-size: 15px;
}

.orc-card-valor {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    padding: 12px 18px;
    background: linear-gradient(135deg, #f3f0ff 0%, #ede7f6 100%);
    border-radius: 12px;
    min-width: 140px;
    text-align: right;
}

.orc-card-valor small {
    font-size: 11px;
    color: #7e57c2;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.orc-card-valor strong {
    font-size: 20px;
    color: #4527a0;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.orc-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #fafbfe;
    border-top: 1px solid #eef0f6;
    gap: 12px;
}

/* Botões de status (Aprovar/Rejeitar) */
.orc-status-actions {
    display: flex;
    gap: 8px;
}

.orc-btn-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
}

.orc-btn-aprovar {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1.5px solid #a5d6a7;
}

.orc-btn-aprovar:hover {
    background: #c8e6c9;
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(46, 125, 50, 0.2);
}

.orc-btn-rejeitar {
    background: #ffebee;
    color: #c62828;
    border: 1.5px solid #ef9a9a;
}

.orc-btn-rejeitar:hover {
    background: #ffcdd2;
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(198, 40, 40, 0.2);
}

/* Botões de ação (Imprimir, Editar, Pedido, Excluir) */
.orc-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.orc-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
}

.orc-btn-print {
    background: #e3f2fd;
    color: #1565c0;
    border: 1.5px solid #90caf9;
}
.orc-btn-print:hover {
    background: #bbdefb;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.25);
}

.orc-btn-edit {
    background: #fff8e1;
    color: #f57f17;
    border: 1.5px solid #ffe082;
}
.orc-btn-edit:hover {
    background: #ffecb3;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(245, 127, 23, 0.25);
}

.orc-btn-pedido {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1.5px solid #a5d6a7;
}
.orc-btn-pedido:hover {
    background: #c8e6c9;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.25);
}

.orc-btn-delete {
    background: #ffebee;
    color: #c62828;
    border: 1.5px solid #ef9a9a;
}
.orc-btn-delete:hover {
    background: #ffcdd2;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(198, 40, 40, 0.25);
}

/* Responsivo - Lista de Orçamentos */
@media (max-width: 768px) {
    .orc-list {
        padding: 16px;
        gap: 12px;
    }
    
    .orc-card-body {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .orc-card-valor {
        align-self: stretch;
        align-items: center;
        min-width: auto;
        text-align: center;
    }
    
    .orc-card-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .orc-actions {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
    
    .orc-status-actions {
        width: 100%;
        justify-content: center;
    }
    
    .orc-card-meta {
        gap: 12px;
    }
}
