/* Modern Tailwind Admin Design System for centralhubapp - Light Theme */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #0f172a;
    background-color: #f1f5f9;
    -webkit-font-smoothing: antialiased;
}

/* Modern Minimalist Progress Loader */
@keyframes modernLoaderProgress {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(20%); }
    100% { transform: translateX(200%); }
}

.yt-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899);
    z-index: 99999;
    animation: modernLoaderProgress 1.4s ease-in-out infinite;
    transform-origin: 0% 50%;
}

/* Modern Form Controls - High Contrast Tailwind UI Style with Visible Borders */
.textinput,
.textarea,
.select,
.dateinput,
.numberinput,
.emailinput,
.urlinput,
.passwordinput,
.fileinput,
.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="url"],
select,
textarea {
    display: block;
    width: 100%;
    border-radius: 0.75rem;
    border: 1.5px solid #cbd5e1 !important;
    background-color: #ffffff !important;
    padding: 0.55rem 0.85rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #0f172a !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Ensure inputs with leading icons keep proper left padding and never overlap with leading icon */
input.pl-10,
input.pl-11,
input.pl-12,
input[type="text"].pl-10,
input[type="text"].pl-11,
input[type="text"].pl-12,
.input-with-leading-icon {
    padding-left: 2.75rem !important;
}

.textinput:focus,
.textarea:focus,
.select:focus,
.dateinput:focus,
.numberinput:focus,
.emailinput:focus,
.urlinput:focus,
.passwordinput:focus,
.fileinput:focus,
.form-control:focus,
.form-select:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
    outline: none !important;
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2) !important;
}

.form-control-sm,
.form-select-sm {
    padding: 0.4rem 0.65rem !important;
    font-size: 0.8125rem;
    border-radius: 0.5rem;
}

.form-check-input {
    width: 1.15em;
    height: 1.15em;
    margin-top: 0.2em;
    vertical-align: top;
    background-color: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 0.35rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.form-check-input:checked {
    background-color: #4f46e5;
    border-color: #4f46e5;
}

.form-check-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-label,
label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.375rem;
}

.help-block,
.form-text {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.is-invalid {
    border-color: #f43f5e !important;
}

.invalid-feedback {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #e11d48;
    font-weight: 500;
}

/* Modern Button Hierarchy */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.25rem;
    padding: 0.55rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 0.5rem;
}

.btn-xs {
    padding: 0.25rem 0.55rem;
    font-size: 0.7rem;
    border-radius: 0.375rem;
}

.btn-primary {
    background-color: #4f46e5;
    color: #ffffff;
    box-shadow: 0 1px 3px 0 rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    background-color: #4338ca;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.25);
}

.btn-secondary {
    background-color: #334155;
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: #1e293b;
    color: #ffffff;
}

.btn-success {
    background-color: #059669;
    color: #ffffff;
}

.btn-success:hover {
    background-color: #047857;
    color: #ffffff;
}

.btn-danger {
    background-color: #e11d48;
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #be123c;
    color: #ffffff;
}

.btn-light {
    background-color: #ffffff;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.btn-light:hover {
    background-color: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1;
}

.btn-outline-primary {
    background-color: #ffffff;
    color: #4f46e5;
    border: 1px solid #c7d2fe;
}

.btn-outline-primary:hover {
    background-color: #eef2ff;
    color: #3730a3;
    border-color: #a5b4fc;
}

