.btn-primary,
.btn-primary:focus {
    color: #fff;
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-primary:hover {
    color: #fff;
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

.btn-primary:focus,
.btn-primary.focus {
    box-shadow: 0 0 0 0.2rem var(--color-primary-ring);
}

.btn-primary.disabled,
.btn-primary:disabled {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active,
.show > .btn-primary.dropdown-toggle {
    color: #fff;
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

.btn-action {
    padding: 0.625rem 1.75rem;
    font-weight: 600;
    border-radius: 6px;
}

.btn-action-lg {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 6px;
}

.btn-brand {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    border-radius: 11px;
    padding: 13px 22px;
    font-weight: 700;
    box-shadow: var(--shadow-primary);
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-brand:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    color: #fff;
    transform: translateY(-1px);
}

.btn-icon-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background-color: transparent;
    color: var(--fa-muted-2);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-icon-delete:hover {
    background-color: var(--color-danger-soft);
    color: var(--color-danger);
}

.btn-icon-delete:focus {
    background-color: var(--color-danger-soft);
    color: var(--color-danger);
    box-shadow: 0 0 0 0.2rem var(--color-danger-soft);
}

.btn-icon-delete i {
    font-size: 1rem;
    line-height: 1;
}

.badge-primary {
    color: #fff;
    background-color: var(--color-primary);
}

.badge-soft-success {
    background-color: var(--fa-success-soft-bg);
    color: var(--fa-success-soft-fg);
    font-weight: 700;
    padding: 0.5em 1em;
    border-radius: 50rem;
}

.badge-soft-warning {
    background-color: var(--fa-warning-soft-bg);
    color: var(--fa-warning-soft-fg);
    font-weight: 700;
    padding: 0.5em 1em;
    border-radius: 50rem;
}

.badge-soft-secondary {
    background-color: var(--fa-neutral-soft-bg);
    color: var(--fa-neutral-soft-fg);
    font-weight: 700;
    padding: 0.5em 1em;
    border-radius: 50rem;
}

.navbar.fixed-top {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.02) !important;
    border-bottom: 1px solid var(--fa-field-line);
    background: var(--fa-white);
}

.navbar .navbar-brand-wrapper {
    background: var(--fa-white);
    border-bottom: 1px solid var(--fa-field-line);
}

.navbar .navbar-brand-wrapper .brand-logo-mini .navbar-brand-text {
    color: var(--color-primary);
    font-weight: 800;
    font-size: 1.5rem;
}

#navbar-search-input {
    border-radius: 20px;
    background-color: var(--fa-field-bg);
    border: 1px solid transparent;
    padding-left: 1rem;
    color: #475569;
    transition: all 0.3s ease;
}

#navbar-search-input:focus {
    background-color: var(--fa-white);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-ring);
}

#navbar-search-icon {
    border: none;
    background: transparent;
}

#navbar-search-icon i {
    color: var(--fa-muted-2);
}

.navbar-toggler {
    color: var(--fa-muted);
    transition: color 0.3s;
}

.navbar-toggler:hover {
    color: var(--color-primary);
}

.nav-profile-avatar {
    width: 38px !important;
    height: 38px !important;
    background-color: var(--color-primary) !important;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 10px var(--color-primary-ring);
}

.navbar-dropdown {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
    padding: 0.5rem 0;
    margin-top: 10px;
}

.navbar-dropdown .dropdown-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--fa-field-line);
}

.navbar-dropdown .dropdown-item {
    padding: 0.7rem 1.5rem;
    font-weight: 500;
    color: #475569;
    transition: all 0.2s;
}

.navbar-dropdown .dropdown-item:hover {
    background-color: var(--fa-field-bg);
    color: var(--color-primary);
}

.navbar-dropdown .dropdown-item i.text-primary {
    color: var(--color-primary) !important;
}

#sidebar {
    background-color: var(--fa-white);
    border-right: 1px solid var(--border-line);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.02);
}

.sidebar .nav {
    padding-top: 1rem;
}

.sidebar .nav .nav-item {
    margin-bottom: 0.3rem;
}

