/* ===== Tailwind-like Custom Styles for Bootstrap 5 ===== */

/* General Reset */
body {
    font-family: "Inter", system-ui, sans-serif;
    background-color: #f9fafb;
    color: #111827;
    font-size: 12px;
}

.p-4 {
    padding: 1rem !important;
}

.disabled-bg {
    background: rgb(0, 0, 0, 0.1) !important;
}

/* === Buttons === */
.btn {
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
    border: none;
}

.btn-primary {
    background-color: #0284c7;
    color: white;
}

.btn-primary:hover {
    background-color: #38bdf8;
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

/* === Cards === */
.card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    background-color: #ffffff;
}

.card-header,
.card-body,
.card-footer {
    padding: 1rem 1.5rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

/* === Tables === */
.table {
    font-family: "Inter", system-ui, sans-serif;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    background-color: white;
    border-radius: 0.5rem;
    overflow: hidden;
    /*box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);*/
    font-size: 12px;
}

.table thead {
    background-color: #f3f4f6;
    color: #374151;
    font-weight: 600;
}

.table th,
.table td {
    padding: 0.5rem 0.5rem;
    vertical-align: middle;
    border-top: 1px solid #e5e7eb;
}

.table tbody tr:hover {
    background-color: #f9fafb;
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #f9fafb;
}

/* Optional: Table responsive rounded borders */
.table-responsive {
    border-radius: 0.5rem;
    overflow: hidden;
}

/* === Modals === */
.modal-content {
    border: none;
    border-radius: 1rem;
    padding: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
}

.modal-header {
    border-bottom: none;
    padding-bottom: 0;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.modal-body {
    color: #374151;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.modal-footer {
    border-top: none;
    /*padding-top: 1rem;*/
}

/* Optional: Soft fade effect for backdrop */
.modal-backdrop.show {
    opacity: 0.5;
    background-color: #000;
}

/* Optional: Center modal vertically for smaller screens too */
.modal-dialog {
    margin-top: 5vh;
}

/* === Inputs, Selects, Textareas === */
.form-control,
.form-select,
textarea {
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    background-color: #fff;
    color: #111827;
    padding: 0.5rem 0.75rem;
    font-size: 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.5);
    outline: none;
}

/* Placeholder color */
.form-control::placeholder,
textarea::placeholder {
    color: #9ca3af;
    opacity: 1;
}

/* === Checkbox & Radio === */
.form-check-input {
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 0.25rem;
    border: 1px solid #d1d5db;
    background-color: #fff;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: #0284c7;
    border-color: #0284c7;
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
    outline: none;
}

/* Radio-specific tweaks */
.form-check-input[type="radio"] {
    border-radius: 9999px;
}

/* Label spacing */
.form-check-label {
    margin-left: 0.5rem;
    color: #374151;
}

/* Disabled state */
.form-control:disabled,
.form-select:disabled,
textarea:disabled,
.form-check-input:disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

/* === Vertical Sidebar === */
.vertical-menu {
    /* bg-gray-100 */
    border-right: 1px solid #e5e7eb;
    /* border-gray-200 */
    display: flex;
    flex-direction: column;
    position: fixed;
    z-index: 1000;
}

/* Logo section */
.navbar-brand-box {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.navbar-brand-box h3 {
    font-weight: 700;
    margin: 0;
    font-size: 1.5rem;
    color: #111827;
}

/* Toggle button */
.vertical-menu-btn {
    background-color: transparent;
    color: #6b7280;
    border-radius: 0.2rem;
}

/* Menu */
#sidebar-menu {
    padding: 1rem 0.75rem;
}

#sidebar-menu ul li ul.sub-menu li a {
    padding: 0.6rem 0.8rem;
    font-size: 12px;
}

#sidebar-menu ul li a i {
    margin-right: 0px;
}

.menu-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

.metismenu > li {
    margin-bottom: 0.5rem;
}

.metismenu > li > a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    transition: background-color 0.2s, color 0.2s;
}

.metismenu > li > a:hover,
.metismenu > li > a.active {
    background-color: #e0f2fe;
    color: #1d4ed8;
}

.metismenu i {
    font-size: 1.125rem;
}

/* Submenu */
.sub-menu {
    margin-left: 1.25rem;
    margin-top: 0.25rem;
}

.sub-menu li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.95rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
}

.sub-menu li a:hover,
.sub-menu li a.active {
    background-color: #e0f2fe;
    color: #1d4ed8;
}

/* Sweetn alert toast */
.swal2-popup.swal2-toast {
    border-radius: 0.5rem;
    /* rounded-lg */
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    /* shadow-lg */
    border: 1px solid #e5e7eb;
    /* border-gray-200 */
    background-color: #ffffff;
    /* bg-white */
    color: #1f2937;
    /* text-gray-800 */
    padding: 1rem;
    font-family: "Segoe UI", sans-serif;
    font-size: 0.875rem;
    /* text-sm */
}

/* Título del toast */
.swal2-title {
    font-weight: 500;
    /* font-medium */
    font-size: 0.875rem;
    margin: 0;
}

/* Barra de progreso */
.swal2-timer-progress-bar {
    background-color: #3b82f6;
    /* bg-blue-500 */
    height: 4px;
}

/* Íconos personalizados tipo Tailwind */
.swal2-icon-success {
    color: #10b981 !important;
    /* green-500 */
}

.swal2-icon-error {
    color: #ef4444 !important;
    /* red-500 */
}

.swal2-icon-info {
    color: #0ea5e9 !important;
    /* sky-500 */
}

.swal2-icon-warning {
    color: #facc15 !important;
    /* yellow-400 */
}

.nav-tabs .nav-item {
    border: 1px solid #ccc;
    /*border-bottom: 1px solid #ccc;*/
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
    margin-left: 2px;
    margin-right: 2px;
}

.nav-tabs-custom .nav-item .nav-link.active {
    color: #333;
}