.btn-outline-secondary {
    background-color: #ffffff;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-outline-secondary:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

.btn-outline-danger {
    background-color: #ffffff;
    color: #e11d48;
    border: 1px solid #fecdd3;
}

.btn-outline-danger:hover {
    background-color: #fff1f2;
    color: #be123c;
}

/* Tailwind UI Subtle Ring Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1rem;
    border-radius: 0.5rem;
    white-space: nowrap;
}

.bg-primary {
    background-color: #eef2ff !important;
    color: #4338ca !important;
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.2);
}

.bg-secondary {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    box-shadow: inset 0 0 0 1px rgba(100, 116, 139, 0.15);
}

.bg-success {
    background-color: #ecfdf5 !important;
    color: #047857 !important;
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.2);
}

.bg-danger {
    background-color: #fff1f2 !important;
    color: #be123c !important;
    box-shadow: inset 0 0 0 1px rgba(244, 63, 94, 0.2);
}

.bg-warning {
    background-color: #fffbeb !important;
    color: #b45309 !important;
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.2);
}

.bg-info {
    background-color: #f0f9ff !important;
    color: #0284c7 !important;
    box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.2);
}

.bg-dark {
    background-color: #0f172a !important;
    color: #ffffff !important;
}

.bg-light {
    background-color: #f8fafc !important;
    color: #475569 !important;
    box-shadow: inset 0 0 0 1px #e2e8f0;
}

/* Tailwind UI Card & Table Aesthetic */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
}

.table {
    width: 100%;
    margin-bottom: 0;
    color: #334155;
    vertical-align: middle;
    border-collapse: collapse;
}

.table > thead {
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.table > thead th {
    padding: 0.85rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
    text-align: left;
    white-space: nowrap;
}

.table > tbody > tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.12s ease;
}

.table > tbody > tr:last-child {
    border-bottom: none;
}

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

.table > tbody td {
    padding: 0.85rem 1rem;
    font-size: 0.8125rem;
    color: #1e293b;
}

.table-sm th,
.table-sm td {
    padding: 0.55rem 0.85rem;
    font-size: 0.75rem;
}

/* Row highlight states */
.table-danger {
    background-color: #fff1f2 !important;
}

.table-danger:hover {
    background-color: #ffe4e6 !important;
}

.table-warning {
    background-color: #fffbeb !important;
}

.table-warning:hover {
    background-color: #fef3c7 !important;
}

.table-success {
    background-color: #f0fdf4 !important;
}

/* Modern Slide-over Sheet / Drawer */
.modal-backdrop-custom {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 50;
    display: none;
    transition: opacity 0.25s ease-in-out;
}

.modal-backdrop-custom.show {
    display: block;
}

.modal-slide-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 520px;
    max-width: 100vw;
    background: #ffffff;
    box-shadow: -8px 0 35px rgba(15, 23, 42, 0.12);
    z-index: 51;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.modal-slide-drawer.show {
    transform: translateX(0);
}

.modal-slide-drawer.modal-lg {
    width: 720px;
}

.modal-slide-drawer.modal-xl {
    width: 920px;
}

.modal-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
}

.modal-drawer-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1.75rem;
}

.modal-drawer-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.375rem;
    border-radius: 0.5rem;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-drawer-close:hover {
    color: #0f172a;
    background-color: #f1f5f9;
}

/* Crispy Grid System Helpers */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.5rem;
    margin-left: -0.5rem;
}

.row > * {
    box-sizing: border-box;
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
}

.mb-3 { margin-bottom: 0.85rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mt-3 { margin-top: 0.85rem; }
.mt-2 { margin-top: 0.5rem; }

.col-1 { width: 8.333333%; }
.col-2 { width: 16.666667%; }
.col-3 { width: 25%; }
.col-4 { width: 33.333333%; }
.col-5 { width: 41.666667%; }
.col-6 { width: 50%; }
.col-7 { width: 58.333333%; }
.col-8 { width: 66.666667%; }
.col-9 { width: 75%; }
.col-10 { width: 83.333333%; }
.col-11 { width: 91.666667%; }
.col-12 { width: 100%; }

@media (min-width: 768px) {
    .col-md-1 { width: 8.333333%; }
    .col-md-2 { width: 16.666667%; }
    .col-md-3 { width: 25%; }
    .col-md-4 { width: 33.333333%; }
    .col-md-5 { width: 41.666667%; }
    .col-md-6 { width: 50%; }
    .col-md-7 { width: 58.333333%; }
    .col-md-8 { width: 66.666667%; }
    .col-md-9 { width: 75%; }
    .col-md-10 { width: 83.333333%; }
    .col-md-11 { width: 91.666667%; }
    .col-md-12 { width: 100%; }
}

/* Spinner */
.spinner-border {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    vertical-align: text-bottom;
    border: 0.2em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border .75s linear infinite;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
