:root {
    --primary: #6a11cb;
    --secondary: #2575fc;
    --success: #00b09b;
    --warning: #ffa726;
    --danger: #ff416c;
    --light: #f8f9fa;
    --dark: #343a40;
    --gray: #6c757d;
    --light-gray: #e9ecef;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: block;
}

/* Navbar Superior */
.navbar {
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    height: 70px;
    position: fixed;
    left: 0;
    top: 0;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    z-index: 1000;
}

.navbar-content {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.logo {
    padding: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: none;
}

.logo i {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 0;
}

.logo h1 {
    font-size: 1.2rem;
    color: var(--dark);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
    padding: 5px;
}

.menu {
    list-style: none;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.menu li {
    padding: 8px 16px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--gray);
    font-weight: 500;
    font-size: 0.95rem;
}

.menu li:hover {
    background: var(--light-gray);
    color: var(--primary);
    transform: translateY(-2px);
}

.menu li.active {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 10px rgba(106, 17, 203, 0.3);
}

.menu li i {
    margin-right: 10px;
    width: 20px;
}

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info .avatar {
    width: 40px;
    height: 40px;
    background: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

/* Conteúdo Principal */
.content {
    flex: 1;
    margin-left: 0;
    padding-top: 70px;
    min-height: 100vh;
    background: var(--light);
}

.top-bar {
    background: white;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 70px;
    z-index: 100;
}

.page-title h2 {
    color: var(--dark);
    margin-bottom: 5px;
}

.page-title p {
    color: var(--gray);
    font-size: 0.9rem;
}

.search-bar {
    position: relative;
    flex: 0.5;
}

.search-bar input {
    width: 100%;
    padding: 10px 20px 10px 40px;
    border: 1px solid var(--light-gray);
    border-radius: 25px;
    font-size: 0.9rem;
}

.search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

.notifications {
    position: relative;
    font-size: 1.2rem;
    color: var(--gray);
    cursor: pointer;
}

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Área de Conteúdo */
.page-content {
    padding: 30px;
}

/* Cards de Dashboard */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card i {
    font-size: 2rem;
    margin-bottom: 15px;
}

.card h3 {
    color: var(--dark);
    margin-bottom: 10px;
}

.card .value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
}

.card .label {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Cards de Sorvetes */
.sorvetes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.sorvete-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--light-gray);
}

.sorvete-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 10px;
}

.sorvete-header h3 {
    color: var(--dark);
    font-size: 1.2rem;
}

.preco {
    background: linear-gradient(45deg, var(--success), var(--secondary));
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
}

.sorvete-info p {
    color: var(--gray);
    margin: 8px 0;
    font-size: 0.9rem;
}

.sorvete-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.sorvete-actions button {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-editar {
    background: var(--warning);
    color: white;
}

.btn-vender {
    background: var(--success);
    color: white;
}

.btn-editar:hover {
    background: #f57c00;
}

.btn-vender:hover {
    background: #009688;
}

/* Botões */
.btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(106, 17, 203, 0.3);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
}

/* Formulários */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

/* Tabelas */
.table-container {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: var(--light-gray);
    padding: 15px;
    text-align: left;
    color: var(--dark);
    font-weight: 600;
    border-bottom: 2px solid var(--light-gray);
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--light-gray);
    color: var(--gray);
}

tr:hover {
    background: #f8f9fa;
}

/* Boletos */
.boleto-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 5px solid;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.boleto-card[data-status="pendente"] {
    border-left-color: var(--warning);
    animation: pulse 2s infinite;
}

.boleto-card[data-status="pago"] {
    border-left-color: var(--success);
}

.boleto-card[data-status="atrasado"] {
    border-left-color: var(--danger);
}

.status-badge {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.boleto-card[data-status="pendente"] .status-badge {
    background: var(--warning);
    color: white;
}

/* Animações */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 167, 38, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 167, 38, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 167, 38, 0); }
}

/* Responsividade */
@media (max-width: 992px) {
    .menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease-in-out;
        gap: 10px;
    }

    .menu.show {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .menu li {
        width: 100%;
        padding: 15px;
        border-radius: 10px;
    }

    .mobile-toggle {
        display: block;
    }

    .user-info .user-name {
        display: none;
    }
}

@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .search-bar {
        width: 100%;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .sorvetes-grid {
        grid-template-columns: 1fr;
    }
}