.sidebar .nav .nav-item .nav-link {
    border-radius: 11px;
    margin: 0 1rem;
    padding: 0.8rem 1.2rem;
    color: var(--fa-muted);
    transition: all 0.3s ease;
}

.sidebar .nav .nav-item .nav-link i.menu-icon {
    color: inherit;
    font-size: 1.1rem;
    margin-right: 1rem;
}

.sidebar .nav .nav-item .nav-link .menu-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.sidebar .nav .nav-item:not(.active):hover .nav-link {
    background-color: var(--surface-bg-alt);
    color: var(--color-primary);
    transform: translateX(4px);
}

.sidebar .nav .nav-item:not(.active):hover .nav-link .menu-title,
.sidebar .nav .nav-item:not(.active):hover .nav-link i.menu-icon {
    color: var(--color-primary);
}

.sidebar .nav .nav-item.active .nav-link {
    background-color: var(--color-primary) !important;
    color: var(--fa-white) !important;
    box-shadow: var(--shadow-primary);
    font-weight: 700;
}

.sidebar .nav .nav-item.active .nav-link i.menu-icon {
    color: var(--fa-white) !important;
}

/* Navbar hamburger — boxed like the mockup. No `display` set on purpose, so
   SkyDash's responsive show/hide (display:none / d-lg-none) keeps working. */
.navbar .navbar-menu-wrapper .navbar-toggler {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border-line);
    border-radius: 10px;
    background-color: var(--fa-white);
    color: var(--text-strong);
}

.navbar .navbar-menu-wrapper .navbar-toggler:hover {
    background-color: var(--surface-bg-alt);
}

/* Center the glyph via the inner span (flex), so the button's `display`
   stays untouched and SkyDash's responsive show/hide keeps working. */
.navbar .navbar-menu-wrapper .navbar-toggler .icon-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: inherit;
}

.full-page-wrapper {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background-color: var(--fa-line);
}

.login-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.login-left {
    flex: 1;
    background-color: var(--fa-line);
    display: none;
    align-items: center;
    justify-content: center;
}

@media (min-width: 992px) {
    .login-left {
        display: flex;
    }
}

.left-logo {
    max-width: 280px;
    height: auto;
    transition: transform 0.5s ease;
}

.left-logo:hover {
    transform: scale(1.05);
}

.login-right {
    flex: 1;
    background-color: var(--fa-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-form-light {
    width: 100%;
    max-width: 420px;
    background-color: var(--fa-white) !important;
    border: 1px solid var(--fa-line) !important;
    border-radius: 24px !important;
    box-shadow: var(--shadow-elevated) !important;
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

.form-heading {
    text-align: center;
    margin-bottom: 2.5rem;
}

.form-logo {
    max-width: 200px;
    height: auto;
}

.form-subtitle {
    display: block;
    margin-top: 0.6rem;
    color: var(--fa-muted);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.auth-form-light .form-control-lg {
    background-color: var(--fa-field-bg) !important;
    border: 1px solid var(--fa-field-line) !important;
    border-radius: var(--field-radius) !important;
    padding: 1.2rem 1.2rem !important;
    font-size: 0.95rem;
    color: var(--fa-ink-2) !important;
    transition: all 0.3s ease;
}

.auth-form-light .form-control-lg:focus {
    background-color: var(--fa-white) !important;
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px var(--color-primary-ring) !important;
}

.auth-form-light .form-control-lg::placeholder {
    color: var(--fa-muted-2) !important;
}

.auth-form-btn {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    border-radius: var(--field-radius) !important;
    color: #fff !important;
    padding: 1rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px var(--color-primary-shadow) !important;
    transition: 0.3s ease !important;
}

.auth-form-btn:hover {
    background-color: var(--color-primary-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 8, 110, 0.35) !important;
}

.auth-form-light .form-check-input {
    accent-color: var(--color-primary);
    width: 1.1em;
    height: 1.1em;
    cursor: pointer;
}

.custom-card {
    border: 1px solid var(--border-line);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-card);
}

.card .card-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-heading);
    text-transform: none;
}

.card-title-lg {
    font-size: 1.25rem;
}

.form-control {
    border-radius: 10px;
    border: 1px solid var(--fa-field-line);
    background-color: var(--fa-field-bg);
    color: var(--fa-ink-2);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-control:focus {
    color: var(--fa-ink-2);
    background-color: var(--fa-white);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-ring);
}

.form-control::placeholder {
    color: var(--fa-muted-2);
}

.form-group label {
    font-weight: 600;
    color: var(--text-body);
    margin-bottom: 0.4rem;
}

@media (min-width: 992px) {
    .modal-lg,
    .modal-xl {
        max-width: 640px;
    }
}

.modal-content {
    border: none;
    border-radius: var(--card-radius);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
}

.modal-header {
    border-bottom: 1px solid var(--border-line);
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 700;
    color: var(--text-strong);
}

.modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    border-top: 1px solid var(--border-line);
    padding: 1rem 1.5rem;
}

