/* Base helpers */
.ck-editor__editable,
textarea {
    min-height: 150px;
}

.datatable {
    width: 100% !important;
}

table.dataTable tbody td.select-checkbox::before,
table.dataTable tbody td.select-checkbox::after,
table.dataTable tbody th.select-checkbox::before,
table.dataTable tbody th.select-checkbox::after {
    top: 50%;
}

.dataTables_length,
.dataTables_filter,
.dt-buttons {
    margin-bottom: 0.333em;
    margin-top: .2rem;
}

.dataTables_filter {
    margin-right: .2rem;
}

.dataTables_wrapper label,
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate a {
    color: #f8fafc !important;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 6px 10px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2)) !important;
    color: #0b1020 !important;
}

.table.datatable {
    box-sizing: border-box;
    border-collapse: collapse;
}

table.dataTable thead th {
    border-bottom: 2px solid #c8ced3;
}

.dataTables_wrapper.no-footer .dataTables_scrollBody {
    border-bottom: 1px solid #c8ced3;
}

.select2 {
    max-width: 100%;
    width: 100% !important;
}

.select2-selection__rendered {
    padding-bottom: 5px !important;
}

.has-error .invalid-feedback {
    display: block !important;
}

.btn-info,
.badge-info {
    color: white;
}

table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
    background-image: none;
}

.sidebar .nav-item {
    cursor: pointer;
}

.btn-default {
    color: #23282c;
    background-color: #f0f3f5;
    border-color: #f0f3f5;
}

.btn-default.focus,
.btn-default:focus {
    box-shadow: 0 0 0 .2rem rgba(209, 213, 215, .5);
}

.btn-default:hover {
    color: #23282c;
    background-color: #d9e1e6;
    border-color: #d1dbe1;
}

.searchable-title {
    font-weight: bold;
}

.searchable-fields {
    padding-left: 5px;
}

.searchable-link {
    padding: 0 5px 0 5px;
}

.searchable-link:hover {
    cursor: pointer;
    background: #eaeaea;
}

.select2-results__option {
    padding-left: 0px;
    padding-right: 0px;
}

.form-group .required::after {
    content: " *";
    color: red;
}

.form-check.is-invalid ~ .invalid-feedback {
    display: block;
}

.c-sidebar-brand .c-sidebar-brand-full:hover {
    color: inherit;
}

.custom-select.form-control-sm {
    padding: 0.25rem 1.5rem;
}

.thin-line {
    border-right: 1px solid black;
}

h2 {
    text-align: center;
}

/* ------------------------------------------------------------------
   New admin theme: rounded buttons, gradients, glass cards
------------------------------------------------------------------- */
:root {
    --bg-1: #0f172a;
    --bg-2: #0b1020;
    --accent-1: #a855f7;
    --accent-2: #ec4899;
    --accent-3: #22d3ee;
    --muted: #94a3b8;
    --text: #e2e8f0;
    --card: rgba(15, 23, 42, 0.82);
    --border: rgba(148, 163, 184, 0.35);
}

