/* Reset e configurações gerais */
* {
    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;
    color: #333;
}

.container {
    max-width: 1700px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.header img {
    height: 50px;
    width: auto;
    border-radius: 8px;
}

.header h1 {
    color: #4a5568;
    margin-bottom: 10px;
    font-size: 2.5em;
}

.header p {
    color: #718096;
    font-size: 1.1em;
}

/* Header com logo */
.header-with-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    text-align: left;
}

.header-logo {
    height: 50px;
    width: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.header-content {
    flex: 1;
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
}

/* Botões */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
}

/* Grid */
.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .row {
        grid-template-columns: 1fr;
    }
}

/* Lista de máquinas */
.maquina-item {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.maquina-item.verificada {
    border-left-color: #48bb78;
    background: rgba(72, 187, 120, 0.1);
}

.maquina-item:hover {
    transform: translateX(5px);
}

.maquina-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 10px;
}

.maquina-title {
    font-size: 1.2em;
    font-weight: 600;
    color: #2d3748;
}

.maquina-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
}

.status-verificada {
    background: #c6f6d5;
    color: #276749;
}

.status-pendente {
    background: #fed7d7;
    color: #c53030;
}

.maquina-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    font-size: 0.9em;
}

.maquina-detail span {
    font-weight: 600;
    color: #4a5568;
}

/* Admin link */
.admin-link {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

/* Alertas */
.alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 600;
}

.alert-success {
    background: #c6f6d5;
    color: #276749;
    border: 1px solid #9ae6b4;
}

.alert-error {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #feb2b2;
}

/* Tabs */
.tabs {
    display: flex;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 5px;
}

.tab {
    padding: 12px 25px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
}

.tab.active {
    background: #667eea;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Botão Voltar */
.btn-voltar {
    background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
    color: white;
    margin-bottom: 20px;
}

.btn-voltar:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(113, 128, 150, 0.4);
}

/* Status atualizados */
.status-alocada {
    background: #c6f6d5;
    color: #276749;
}

.status-estoque {
    background: #fefcbf;
    color: #744210;
}

/* Tabelas admin */
.table-admin {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table-admin th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    text-align: center;
}

.table-admin td {
    padding: 12px 15px;
    border-bottom: 1px solid #e2e8f0;
}

.table-admin tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

/* Cards de estatísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #667eea;
    margin: 10px 0;
}

.stat-label {
    color: #718096;
    font-size: 1.1em;
}

/* Formulários admin */
.form-admin {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Menu admin melhorado */
.menu-admin {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.menu-admin a {
    margin-right: 20px;
    text-decoration: none;
    color: #4a5568;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.menu-admin a:hover {
    background: #667eea;
    color: white;
}

.menu-admin a.active {
    background: #667eea;
    color: white;
}
/* Estilos específicos para login */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    font-size: 3em;
    color: #667eea;
    margin-bottom: 10px;
}

.login-title {
    color: #2d3748;
    font-size: 1.8em;
    margin-bottom: 5px;
}

.login-subtitle {
    color: #718096;
    font-size: 1em;
}

.password-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    padding: 5px;
}

.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.back-to-site {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.back-to-site:hover {
    color: #764ba2;
}

.demo-credentials {
    background: #f7fafc;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    font-size: 0.9em;
    color: #4a5568;
}

.demo-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: #2d3748;
}

/* Animações para o login */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsividade para login */
@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .login-title {
        font-size: 1.5em;
    }
}
.status-esgotado {
    background: #fed7d7;
    color: #c53030;
}

/* Cores para os níveis de estoque */
.estoque-bom { color: #48bb78; }
.estoque-baixo { color: #ed8936; }
.estoque-esgotado { color: #f56565; }


/* ===== RESPONSIVIDADE MOBILE ===== */
@media (max-width: 768px) {
    .container {
        padding: 10px;
        margin: 0;
    }
    
    /* Header mobile */
    .header {
        padding: 15px;
        margin-bottom: 20px;
        text-align: center;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .header p {
        font-size: 1em;
    }
    
    /* Menu admin mobile */
    .menu-admin {
        padding: 15px;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    .menu-admin a {
        margin: 5px;
        padding: 8px 15px;
        font-size: 0.9em;
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
    
    /* Tabs mobile */
    .tabs {
        flex-direction: column;
        padding: 10px;
    }
    
    .tab {
        padding: 15px;
        margin: 2px 0;
        font-size: 1em;
    }
    
    /* Cards mobile */
    .card {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    /* Formulários mobile */
    .form-admin {
        padding: 20px;
    }
    
    .row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-control {
        padding: 15px;
        font-size: 16px; /* Evita zoom no iOS */
    }
    
    /* Botões mobile */
    .btn {
        padding: 15px 20px;
        font-size: 1em;
        width: 100%;
        margin: 5px 0;
    }
    
    .btn-voltar {
        margin-bottom: 15px;
    }
    
    /* Tabelas mobile */
    .table-admin {
        font-size: 0.8em;
    }
    
    .table-admin th,
    .table-admin td {
        padding: 8px 5px;
    }
    
    /* Esconder colunas menos importantes em mobile */
    .table-admin th:nth-child(4), /* Data */
    .table-admin td:nth-child(4),
    .table-admin th:nth-child(6), /* Gabinete */
    .table-admin td:nth-child(6),
    .table-admin th:nth-child(9), /* Retorno Rua */
    .table-admin td:nth-child(9) {
        display: none;
    }
    
    /* Máquinas na área pública - mobile */
    .maquina-item {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .maquina-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .maquina-details {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .maquina-detail {
        font-size: 0.9em;
    }
    
    /* Stats grid mobile */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 2em;
    }
    
    /* Admin link mobile */
    .admin-link {
        position: relative;
        top: auto;
        right: auto;
        margin-bottom: 15px;
        width: 100%;
    }
}

@media (max-width: 480px) {
    /* Ajustes para telas muito pequenas */
    .container {
        padding: 5px;
    }
    
    .header h1 {
        font-size: 1.5em;
    }
    
    .card {
        padding: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .menu-admin {
        flex-direction: column;
    }
    
    .menu-admin a {
        width: 100%;
        text-align: center;
    }
    
    /* Tabelas em mobile - transformar em cards */
    .table-admin {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .table-admin thead {
        display: none;
    }
    
    .table-admin tbody {
        display: block;
    }
    
    .table-admin tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        padding: 15px;
        background: white;
    }
    
    .table-admin td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
        border: none;
        border-bottom: 1px solid #f7fafc;
    }
    
    .table-admin td:before {
        content: attr(data-label);
        font-weight: bold;
        color: #4a5568;
        margin-right: 10px;
    }
    
    .table-admin td:last-child {
        border-bottom: none;
    }
}
@media (max-width: 768px) {
    .header-with-logo {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .header-logo {
        height: 40px;
    }
}