/* Centralized application styles extracted from templates */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --card-shadow: 0 10px 20px rgba(0,0,0,0.1);
    --input-radius: 12px;
    --btn-radius: 12px;
    --transition: all 0.3s ease;
}

body {
    background: var(--secondary-gradient);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 2rem 0;
    padding-bottom: 4rem;
    color: #2d3748;
}

.main-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    border: none;
    overflow: hidden;
    transition: var(--transition);
}

.card-header-custom {
    background: var(--primary-gradient);
    padding: 1rem;
    color: white;
    text-align: center;
    border: none;
}

.card-header-custom h2 { font-weight: 700; margin: 0; letter-spacing: -0.5px; }
.card-body-custom { padding: 2.5rem; }

.form-label { font-weight: 600; color: #4a5568; margin-bottom: 0.5rem; }

.form-control, .form-select {
    border-radius: var(--input-radius);
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    font-size: 1rem;
    transition: var(--transition);
    background-color: #f8fafc;
}
.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background-color: white;
}

.btn-main {
    background: white;
    border: 2px solid #667eea;
    border-radius: var(--btn-radius);
    padding: 0.8rem 2rem;
    font-weight: 700;
    color: #667eea;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn-main:hover { background: #667eea; color: white; box-shadow: 0 4px 6px rgba(102, 126, 234, 0.3); }

.btn-submit {
    background: white;
    border: 2px solid #667eea;
    border-radius: var(--btn-radius);
    padding: 0.8rem 2rem;
    font-weight: 700;
    color: #667eea;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn-submit:hover { background: #667eea; color: white; border-color: #667eea; box-shadow: 0 4px 6px rgba(102, 126, 234, 0.3); }

.btn-secondary-custom {
    background: white;
    border: 2px solid #cbd5e0;
    color: #4a5568;
    border-radius: var(--btn-radius);
    padding: 0.8rem 2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn-secondary-custom:hover { background: #4a5568; color: white; border-color: #4a5568; }

.btn-success {
    background: white;
    border: 2px solid #48bb78;
    color: #48bb78;
    border-radius: var(--btn-radius);
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}
.btn-success:hover { background: #48bb78; color: white; border-color: #48bb78; }

.btn-primary {
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    border-radius: var(--btn-radius);
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}
.btn-primary:hover { background: #667eea; color: white; border-color: #667eea; }

.mode-selector {
    background: #f1f5f9;
    padding: 0.5rem;
    border-radius: 15px;
    display: flex;
    margin-bottom: 2rem;
}

.mode-selector input {
    display: none;
}

.mode-selector label {
    flex: 1;
    padding: 0.75rem;
    text-align: center;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    color: #64748b;
}

.mode-selector input:checked + label {
    background: white;
    color: #4f46e5;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.btn-determina { border-radius: var(--btn-radius); font-weight: 600; padding-left: 1.5rem; padding-right: 1.5rem; border: 2px solid #667eea; color: #667eea; background: white; transition: var(--transition); display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.btn-determina:hover { background: #667eea; color: white; border-color: #667eea; }
.btn-field-action { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.btn-restart { background: white; border: 2px solid #dd6b20; border-radius: var(--btn-radius); padding: 0.8rem 2rem; font-weight: 700; color: #dd6b20; transition: var(--transition); display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.btn-restart:hover { background: #dd6b20; color: white; border-color: #dd6b20; }
.btn-check:checked + .btn-outline-primary { background: var(--primary-gradient); border-color: transparent; color: white; }

.section-title { color: #2d3748; font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid #e2e8f0; margin-top: 1.5rem; }

.table-custom { border-collapse: separate; border-spacing: 0 0.5rem; }
.table-custom thead th { border: none; color: #718096; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; padding: 0.75rem; background: #f8fafc; }
.table-custom tbody tr { background: white; box-shadow: 0 2px 4px rgba(0,0,0,0.02); transition: var(--transition); }
.table-custom tbody tr:hover { transform: translateY(-2px); box-shadow: 0 4px 6px rgba(0,0,0,0.05); background-color: #f8fbff; }
.table-custom td { vertical-align: middle; border: none; padding: 0.75rem; border-top: 1px solid #f1f5f9; }
.table-custom td:first-child { border-top-left-radius: 10px; border-bottom-left-radius: 10px; border-left: 1px solid #f1f5f9; }
.table-custom td:last-child { border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-right: 1px solid #f1f5f9; }

.total-row { background-color: #ebf8ff !important; font-weight: 700; color: #2c5282; border-radius: 10px; }
.total-row td { border-top: 2px solid #bee3f8; }

.btn-add { background: white; border: 2px solid #48bb78; color: #48bb78; border-radius: var(--btn-radius); font-weight: 600; padding: 0.6rem 1.2rem; transition: var(--transition); display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.btn-add:hover { background: #48bb78; color: white; border-color: #48bb78; }

.small-link { font-size: 0.85rem; color: white; opacity: 0.9; }
.bg-light-custom { background-color: #f8fafc; border-radius: 15px; padding: 1.5rem; border: 1px solid #e2e8f0; }
.btn-custom { border-radius: var(--btn-radius); font-weight: 600; padding: 0.6rem 1.2rem; transition: var(--transition); display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.card-result { background: #f7fafc; border-radius: 15px; padding: 1.5rem; border: 1px solid #e2e8f0; margin-bottom: 2rem; }
.result-value { font-family: 'Courier New', monospace; font-weight: 700; }

/* Utility */
.bg-light { background-color: #f8fafc !important; }
