/* ============================================================
   ADMINLTE STYLE - FRONTGROUP
   Diseño moderno inspirado en AdminLTE
   Colores: #0078ff (Azul primario)
============================================================ */

/* ==================== VARIABLES ==================== */
:root {
    /* Colores principales */
    --primary: #0078ff;
    --primary-dark: #005fcc;
    --primary-light: #3395ff;

    /* Sidebar */
    --sidebar-bg: #343a40;
    --sidebar-text: #c2c7d0;
    --sidebar-hover: #007bff;
    --sidebar-active: #0078ff;

    /* Backgrounds */
    --body-bg: #f4f6f9;
    --white: #ffffff;
    --light: #f8f9fa;

    /* Text */
    --text-dark: #495057;
    --text-muted: #6c757d;

    /* Borders */
    --border-color: #dee2e6;

    /* Shadows */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

/* ==================== RESET ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--body-bg);
    color: var(--text-dark);
    font-size: 1rem;
    line-height: 1.5;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 250px;
    background: var(--sidebar-bg);
    z-index: 1000;
    overflow-y: auto;
    box-shadow: var(--shadow);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar-brand {
    padding: 1rem 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-menu {
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    padding-left: 1.75rem;
}

.sidebar-menu a.active {
    background: var(--sidebar-active);
    color: #fff;
    border-left: 3px solid #fff;
}

.sidebar-menu i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* ==================== MAIN CONTENT ==================== */
.content-wrapper {
    margin-left: 250px;
    min-height: 100vh;
    padding: 1.5rem;
}

.content-header {
    margin-bottom: 1.5rem;
}

.content-header h1 {
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--text-dark);
    margin: 0;
}

/* ==================== CARDS ==================== */
.card {
    background: var(--white);
    border-radius: 0.25rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    border: 0;
}

.card-header {
    padding: 0.75rem 1.25rem;
    background: transparent;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    color: var(--text-dark);
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 0.75rem 1.25rem;
    background: var(--light);
    border-top: 1px solid var(--border-color);
}

/* ==================== TABLES ==================== */
.table {
    width: 100%;
    margin-bottom: 0;
    color: var(--text-dark);
}

.table thead th {
    border-bottom: 2px solid var(--border-color);
    padding: 0.75rem;
    font-weight: 600;
    background: var(--light);
    color: var(--text-dark);
}

.table tbody td {
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

.table-striped tbody tr:nth-of-type(odd) {
    background: rgba(0, 0, 0, 0.02);
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    transition: all 0.15s;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.btn-success {
    background: #28a745;
    border-color: #28a745;
    color: #fff;
}

.btn-success:hover {
    background: #218838;
    border-color: #1e7e34;
}

.btn-danger {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background: #c82333;
    border-color: #bd2130;
}

.btn-info {
    background: #17a2b8;
    border-color: #17a2b8;
    color: #fff;
}

.btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background: #5a6268;
    border-color: #545b62;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* ==================== LOGIN PAGE ==================== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.login-box {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: var(--white);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.login-card-header {
    background: var(--primary);
    color: #fff;
    padding: 2rem;
    text-align: center;
}

.login-card-header h1 {
    font-size: 1.5rem;
    font-weight: 400;
    margin: 0;
}

.login-card-body {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-dark);
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    transition: border-color 0.15s;
}

.form-control:focus {
    border-color: var(--primary);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 120, 255, 0.25);
}

.btn-block {
    display: block;
    width: 100%;
    padding: 0.75rem;
    font-size: 1.1rem;
}

/* ==================== DASHBOARD WIDGETS ==================== */
.info-box {
    display: flex;
    background: var(--white);
    border-radius: 0.25rem;
    box-shadow: var(--shadow-sm);
    padding: 1rem;
    margin-bottom: 1rem;
}

.info-box-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    border-radius: 0.25rem;
    font-size: 2rem;
    color: #fff;
}

.info-box-icon.bg-primary {
    background: var(--primary);
}

.info-box-content {
    flex: 1;
    padding-left: 1rem;
}

.info-box-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

.info-box-number {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

/* ==================== ENCUESTAS - FORMULARIOS ==================== */
.encuesta-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 0.25rem;
    box-shadow: var(--shadow-sm);
}

.seccion-card {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 0.25rem;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--primary);
}

.pregunta-card {
    background: var(--white);
    padding: 1rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

.pregunta-card label {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.pregunta-card input[type="radio"],
.pregunta-card input[type="checkbox"] {
    margin-right: 0.5rem;
}

.pregunta-card textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    min-height: 100px;
}

/* ==================== MODALES ==================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    outline: 0;
}

.modal.fade {
    transition: opacity 0.15s linear;
}

.modal.show {
    display: block !important;
    opacity: 1;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 1.75rem auto;
    max-width: 500px;
    pointer-events: none;
}

.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: none;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: var(--white);
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    outline: 0;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: 100vw;
    height: 100vh;
    background-color: #000;
}

.modal-backdrop.fade {
    opacity: 0;
}

.modal-backdrop.show {
    opacity: 0.5;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.modal-title {
    margin: 0;
    line-height: 1.5;
    font-size: 1.25rem;
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
}

.modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.btn-close {
    box-sizing: content-box;
    width: 1em;
    height: 1em;
    padding: 0.25em;
    color: #000;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    border: 0;
    border-radius: 0.25rem;
    opacity: 0.5;
    cursor: pointer;
}

.btn-close:hover {
    opacity: 0.75;
}

.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.d-none {
    display: none !important;
}

/* ==================== UTILITIES ==================== */
.text-center {
    text-align: center !important;
}

.text-primary {
    color: var(--primary) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.d-flex {
    display: flex !important;
}

.align-items-center {
    align-items: center !important;
}

.justify-content-center {
    justify-content: center !important;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .sidebar {
        margin-left: -250px;
    }

    .content-wrapper {
        margin-left: 0;
    }
}