/* assets/style.css - Estilo completo do CRM Buffet */
/* Adicionando estilos para o novo sistema de vendas */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6977ff;
    --primary-dark: #FF1493;
    --secondary: #FFD700;
    --success: #98FB98;
    --danger: #FF6B6B;
    --warning: #FFB347;
    --info: #4ECDC4;
    --dark: #2C3E50;
    --light: #FFF5F8;
    --gray: #95A5A6;
    --white: #FFFFFF;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #FFF5F8 0%, #FFE4EC 100%);
    color: var(--dark);
    min-height: 100vh;
}

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    overflow-y: auto;
    box-shadow: 2px 0 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    z-index: 1000;
}

.main-content {
    margin-left: 280px;
    padding: 20px;
    min-height: 100vh;
}

.sidebar-brand {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 20px;
}

.sidebar-brand img {
    max-width: 120px;
    max-height: 80px;
    margin-bottom: 10px;
    border-radius: 10px;
}

.sidebar-brand h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 10px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
}

.sidebar-menu li {
    margin: 5px 15px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--white);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar-menu li a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(5px);
}

.sidebar-menu li.active a {
    background: var(--secondary);
    color: var(--dark);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.sidebar-menu li a i, 
.sidebar-menu li a span:first-child {
    margin-right: 12px;
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.top-bar {
    background: var(--white);
    border-radius: 20px;
    padding: 15px 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info span {
    font-weight: 500;
}

.user-info a {
    color: var(--danger);
    text-decoration: none;
    padding: 5px 15px;
    border-radius: 20px;
    background: rgba(255,107,107,0.1);
    transition: all 0.3s ease;
}

.user-info a:hover {
    background: var(--danger);
    color: white;
}

.card {
    background: var(--white);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.card-header {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.card-stats {
    text-align: center;
    padding: 15px;
}

.card-stats .number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.card-stats .label {
    color: var(--gray);
    font-size: 0.85rem;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: -10px;
}

.col {
    flex: 1;
    padding: 10px;
    min-width: 250px;
}

.col-3 { width: 25%; padding: 10px; }
.col-4 { width: 33.333%; padding: 10px; }
.col-6 { width: 50%; padding: 10px; }
.col-12 { width: 100%; padding: 10px; }

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead tr {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

table th, table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

table tbody tr:hover {
    background: #f9f9f9;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,105,180,0.1);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,105,180,0.3);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--dark);
}

.btn-success {
    background: var(--success);
    color: var(--dark);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: var(--dark);
}

.btn-info {
    background: var(--info);
    color: white;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.8rem;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success { background: var(--success); color: var(--dark); }
.badge-danger { background: var(--danger); color: white; }
.badge-warning { background: var(--warning); color: var(--dark); }
.badge-info { background: var(--info); color: white; }
.badge-primary { background: var(--primary); color: white; }
.badge-secondary { background: var(--gray); color: white; }

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

.modal-content.large {
    max-width: 800px;
}

@keyframes modalSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: var(--primary);
}

.modal-close {
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--gray);
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.chart-container {
    position: relative;
    height: 300px;
    margin: 20px 0;
}

.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.alert-success {
    background: var(--success);
    color: var(--dark);
    border-left: 4px solid #2ecc71;
}

.alert-danger {
    background: #ffe0e0;
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: #e0f7fa;
    color: var(--info);
    border-left: 4px solid var(--info);
}

.alert-close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.2rem;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.login-card {
    background: var(--white);
    border-radius: 30px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    text-align: center;
}

.login-card h2 {
    color: var(--primary);
    margin-bottom: 10px;
}

.login-card .logo {
    max-width: 120px;
    margin-bottom: 20px;
}

.login-card .form-group {
    text-align: left;
}

.calendario-container {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
}

.calendario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendario-header button {
    background: var(--primary);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calendario-header button:hover {
    transform: scale(1.1);
}

.calendario-header h3 {
    font-size: 1.2rem;
    color: var(--primary);
}

.calendario-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendario-dia-nome {
    text-align: center;
    font-weight: bold;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 10px;
    font-size: 0.8rem;
}

.calendario-dia {
    min-height: 80px;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 5px;
    background: white;
    transition: all 0.3s ease;
}

.calendario-dia:hover {
    background: #f8f9fa;
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.calendario-dia.vazio {
    background: #fafafa;
    border: 1px dashed #ddd;
}

.calendario-dia.tem-evento-pendente {
    background: #fff3e0;
    border-color: var(--warning);
}

.calendario-dia.tem-evento-confirmado {
    background: #e0f7e8;
    border-color: var(--success);
}

.calendario-dia.tem-evento-concluido {
    background: #e0f0ff;
    border-color: var(--info);
}

.calendario-dia.tem-evento-cancelado {
    background: #ffe0e0;
    border-color: var(--danger);
}

.dia-numero {
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: var(--dark);
}

.evento-item {
    font-size: 0.7rem;
    padding: 2px 5px;
    border-radius: 5px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.evento-item-pendente { background: var(--warning); color: var(--dark); }
.evento-item-confirmado { background: var(--success); color: var(--dark); }
.evento-item-concluido { background: var(--info); color: white; }
.evento-item-cancelado { background: var(--danger); color: white; }

.whatsapp-link {
    color: #25D366;
    font-size: 1.2rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.whatsapp-link:hover {
    color: #128C7E;
}

.assinatura-canvas {
    border: 2px dashed #ddd;
    border-radius: 12px;
    background: white;
    cursor: crosshair;
    margin-bottom: 10px;
    width: 100%;
    height: auto;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-success { color: #2ecc71; }
.text-danger { color: #e74c3c; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 15px; }
.p-2 { padding: 10px; }
.p-3 { padding: 15px; }

.menu-toggle {
    display: none;
}

/* ==================== NOVOS ESTILOS PARA ADMIN ==================== */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.admin-tabs {
    display: flex;
    gap: 5px;
    background: white;
    padding: 10px;
    border-radius: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.admin-tab {
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--dark);
    transition: all 0.3s;
}

.admin-tab.active {
    background: var(--primary);
    color: white;
}

.admin-tab:hover:not(.active) {
    background: #f0f0f0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    color: var(--gray);
    margin-top: 5px;
}

.mp-config {
    background: #009ee3;
    color: white;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.webhook-url {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 8px;
    font-family: monospace;
    word-break: break-all;
}

/* ==================== RESPONSIVIDADE MOBILE ==================== */
@media (max-width: 992px) {
    .col-3, .col-4, .col-6 {
        width: 50%;
    }
}

@media (max-width: 768px) {
    .sidebar {
        left: -280px;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
        padding: 15px;
        padding-top: 70px;
    }
    
    .menu-toggle {
        display: flex;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1001;
        background: var(--primary);
        color: white;
        width: 48px;
        height: 48px;
        border-radius: 12px;
        justify-content: center;
        align-items: center;
        font-size: 1.3rem;
        cursor: pointer;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }
    
    .col-3, .col-4, .col-6 {
        width: 100%;
    }
    
    .top-bar {
        flex-direction: column;
        text-align: center;
        padding: 12px 15px;
    }
    
    .page-title {
        font-size: 1.2rem;
    }
    
    .user-info {
        justify-content: center;
    }
    
    .card-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .card-header .btn {
        width: 100%;
        justify-content: center;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .btn-sm {
        width: auto;
    }
    
    .table-responsive {
        overflow-x: visible;
    }
    
    table {
        width: 100%;
        display: table;
    }
    
    table thead {
        display: none;
    }
    
    table tbody tr {
        display: block;
        width: 100%;
        margin-bottom: 15px;
        border: 1px solid #e0e0e0;
        border-radius: 16px;
        padding: 12px;
        background: white;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }
    
    table tbody td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid #f0f0f0;
        text-align: right;
        gap: 15px;
    }
    
    table tbody td:last-child {
        border-bottom: none;
        padding-bottom: 5px;
    }
    
    table tbody td:before {
        content: attr(data-label);
        font-weight: 600;
        text-align: left;
        flex: 1;
        color: var(--primary);
        font-size: 0.8rem;
        background: #fff5f8;
        padding: 4px 8px;
        border-radius: 8px;
        display: inline-block;
        max-width: 110px;
    }
    
    .card-stats {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
        padding: 15px;
    }
    
    .card-stats .number {
        font-size: 1.8rem;
    }
    
    .card-stats i {
        margin-top: 0 !important;
        font-size: 2rem;
    }
    
    .chart-container {
        height: 250px;
    }
    
    .calendario-container {
        padding: 10px;
        overflow-x: auto;
    }
    
    .calendario-grid {
        min-width: 350px;
    }
    
    .calendario-dia {
        min-height: 65px;
    }
    
    .modal-content {
        width: 95%;
        margin: 0 auto;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    .form-control {
        font-size: 16px;
        padding: 12px;
    }
    
    .item-orcamento > div {
        flex-direction: column !important;
    }
    
    .item-orcamento > div > div {
        width: 100% !important;
    }
    
    .item-orcamento button.remove-item {
        width: 100%;
        margin-top: 8px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 10px;
        padding-top: 65px;
    }
    
    .card {
        padding: 15px;
    }
    
    .page-title {
        font-size: 1.1rem;
    }
    
    .calendario-dia {
        min-height: 55px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card, .table-responsive, .alert {
    animation: fadeIn 0.5s ease;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}