/* Estilos gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #2c3e50;
    min-height: 100vh;
}

.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
}

.container.form-custom {
    margin-top: 40px;
    margin-bottom: 40px;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    margin-bottom: 20px;
    overflow: hidden;
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, #008b4f 0%, #006b3b 100%);
    color: white;
    padding: 20px;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.5px;
}

.card-body {
    padding: 25px;
}

/* Formulários */
.form-group {
    margin-bottom: 18px;
}

label {
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    color: #34495e;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input, select, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: #f8f9fb;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #008b4f;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(0, 139, 79, 0.1);
}

input[type="text"]:disabled {
    background-color: #f0f0f0;
    color: #999;
}

/* Botões */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    text-align: center;
}

.btn-primary, .btn-success, .btn-green {
    background: linear-gradient(135deg, #008b4f 0%, #006b3b 100%);
    color: white;
}

.btn-primary:hover, .btn-success:hover, .btn-green:hover {
    background: linear-gradient(135deg, #00a65c 0%, #008b4f 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 139, 79, 0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-outline-secondary {
    background-color: transparent;
    color: #6c757d;
    border: 2px solid #6c757d;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    color: white;
}

/* Alertas */
.alert {
    padding: 16px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    border-left: 5px solid;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #28a745;
}

.alert-error, .alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
}

.alert-secondary {
    background-color: #e2e3e5;
    color: #383d41;
    border-color: #d6d8db;
}

.alert strong {
    font-weight: 700;
}

/* Tabelas */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

table thead {
    background: linear-gradient(135deg, #008b4f 0%, #006b3b 100%);
    color: white;
}

table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

table tbody tr {
    transition: background-color 0.2s ease;
}

table tbody tr:hover {
    background-color: #f9f9f9;
}

/* Info Block */
.info-block {
    background-color: #f8f9fb;
    border-left: 4px solid #008b4f;
    padding: 16px;
    margin: 16px 0;
    border-radius: 6px;
}

.info-block strong {
    color: #008b4f;
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-block span {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
}

/* Protocol Info */
.protocol-info {
    background: linear-gradient(135deg, #f0f9f5 0%, #e6f7f1 100%);
    border: 2px solid #008b4f;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.protocol-info .badge {
    display: inline-block;
    background-color: #008b4f;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.protocol-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #d4edda;
}

.protocol-row:last-child {
    border-bottom: none;
}

.protocol-label {
    font-weight: 600;
    color: #555;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.protocol-value {
    color: #008b4f;
    font-weight: 700;
    font-size: 15px;
    font-family: 'Courier New', monospace;
}

/* Texto utilitário */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: #999;
    font-size: 13px;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-2 {
    margin-top: 10px;
}

.mb-2 {
    margin-bottom: 10px;
}

.p-20 {
    padding: 20px;
}

.py-2 {
    padding-top: 10px;
    padding-bottom: 10px;
}

pre {
    background-color: #f8f9fb;
    padding: 12px;
    border-radius: 6px;
    font-size: 13px;
    overflow-x: auto;
    color: #666;
    font-family: 'Courier New', monospace;
    line-height: 1.5;
    margin: 10px 0;
}

/* Responsivo */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .card-body {
        padding: 20px;
    }

    input, select, textarea {
        padding: 11px 12px;
        font-size: 16px; /* Evita zoom no iOS */
    }

    .btn {
        padding: 11px 20px;
        font-size: 14px;
        width: 100%;
    }

    table {
        font-size: 13px;
    }

    table th, table td {
        padding: 10px;
    }

    .protocol-row {
        flex-direction: column;
    }

    .protocol-label {
        margin-bottom: 5px;
    }

    .alert {
        padding: 14px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .card {
        border-radius: 10px;
        margin-bottom: 15px;
    }

    .card-body {
        padding: 15px;
    }

    input, select, textarea {
        padding: 10px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .form-custom {
        margin-top: 20px;
        margin-bottom: 20px;
    }
}
