/* 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;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container principal */
.container {
    display: flex;
    min-height: 100vh;
}

/* Menu lateral */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.sidebar-header h1 {
    font-size: 24px;
    margin-bottom: 5px;
    color: #fff;
}

.sidebar-header p {
    font-size: 12px;
    color: #bdc3c7;
}

.menu-list {
    list-style: none;
    padding: 0;
}

.menu-item {
    margin: 5px 10px;
}

.menu-link {
    display: block;
    padding: 15px 20px;
    color: #ecf0f1;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 16px;
    border-left: 3px solid transparent;
}

.menu-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: #3498db;
    transform: translateX(5px);
}

.menu-link.active {
    background: rgba(52, 152, 219, 0.2);
    border-left-color: #3498db;
    font-weight: bold;
}

.sidebar-footer {
    margin-top: auto;
    padding: 20px;
}

.sidebar-footer .btn {
    width: 100%;
    justify-content: center;
}

/* Conteúdo principal */
.main-content {
    margin-left: 280px;
    flex: 1;
    padding: 40px;
    background: white;
    min-height: 100vh;
}

/* Cabeçalho */
.header {
    background: white;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.header h2 {
    color: #2c3e50;
    font-size: 28px;
    margin-bottom: 10px;
}

.header p {
    color: #7f8c8d;
    font-size: 16px;
}

/* Cards e seções */
.content-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 14px;
}

.form-group label .required {
    color: #e74c3c;
    margin-left: 3px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-control.error {
    border-color: #e74c3c;
}

.form-control.success {
    border-color: #27ae60;
}

.error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

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

.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-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* Tabela de dados recebidos */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.data-table th {
    background: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* Mensagens de sucesso/erro */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

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

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

/* Sobre o site */
.about-section {
    line-height: 1.8;
}

.about-section h3 {
    color: #2c3e50;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 22px;
}

.about-section p {
    color: #555;
    margin-bottom: 15px;
}

.about-section ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.about-section li {
    color: #555;
    margin-bottom: 8px;
}

.about-section code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 13px;
    color: #e74c3c;
}

.about-section pre code {
    display: block;
    padding: 15px;
    background: #2c3e50;
    color: #ecf0f1;
    border-radius: 8px;
    overflow-x: auto;
}

/* Menu Hambúrguer para Mobile */
.menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: #2c3e50;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: #34495e;
}

.menu-toggle.active {
    background: #e74c3c;
}

/* Overlay para fechar menu em mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* Responsividade - Tablet */
@media (max-width: 1024px) {
    .main-content {
        padding: 30px;
    }
    
    .header {
        padding: 15px 20px;
    }
    
    .header h2 {
        font-size: 24px;
    }
    
    .content-card {
        padding: 25px;
    }
}

/* Responsividade - Tablet Pequeno */
@media (max-width: 900px) {
    .sidebar {
        width: 250px;
    }
    
    .main-content {
        margin-left: 250px;
    }
}

/* Responsividade - Mobile */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .sidebar {
        width: 280px;
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        transition: left 0.3s ease;
        z-index: 1000;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px 15px;
        width: 100%;
    }
    
    .header {
        padding: 15px;
        margin-bottom: 20px;
        margin-top: 60px;
    }
    
    .header h2 {
        font-size: 22px;
        margin-bottom: 8px;
    }
    
    .header p {
        font-size: 14px;
    }
    
    .content-card {
        padding: 20px 15px;
        margin-bottom: 15px;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 16px; /* Evita zoom no iOS */
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 15px;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .btn-secondary {
        margin-left: 0;
    }
    
    /* Toast ajustado para mobile */
    #toast {
        min-width: calc(100% - 30px);
        left: 15px;
        transform: none;
        font-size: 14px;
        padding: 12px 15px;
    }
    
    /* Tabelas responsivas */
    .data-table {
        font-size: 14px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px;
    }
    
    /* Cards do dashboard */
    .content-card > div[style*="grid"] {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    /* Ajustes gerais */
    .about-section ul,
    .about-section ol {
        margin-left: 15px;
    }
    
    .about-section h3 {
        font-size: 20px;
    }
    
    .about-section h4 {
        font-size: 18px;
    }
}

/* Responsividade - Mobile Pequeno */
@media (max-width: 480px) {
    .main-content {
        padding: 15px 10px;
    }
    
    .header {
        padding: 12px;
        margin-top: 50px;
    }
    
    .header h2 {
        font-size: 20px;
    }
    
    .content-card {
        padding: 15px 10px;
    }
    
    .sidebar {
        width: 100%;
        left: -100%;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .form-control {
        font-size: 16px;
    }
    
    .menu-link {
        padding: 12px 15px;
        font-size: 15px;
    }
    
    .sidebar-header h1 {
        font-size: 20px;
    }
    
    /* Ajustes de texto para mobile pequeno */
    .content-card h3 {
        font-size: 18px;
    }
    
    .content-card h4 {
        font-size: 16px;
    }
    
    .content-card p,
    .content-card li {
        font-size: 14px;
    }
    
    /* Grid de tecnologias e cards */
    .content-card > div[style*="grid"] {
        gap: 10px !important;
    }
    
    .content-card > div[style*="grid"] > div {
        padding: 12px !important;
    }
}

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

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* Toast de notificação */
#toast {
    visibility: hidden;
    min-width: 280px;
    max-width: 90%;
    background: #00c853;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 14px 20px;
    position: fixed;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.4s, bottom 0.4s;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    word-wrap: break-word;
}

#toast.erro {
    background: #e53935;
}

#toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 60px;
}

