/* style.css - Design Moderno e Tecnológico */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    color: #2d3748;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px 0;
}

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

/* Título Principal */
.page-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1a365d;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-title::before {
    content: "📋";
    font-size: 1.5rem;
}

/* Subtítulo */
.page-subtitle {
    font-size: 1rem;
    color: #4a5568;
    margin-bottom: 30px;
    font-weight: 400;
}

/* Cards */
.card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 32px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.card-header {
    background: linear-gradient(90deg, #3b82f6, #5a67d8);
    color: white;
    padding: 20px 28px;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h3::before {
    content: "🏢";
    font-size: 1.4rem;
}

.card-body {
    padding: 28px;
}

/* Botões modernos */
.btn {
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    outline: none;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    font-size: 0.85rem;
    padding: 6px 12px;
    font-weight: 500;
}

/* Formulários */
.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    background: #f8fafc;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background: white;
}

.form-label {
    display: block;
    margin: 16px 0 8px;
    font-weight: 500;
    color: #2d3748;
    font-size: 0.95rem;
}

/* Tabela moderna */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.95rem;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.table th {
    background: #1e40af;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    padding: 14px 16px;
    text-align: left;
}

.table td {
    padding: 16px;
    border-bottom: 1px solid #edf2f7;
}

.table tr:hover {
    background-color: #f0f9ff;
    transition: background 0.2s;
}

/* Alertas modernos */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 4px solid #3b82f6;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border-left-color: #10b981;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border-left-color: #ef4444;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border-left-color: #f59e0b;
}

/* Formulário de edição */
.edit-form {
    background: #f9fafb;
    padding: 32px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.edit-form .row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.edit-form .col-md-6,
.edit-form .col-md-4,
.edit-form .col-md-3,
.edit-form .col-md-2,
.edit-form .col-md-5 {
    flex: 1;
    min-width: 200px;
}

/* Botões de ação */
.action-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.btn-outline {
    background: white;
    color: #3b82f6;
    border: 1px solid #3b82f6;
    box-shadow: none;
}

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

/* Container de busca centralizado e com largura limitada */
.search-container {
    display: flex;
    justify-content: center;
    margin: 0 auto 24px;
    max-width: 600px;
    width: 100%;
}

.search-form {
    width: 100%;
}

.input-group {
    display: flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    background: white;
}

.input-group input {
    flex: 1;
    padding: 14px 16px;
    border: none;
    font-size: 1rem;
    outline: none;
}

.input-group button {
    padding: 14px 20px;
    background: #3b82f6;
    color: white;
    border: none;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.3s;
}

.input-group button:hover {
    background: #2563eb;
}

/* Footer opcional */
.footer {
    text-align: center;
    margin-top: 40px;
    color: #718096;
    font-size: 0.9rem;
}

/* Responsivo */
@media (max-width: 768px) {
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .btn {
        width: 100%;
        justify-content: center;
        margin-bottom: 8px;
    }

    .edit-form .row {
        flex-direction: column;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .search-container {
        padding: 0 16px;
    }

    /* Cabeçalho do card com título e botões alinhados */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    background: linear-gradient(90deg, #3b82f6, #5a67d8);
    color: white;
    padding: 20px 28px;
}

.card-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header-right {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-left: auto;
}

/* Responsivo: em telas menores, alinha os botões abaixo */
@media (max-width: 768px) {
    .card-header {
        flex-direction: column;
        align-items: stretch;
    }

    .card-header-left {
        justify-content: flex-start;
    }

    .card-header-right {
        justify-content: center;
    }

    .btn {
        width: auto;
        justify-content: center;
    }
}

.card-header-left h3::before {
    content: "🏭";
    margin-right: 8px;
}

}