.upload-zone {
    position: relative;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--color-primary);
    background-color: rgba(2, 8, 110, 0.04);
}

.upload-zone.has-image {
    width: auto;
    height: auto;
    max-width: 200px;
    padding: 0;
    border-style: solid;
    border-color: #dee2e6;
}

.upload-placeholder p,
.upload-placeholder small {
    display: none;
}

.upload-icon {
    font-size: 2rem;
    color: #adb5bd;
}

.upload-hint {
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: #adb5bd;
}

.preview-img {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
    border-radius: 6px;
}

.remove-overlay {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
}

/* Collapsed (icon-only) sidebar flyout label. Background is the primary navy;
   force white text so it stays legible — otherwise the expanded-sidebar hover rule
   (.nav-item:hover .menu-title { color: primary }) tints it navy-on-navy = invisible. */
.sidebar-icon-only .sidebar .nav .nav-item .nav-link .menu-title {
    background: var(--color-primary) !important;
    color: var(--fa-white) !important;
}

.bg-primary {
    background-color: var(--color-primary) !important;
}

.bg-primary:focus,
a.bg-primary:hover,
button.bg-primary:focus,
button.bg-primary:hover {
    background-color: var(--color-primary-hover) !important;
}

.text-primary {
    color: var(--color-primary) !important;
}

.text-primary:focus,
a.text-primary:hover {
    color: var(--color-primary-hover) !important;
}

.border-primary {
    border-color: var(--color-primary) !important;
}

.btn-outline-primary {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline-primary:hover,
.btn-outline-primary:not(:disabled):not(.disabled):active,
.show > .btn-outline-primary.dropdown-toggle {
    color: #fff;
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

/* ============================================================
   DataTables — global look (shared by every admin table).
   Token-based; no font-family here so icon fonts stay intact.
   Loaded after dataTables.bootstrap4.css → overrides win cleanly.
   ============================================================ */

/* Header */
table.dataTable thead th {
    background-color: var(--surface-bg);
    color: var(--fa-muted);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-line);
    border-top: none;
    padding: 1rem;
}

/* Body + hover */
table.dataTable tbody td {
    vertical-align: middle;
    padding: 1rem;
    color: var(--fa-muted);
    border-bottom: 1px solid var(--fa-bg-alt);
    font-size: var(--text-sm);
}

/* First column = primary title: bold + dark + slightly larger, consistent across every table */
table.dataTable tbody td:first-child {
    color: var(--text-heading);
    font-weight: 700;
    font-size: var(--text-md);
}

table.dataTable.table-hover tbody tr:hover td {
    background-color: var(--surface-bg);
}

/* Top toolbar layout (matches the dom row/col split) */
.dataTables_wrapper .dt-toolbar-left,
.dataTables_wrapper .dt-toolbar-right {
    display: flex;
    align-items: center;
}

.dataTables_wrapper .dt-toolbar-right {
    justify-content: flex-end;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin: 0;
}

/* Inputs / selects + focus ring */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .custom-dt-select {
    border: 1.5px solid var(--border-line);
    border-radius: var(--field-radius);
    padding: 0.45rem 0.75rem;
    outline: none;
    background-color: var(--surface-bg);
    color: var(--text-body);
}

/* Page-size value shown dark + bold, like the mockup */
.dataTables_wrapper .dataTables_length select {
    color: var(--text-heading);
    font-weight: 700;
}

.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus,
.dataTables_wrapper .custom-dt-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-ring);
}

