@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');

:root {
    --primary-color: #3b82f6; /* Azul mais moderno */
    --secondary-color: #1f2937; /* Cinza escuro */
    --background-color: #f3f4f6; /* Cinza bem claro */
    --card-bg-color: #ffffff;
    --text-color: #374151; /* Cinza médio */
    --header-bg-color: #ffffff;
    --border-color: #e5e7eb; /* Cinza claro */
    --shadow-color: rgba(0, 0, 0, 0.05);
    --success-color: #10b981; /* Verde esmeralda */
    --error-color: #ef4444; /* Vermelho */
    --warning-color: #f59e0b; /* Âmbar */
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Layout principal fluido */
.container {
    width: 100%;
    padding: 1.5rem;
}

/* --- Formulários Melhorados --- */

/* Header do formulário */
.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.form-header h3 {
    margin: 0;
    color: var(--primary-color);
}

/* Barra de progresso */
.form-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    width: 200px;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.3s ease;
    width: 33%;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Steps do formulário */
.form-step {
    animation: fadeIn 0.3s ease;
}

.step-header {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.step-header h4 {
    margin: 0 0 0.5rem 0;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.step-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Grid de coordenadas */
.coordinates-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Seção de localização */
.location-section {
    text-align: center;
    margin: 1.5rem 0;
}

.location-btn {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.location-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.location-status {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.location-preview {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
    margin: 1rem 0;
    border-left: 4px solid var(--success-color);
}

.location-preview h4 {
    margin: 0 0 0.5rem 0;
    color: var(--success-color);
}

/* Card de confirmação */
.confirmation-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border: 2px solid var(--border-color);
}

.confirmation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.confirmation-item:last-child {
    border-bottom: none;
}

/* Navegação do formulário */
.form-navigation {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.nav-spacer {
    flex: 1;
}

/* Status de calibração */
.calibration-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-radius: 20px;
}

.status-indicator {
    font-size: 0.8rem;
}

.status-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Seções do formulário */
.form-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.section-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.section-header h4 {
    margin: 0 0 0.5rem 0;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.section-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Info da estação */
.station-info {
    margin-top: 1rem;
}

.info-card {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid #e1bee7;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    background: var(--warning-color);
    color: white;
}

/* Grid de medições */
.measurements-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Display de cálculo */
.calculation-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.calculation-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.calc-item {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-width: 100px;
}

.calc-item.total {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.calc-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.calc-item.total .calc-label {
    color: rgba(255, 255, 255, 0.9);
}

.calc-value {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.calc-value.regua {
    color: var(--primary-color);
}

.calc-value.sensor {
    color: var(--error-color);
}

.calc-unit {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.calc-item.total .calc-unit {
    color: rgba(255, 255, 255, 0.9);
}

.calc-operator {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-secondary);
    margin: 0 0.5rem;
}

.calculation-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.info-icon {
    font-size: 1.2rem;
}

/* Validação de cálculo */
.validation-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.validation-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.validation-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.validation-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Contador de caracteres */
.char-counter {
    text-align: right;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Ações do formulário */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Inputs melhorados */
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-input.error, .form-select.error, .form-textarea.error {
    border-color: var(--error-color);
}

.form-input.success, .form-select.success, .form-textarea.success {
    border-color: var(--success-color);
}

/* Feedback de input */
.input-feedback {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    min-height: 1.2rem;
}

.input-feedback.success {
    color: var(--success-color);
}

.input-feedback.error {
    color: var(--error-color);
}

.input-feedback.warning {
    color: var(--warning-color);
}

/* Labels obrigatórios */
.required::after {
    content: " *";
    color: var(--error-color);
}

/* Hints do formulário */
.form-hint {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.3;
}

/* Botões melhorados */
.nav-btn.primary {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    color: white;
}

.nav-btn.secondary {
    background: linear-gradient(45deg, #95a5a6, #7f8c8d);
    color: white;
}

.nav-btn.cancel {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
}

.btn.primary {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
}

.btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.measurement-input:focus {
    animation: pulse 0.3s ease;
}

/* Responsividade */
@media (max-width: 768px) {
    .coordinates-grid,
    .measurements-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .calculation-display {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .calc-operator {
        transform: rotate(90deg);
        margin: 0;
    }
    
    .form-navigation,
    .form-actions {
        flex-direction: column;
    }
    
    .nav-spacer {
        display: none;
    }
}

/* --- Ícones --- */
.fas, .far, .fab, .fa {
    display: inline-block;
    margin-right: 0.5rem;
    color: var(--primary-color);
    font-size: 1.1em;
    vertical-align: middle;
    width: 1.25em;
    text-align: center;
}

.card-icon {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    display: block;
}

.header-icon {
    font-size: 1.5rem;
    margin-right: 0.75rem;
    color: var(--primary-color);
}

/* --- Alertas --- */
#alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 300px;
}

.alert {
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-in-out;
    display: flex;
    align-items: center;
}

.alert.success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert.error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert.warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* --- Header --- */
.header {
    display: flex;
    flex-wrap: wrap; /* Permite quebra de linha em telas menores */
    justify-content: space-between;
    align-items: center;
    background-color: var(--header-bg-color);
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 15px var(--shadow-color);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.header-title {
    margin-right: 2rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.header-icon {
    font-size: 1.75rem;
    color: var(--primary-color);
}

.header-title h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 0;
}

.header-title p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-color);
    background-color: transparent;
    border: none;
    padding: 0.6rem 1.2rem;
    margin-left: 0.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.nav-btn.active,
.nav-btn:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.nav-btn.logout {
    background-color: transparent;
    color: var(--error-color);
    border: 1px solid var(--error-color);
}

.nav-btn.logout:hover {
    background-color: var(--error-color);
    color: #fff;
}

/* --- Main content styling */
.main-content {
    width: 100%;
}

.content-wrapper {
    display: flex;
    flex-direction: column; /* Layout de coluna única por padrão (mobile) */
    gap: 2rem;
}

/* Layout de 2 colunas para telas maiores */
@media (min-width: 1024px) {
    .page-calibracao .content-wrapper {
        flex-direction: row; /* Layout de linha em telas grandes */
        align-items: stretch; /* Garante que os filhos tenham a mesma altura */
    }

    .page-calibracao .form-container {
        flex: 1 1 420px; /* Base de 420px, pode crescer e encolher */
        max-width: 500px; /* Limita a largura máxima do formulário */
    }

    .page-calibracao .table-container {
        flex: 2 1 60%; /* Ocupa o dobro do espaço do formulário */
    }
}

.card {
    background-color: var(--card-bg-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 15px var(--shadow-color);
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex; 
    flex-direction: column;
}

.table-container {
    flex-grow: 1;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
}

.section-header h3 i {
    color: var(--primary-color);
}

.chart-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.chart-select {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background-color: white;
    font-size: 0.875rem;
    min-width: 200px;
    cursor: pointer;
}

.chart-container {
    position: relative;
    height: 400px;
    padding: 1.5rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.chart-container:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

#nivel-rio-chart {
    width: 100%;
    height: 100%;
}

.main-header {
    margin-bottom: 1.5rem;
}

.main-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--secondary-color);
    padding-bottom: 0.5rem;
}

/* --- Cards --- */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Estilos para os cards do dashboard */
.dashboard-card {
    text-align: center;
    padding: 1.75rem;
    transition: all 0.3s ease;
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #ffffff, #f9fafb);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.dashboard-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.dashboard-card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(59, 130, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    transition: all 0.3s ease;
}

.dashboard-card:hover .card-icon {
    background-color: var(--primary-color);
    transform: scale(1.1) rotate(5deg);
}

.card-icon i {
    font-size: 1.75rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.dashboard-card:hover .card-icon i {
    color: white;
}

.dashboard-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.dashboard-card .card-content {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 0.5rem;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-header h3 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
}

.card-header i {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.card-body p {
    margin: 0;
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.status-online {
    color: var(--success-color) !important;
}

.status-offline {
    color: var(--warning-color) !important;
}

/* --- Tables --- */
.table-section {
    margin-bottom: 2rem;
}

.table-container {
    background-color: var(--card-bg-color);
    border-radius: 0.75rem;
    box-shadow: 0 4px 15px var(--shadow-color);
    border: 1px solid var(--border-color);
    overflow-x: auto; /* Responsividade para tabelas */
}

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

thead {
    background-color: #f9fafb;
}

th, td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    white-space: nowrap;
}

th {
    font-weight: 600;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

tbody tr:hover {
    background-color: #f9fafb;
}

.status-calibrado {
    color: var(--success-color);
    font-weight: 500;
}

.status-nao-calibrado {
    color: var(--warning-color);
    background-color: #fffbeb;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 500;
    display: inline-block;
    font-size: 0.75rem;
}

.btn-details {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
    font-weight: 500;
}

.btn-details:hover {
    background-color: #2563eb;
}

/* --- Login Page --- */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--background-color);
    padding: 1rem;
}

.login-box {
    background: var(--card-bg-color);
    padding: 2.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.login-box h1 {
    margin-bottom: 0.75rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.login-box p {
    margin-bottom: 2rem;
    color: #6b7280;
}

.input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: var(--secondary-color);
    font-size: 1rem;
}

.input-group label i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.input-group input, .input-group select, .input-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    background-color: #f9fafb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.input-group input:focus, .input-group select:focus, .input-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
    background-color: white;
}

/* Estilos para o botão de calibração */
.input-group.calculation-box {
    margin-top: 1.5rem;
    background-color: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.input-group.calculation-box label {
    color: #0369a1;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.input-group.calculation-box label i {
    color: #0284c7;
}

.calculation-result {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0c4a6e;
    margin-top: 0.75rem;
    text-align: center;
    background-color: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px dashed #7dd3fc;
}

.form-container {
    margin-bottom: 2rem;
}

.page-calibracao .form-container {
    padding: 1.75rem;
    background: linear-gradient(to bottom, #ffffff, #f9fafb);
}

.page-calibracao .form-container .card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-calibracao .form-container .card-title i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.form-layout {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-actions {
    margin-top: 2rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn.primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

.btn.primary:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

.btn.primary:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn.secondary {
    background: #95a5a6;
    color: white;
}

.btn.secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.btn.success {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.2);
}

.btn.success:hover {
    background: linear-gradient(135deg, #229954, #1e8449);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.4);
}

.btn.success:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.btn.danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.2);
}

.btn.danger:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

.btn.danger:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

/* Botão especial para criar estação */
#submitBtn {
    background: linear-gradient(135deg, #27ae60, #2ecc71, #58d68d);
    color: white;
    font-size: 18px;
    padding: 14px 28px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.3);
    border: 2px solid transparent;
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

#submitBtn:hover {
    background: linear-gradient(135deg, #229954, #27ae60, #2ecc71);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 30px rgba(39, 174, 96, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

#submitBtn:active {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.btn-login {
    width: 100%;
    padding: 0.875rem;
    border: none;
    background-color: var(--primary-color);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-login:hover {
    background-color: #2563eb;
}

#loginError {
    color: var(--error-color);
    margin-top: 1rem;
    font-size: 0.875rem;
    display: none;
}

/* --- Media Queries for Responsiveness --- */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .nav {
        width: 100%;
        justify-content: flex-start;
        margin-left: -0.5rem;
    }

    th, td {
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    .header {
        padding: 1rem;
    }

    .nav-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.875rem;
    }

    .card-body p {
        font-size: 1.5rem;
    }
}
