/* ==========================================================================
   Minimalist theme overrides for AdminLTE 3
   Loaded after adminlte.min.css via config/adminlte.php > plugins.CustomTheme
   ========================================================================== */

/* ---------- 1. Theme & overall layout ---------- */
body,
.content-wrapper {
    background-color: #f0f2f5;
}

.main-sidebar,
.main-sidebar.sidebar-light-primary {
    background-color: #f8f9fa !important;
    box-shadow: 1px 0 0 rgba(0, 0, 0, 0.05);
}

.sidebar-light-primary .nav-sidebar > .nav-item > .nav-link {
    color: #495057;
    border-radius: 6px;
    margin: 1px 8px;
    width: auto;
}

.sidebar-light-primary .nav-sidebar > .nav-item > .nav-link.active,
.sidebar-light-primary .nav-sidebar > .nav-item > .nav-link:hover {
    background-color: #e9ecef;
    color: #1a1a1a;
}

.sidebar-light-primary .nav-sidebar > .nav-item > .nav-link.active {
    background-color: #e8f0fe;
    color: #1a73e8;
    font-weight: 600;
}

.sidebar-light-primary .nav-sidebar .nav-header {
    color: #adb5bd;
    font-size: 11px;
    letter-spacing: 0.03em;
}

.brand-link {
    border-bottom: 1px solid #edf2f7 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.brand-link .brand-image {
    max-height: 42px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    float: none;
    margin: 0;
    border-radius: 6px;
}

/* Preloader (loading screen) logo: AdminLTE forces an .img-circle crop —
   override back to a plain rounded square so the full logo stays visible. */
.preloader img.img-circle {
    border-radius: 10px !important;
    object-fit: contain;
    background-color: #ffffff;
}

.main-header.navbar {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border-bottom: none !important;
}

/* Sidebar toggler (hamburger) polish */
.main-header .nav-link[data-widget="pushmenu"] {
    border-radius: 6px;
    transition: background-color 0.15s ease-in-out;
}

.main-header .nav-link[data-widget="pushmenu"]:hover {
    background-color: #f1f5f9;
}

/* ---------- Cards ---------- */
.card {
    border: none;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.card.card-outline {
    border-top: none;
}

.card-header {
    background-color: #ffffff;
    border-bottom: 1px solid #edf2f7;
    border-radius: 6px 6px 0 0 !important;
}

.card-footer {
    background-color: #ffffff;
    border-top: 1px solid #edf2f7;
}

/* ---------- 2. Filter form controls ---------- */
.form-control,
.custom-select,
select.form-control {
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 13px;
    padding: 6px 10px;
    height: auto;
    box-shadow: none;
}

.form-control:focus,
select.form-control:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}

.form-control-sm {
    font-size: 13px;
    padding: 5px 8px;
}

.card-body label.small,
.card-body label.text-muted {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    color: #8a94a6;
    font-weight: 500;
}

.input-group-append .input-group-text {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: none;
    color: #8a94a6;
}

/* Buttons */
.btn {
    border-radius: 4px;
    font-size: 13px;
}

.btn-primary {
    background-color: #1a73e8;
    border-color: #1a73e8;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #1558b0;
    border-color: #1558b0;
}

.btn-secondary,
.btn-outline-secondary {
    background-color: #f8f9fa;
    border-color: #e2e8f0;
    color: #495057;
}

.btn-secondary:hover {
    background-color: #edf2f7;
    border-color: #e2e8f0;
    color: #495057;
}

.btn-success {
    background-color: #1e9e5a;
    border-color: #1e9e5a;
}

.btn-success:hover,
.btn-success:focus {
    background-color: #17824a;
    border-color: #17824a;
}

/* ---------- 3. Data table ---------- */
.table-bordered,
.table-bordered td,
.table-bordered th {
    border-left: none;
    border-right: none;
    border-top: none;
}

.table thead.thead-dark th,
.table thead.thead-light th {
    background-color: #f1f5f9;
    color: #495057;
    font-weight: 600;
    font-size: 12px;
    text-transform: none;
    border-bottom: 1px solid #edf2f7;
    border-top: none;
    text-align: left;
    white-space: nowrap;
}

.table td {
    font-size: 13px;
    padding: 10px 12px;
    vertical-align: middle;
    border-bottom: 1px solid #edf2f7;
    border-top: none;
}

.table th {
    padding: 10px 12px;
}

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

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

/* Soft pill badges */
.badge {
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
}

.badge-success {
    background-color: #e6f6ed;
    color: #1e9e5a;
}

.badge-danger {
    background-color: #fdecec;
    color: #d64545;
}

.badge-warning {
    background-color: #fff6e0;
    color: #b7791f;
}

.badge-info {
    background-color: #e6f3ff;
    color: #1a73e8;
}

.badge-primary {
    background-color: #e8f0fe;
    color: #1a73e8;
}

.badge-secondary {
    background-color: #eef1f4;
    color: #6b7280;
}

.badge-dark {
    background-color: #e9ecef;
    color: #343a40;
}

.badge-light {
    background-color: #f8f9fa;
    color: #495057;
}

/* ---------- 4. Responsive / mobile ---------- */
.card-body {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .form-control,
    select.form-control,
    .form-control-sm {
        min-height: 42px;
        font-size: 14px;
    }

    .btn {
        min-height: 40px;
        font-size: 14px;
    }

    .btn-xs {
        min-height: 32px;
        min-width: 32px;
    }

    .content-wrapper > .content {
        padding-left: 8px;
        padding-right: 8px;
    }
}