/* Search box — magnifier icon (data-URI SVG, no markup needed) */
.dataTables_wrapper .dataTables_filter input {
    padding-left: 2.1rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 0.7rem center;
    background-size: 16px;
}

/* Selects — custom chevron */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .custom-dt-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 1.9rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    background-size: 14px;
}

/* Category/module filter — wide enough that the chevron never overlaps the label */
.dataTables_wrapper .custom-dt-select {
    min-width: 11.25rem;
    color: var(--fa-muted);
}

/* Sort arrows — single compact indicator right next to the header text (mockup style).
   The SkyDash template (style.min.css) draws two stacked themify-icon chevrons via
   .sorting:before/:after using a 3-class selector (.dataTables_wrapper .dataTable .sorting)
   and font-family: themify. Element selectors alone can't out-specify that, so we prefix
   every override with .dataTables_wrapper (matching its 3 classes, +1 element = higher
   specificity) and reset font-family off 'themify' so the unicode glyph renders.
   Disable the :before (up) chevron; repurpose :after as one inline glyph. */
.dataTables_wrapper table.dataTable > thead .sorting:before,
.dataTables_wrapper table.dataTable > thead .sorting_asc:before,
.dataTables_wrapper table.dataTable > thead .sorting_desc:before {
    content: none;
}

.dataTables_wrapper table.dataTable > thead th.sorting::after,
.dataTables_wrapper table.dataTable > thead th.sorting_asc::after,
.dataTables_wrapper table.dataTable > thead th.sorting_desc::after {
    position: static;
    right: auto;
    top: auto;
    bottom: auto;
    display: inline-block;
    margin-left: 0.4rem;
    font-family: inherit;
    font-size: 0.9em;
    line-height: inherit;
    opacity: 1;
}

.dataTables_wrapper table.dataTable > thead th.sorting::after {
    content: "↕";
    color: var(--fa-muted-2);
}

.dataTables_wrapper table.dataTable > thead th.sorting_asc::after {
    content: "↑";
    color: var(--color-primary);
}

.dataTables_wrapper table.dataTable > thead th.sorting_desc::after {
    content: "↓";
    color: var(--color-primary);
}

/* Pagination — pill buttons */
.dataTables_wrapper .pagination .page-item .page-link {
    border-radius: 8px;
    margin: 0 3px;
    color: var(--fa-muted);
    border: 1px solid transparent;
    background-color: transparent;
}

.dataTables_wrapper .pagination .page-item.active .page-link {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--fa-white);
    box-shadow: 0 2px 5px var(--color-primary-shadow);
}

.dataTables_wrapper .pagination .page-item.disabled .page-link {
    color: var(--fa-muted-2);
    opacity: 0.6;
}

/* Info + length text */
.dataTables_wrapper .dataTables_info {
    color: var(--fa-muted);
    font-size: var(--text-sm);
    padding-top: 0;
}

/* DataTables control labels ("Sayfada … göster" + "Ara:") — ONE source of truth.
   div-qualified to beat DataTables' own `div.dataTables_wrapper div.dataTables_* label
   { font-weight: normal }` (specificity 0,2,3) — otherwise our 600 silently loses. */
div.dataTables_wrapper div.dataTables_length label,
div.dataTables_wrapper div.dataTables_filter label {
    margin: 0;
    color: var(--fa-muted);
    font-size: var(--text-sm);
    font-weight: 600;
}

.dataTables_wrapper .dataTables_length select {
    margin: 0 0.5rem;
}

/* Filter label additionally lays "Ara:" + input out inline with a gap. */
div.dataTables_wrapper div.dataTables_filter label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