body,
.c-app {
    background: radial-gradient(circle at 20% 20%, rgba(168, 85, 247, 0.08), transparent 35%),
        radial-gradient(circle at 80% 0%, rgba(34, 211, 238, 0.08), transparent 32%),
        linear-gradient(135deg, #0b1224, #0b1020 35%, #0a0f1c);
    color: var(--text);
}

.c-wrapper {
    background: transparent;
}

.c-header {
    background: rgba(11, 15, 27, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    border-radius: 22px;
    margin: 18px 18px 0;
    padding: 10px 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.c-header .c-header-nav-link {
    color: var(--text);
}

.c-main {
    padding: 22px 18px 34px;
}

.container-fluid {
    padding-left: 4px;
    padding-right: 4px;
}

.c-sidebar {
    background: linear-gradient(180deg, rgba(16, 24, 40, 0.95), rgba(11, 14, 26, 0.95));
    border-right: 1px solid var(--border);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
}

.c-sidebar-brand {
    border-bottom: 1px solid var(--border);
    padding: 18px 16px;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #f8fafc;
}

.c-sidebar-nav-item,
.c-sidebar-nav-dropdown {
    border-radius: 14px;
    margin: 4px 10px;
}

.c-sidebar-nav-link,
.c-sidebar-nav-dropdown-toggle {
    border-radius: 14px;
    color: #cbd5e1;
    transition: background 0.18s ease, color 0.18s ease, transform 0.1s ease;
}

.c-sidebar-nav-link:hover,
.c-sidebar-nav-dropdown-toggle:hover,
.c-sidebar-nav-link.c-active {
    color: #f8fafc !important;
    background: linear-gradient(135deg, #a855f7, #ec4899) !important;
    transform: translateX(2px);
}

.c-sidebar-nav-dropdown.c-show > .c-sidebar-nav-dropdown-toggle {
    background: linear-gradient(135deg, #a855f7, #22d3ee) !important;
    color: #fff !important;
}

.c-sidebar-nav-icon {
    color: #c4c9d4;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.02);
    overflow: hidden;
    color: var(--text);
}

.card-header {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(236, 72, 153, 0.12));
    border-bottom: 1px solid var(--border);
    font-weight: 700;
}

.card-body {
    color: var(--text);
}

.table thead th {
    border-bottom-color: var(--border);
    color: #cbd5e1;
}

.table tbody td,
.table tbody th {
    color: #f8fafc;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.02);
}

.table-striped tbody tr:nth-of-type(even) {
    background-color: rgba(255, 255, 255, 0.04);
}

.table-hover tbody tr:hover {
    background: rgba(168, 85, 247, 0.08);
}

.alert {
    border-radius: 16px;
}

/* Buttons */
.btn,
.btn-group .btn,
.dt-buttons .btn {
    border-radius: 999px;
    border: none;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 10px 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.38);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

.btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.btn-primary,
.btn-info,
.btn-success {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: #0b1020;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #f59e0b);
    color: #0b1020;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
}

.btn-secondary,
.btn-default {
    background: linear-gradient(135deg, #1f2937, #111827);
    color: #e5e7eb;
}

.btn-xs {
    padding: 6px 12px;
    font-size: 11px;
}

.btn-group-xs > .btn {
    padding: 6px 12px;
    font-size: 11px;
}

.badge {
    border-radius: 999px;
}

/* Pills and info chips */
.stat-chip {
    border-radius: 16px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--muted);
}

/* Dashboard helpers */
.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-radius: 22px;
    background: linear-gradient(120deg, rgba(168, 85, 247, 0.16), rgba(34, 211, 238, 0.12));
    border: 1px solid var(--border);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
    margin-bottom: 18px;
}

.dashboard-hero h1 {
    margin: 0;
    font-weight: 800;
    color: #f8fafc;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.metric-card {
    background: linear-gradient(145deg, rgba(9, 12, 24, 0.9), rgba(16, 24, 40, 0.88));
    border-radius: 18px;
    border: 1px solid var(--border);
    padding: 14px 16px;
    color: #f8fafc;
    position: relative;
    overflow: hidden;
}

.metric-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(168, 85, 247, 0.2), transparent 40%);
    opacity: 0.35;
    pointer-events: none;
}

.metric-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.metric-value {
    font-size: 24px;
    font-weight: 700;
    color: #f8fafc;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #0f172a;
}

.glass-panel {
    background: rgba(10, 16, 30, 0.82);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.table thead th {
    background: rgba(255, 255, 255, 0.02);
}

.table-wrapper {
    background: rgba(6, 10, 20, 0.85);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(12, 18, 32, 0.95);
}

.top-greeting {
    padding: 8px 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(168, 85, 247, 0.14));
    border: 1px solid var(--border);
    color: #f8fafc;
    font-weight: 700;
}

.c-header-toggler i {
    color: #ffffff;
}

@media (max-width: 991.98px) {
    .c-header {
        margin: 12px;
    }

    .c-sidebar-nav-item,
    .c-sidebar-nav-dropdown {
        margin: 4px;
    }
}

.sidebar-profile {
    margin: 12px 14px;
    padding: 12px 12px 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: #e2e8f0;
}

.sidebar-profile .name {
    font-weight: 700;
    color: #f8fafc;
}

.sidebar-profile .role {
    font-size: 12px;
    color: var(--muted);
}

/* ------------------------------------------------------------------
   Light admin overrides: softer background, standard buttons
------------------------------------------------------------------- */
:root {
    --bg-1: #f5f7fb;
    --bg-2: #eef2f7;
    --accent-1: #3b82f6;
    --accent-2: #0ea5e9;
    --accent-3: #22c55e;
    --muted: #64748b;
    --text: #1f2937;
    --card: #ffffff;
    --border: #e5e7eb;
}

body,
.c-app {
    background: radial-gradient(circle at 15% 20%, rgba(14, 165, 233, 0.08), transparent 32%),
        radial-gradient(circle at 75% 10%, rgba(59, 130, 246, 0.07), transparent 30%),
        linear-gradient(180deg, var(--bg-1), var(--bg-2));
    color: var(--text);
}

.c-wrapper {
    background: transparent;
}

.c-header {
    background: #ffffff;
    backdrop-filter: none;
    border-bottom: 1px solid var(--border);
    border-radius: 12px;
    margin: 18px 18px 0;
    padding: 10px 16px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.c-header .c-header-nav-link {
    color: #334155;
}

.c-main {
    padding-bottom: 22px;
}

.top-greeting {
    background: #e2e8f0;
    border: 1px solid var(--border);
    color: #0f172a;
}

.card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    color: #1f2937;
}

.card-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    color: #0f172a;
}

.card-body {
    color: #1f2937;
}

.table thead th {
    background: #f8fafc;
    border-bottom-color: var(--border);
    color: #334155;
}

.table tbody td,
.table tbody th {
    color: #1f2937;
}

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

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

.alert {
    color: inherit;
}

.dataTables_wrapper label,
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate a {
    color: #334155 !important;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 10px;
    color: #0f172a !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 6px !important;
    background: #ffffff !important;
    border: 1px solid var(--border);
    color: #0f172a !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #007bff !important;
    color: #ffffff !important;
    border-color: #007bff !important;
}

/* Laravel pagination (blade) normalization */
.pagination .page-link {
    color: #0f172a;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 6px 12px;
}

.pagination .page-item.active .page-link {
    color: #ffffff;
    background-color: #007bff;
    border-color: #007bff;
}

.pagination .page-link:focus {
    box-shadow: none;
}

.btn,
.btn-group .btn,
.dt-buttons .btn {
    border-radius: .25rem;
    border: 1px solid transparent;
    font-weight: 400;
    padding: .375rem .75rem;
    box-shadow: none;
    transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.btn:hover {
    transform: none;
}

.btn:active {
    transform: none;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    color: #ffffff;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: #ffffff;
}

.btn-info:hover {
    background-color: #138496;
    border-color: #117a8b;
}

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

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-secondary,
.btn-default {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #ffffff;
}

.btn-secondary:hover,
.btn-default:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

.btn-ghost {
    background-color: transparent;
    border: 1px solid #cbd5e1;
    color: #334155;
}

.btn-ghost:hover {
    background-color: #e2e8f0;
}

.stat-chip {
    background: linear-gradient(135deg, #fdf2f8, #f3e8ff);
    border: 1px solid #f5d0fe;
    color: #4a5568;
}

.dashboard-hero {
    background: linear-gradient(120deg, #e0f2fe, #ede9fe);
    border: 1px solid var(--border);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    color: #0f172a;
}

.dashboard-hero h1 {
    background: linear-gradient(120deg, #ec4899, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
}

.metric-card {
    background: linear-gradient(145deg, #fdf2f8, #ede9fe);
    border: 1px solid #f5d0fe;
    color: #0f172a;
    box-shadow: 0 10px 26px rgba(168, 85, 247, 0.12);
}

.metric-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(236, 72, 153, 0.16), transparent 40%),
        radial-gradient(circle at 80% 10%, rgba(168, 85, 247, 0.14), transparent 38%);
    opacity: 1;
    pointer-events: none;
}

.metric-label {
    color: #64748b;
}

.metric-value {
    color: #0f172a;
}

.glass-panel {
    background: linear-gradient(145deg, #f8fafc, #fdf2f8);
    border: 1px solid #f5d0fe;
    box-shadow: 0 8px 22px rgba(168, 85, 247, 0.1);
}

.table-wrapper {
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.02);
}

.sticky-header {
    background: #f8fafc;
}

.c-header-toggler i {
    color: #0f172a;
}

.sidebar-profile {
    background: #f8fafc;
    border: 1px solid var(--border);
    color: #1f2937;
}

.sidebar-profile .name {
    color: #0f172a;
}

.sidebar-profile .role {
    color: #64748b;
}
