/* Kecamatan admin panel — Duralux overrides */

.nxl-navigation .m-header {
    padding: 12px 16px !important;
    overflow: visible;
}

.nxl-navigation .m-header .kecamatan-panel-brand {
    display: flex !important;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    min-width: 0;
}

.nxl-navigation .m-header .kecamatan-panel-brand__logo-wrap {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.nxl-navigation .m-header .kecamatan-panel-brand__logo {
    max-height: 36px;
    width: auto;
    max-width: 42px;
    object-fit: contain;
}

.nxl-navigation .m-header .kecamatan-panel-brand__name {
    display: block !important;
    flex: 1;
    min-width: 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: #283c50;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html.minimenu .nxl-navigation .m-header .kecamatan-panel-brand__name {
    display: none !important;
}

html.minimenu .nxl-navigation .m-header .kecamatan-panel-brand {
    justify-content: center;
}

html.minimenu .nxl-navigation .m-header .kecamatan-panel-brand__logo-wrap .logo-lg {
    display: none !important;
}

html.minimenu .nxl-navigation .m-header .kecamatan-panel-brand__logo-wrap .logo-sm {
    display: block !important;
}

html:not(.minimenu) .nxl-navigation .m-header .kecamatan-panel-brand__logo-wrap .logo-sm {
    display: none !important;
}

html:not(.minimenu) .nxl-navigation .m-header .kecamatan-panel-brand__logo-wrap .logo-lg {
    display: block !important;
}

.kecamatan-panel-container {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 70px);
}

.kecamatan-site-footer {
    margin-top: auto;
    padding: 1rem 1.5rem 1.25rem;
    text-align: center;
    font-size: 0.8125rem;
    color: #64748b;
    background-color: #fff;
    border-top: 1px solid #e9ecef;
}

.kecamatan-site-footer__copyright {
    color: #475569;
    font-weight: 500;
}

/* Header profile dropdown */
.kecamatan-header-profile .kecamatan-profile-wrap {
    position: relative;
}

.kecamatan-profile-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    z-index: 1050;
    overflow: hidden;
}

.kecamatan-profile-wrap.is-open .kecamatan-profile-menu {
    display: block;
}

.kecamatan-profile-menu-header {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
}

.kecamatan-profile-menu-item {
    display: block;
    padding: 10px 16px;
    color: #334155;
    text-decoration: none;
    font-size: 0.875rem;
}

.kecamatan-profile-menu-item:hover {
    background: #f8fafc;
    color: #0f172a;
}

.kecamatan-profile-menu-divider {
    height: 1px;
    background: #e9ecef;
}

.kecamatan-profile-logout {
    color: #dc3545 !important;
}

.kecamatan-profile-logout:hover {
    background: #fff5f5 !important;
}

/* Dashboard stat cards */
.kecamatan-dash-stat__icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.kecamatan-quick-links li + li {
    margin-top: 0.5rem;
}

.kecamatan-quick-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    color: #334155;
    text-decoration: none;
    font-size: 0.875rem;
}

.kecamatan-quick-link:hover {
    color: #3454d1;
}

.kecamatan-dash-table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    font-weight: 600;
    border-bottom-width: 1px;
}

.kecamatan-dash-table__icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    vertical-align: middle;
}

.kecamatan-dash-pengajuan__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0;
}

.kecamatan-dash-pengajuan__item + .kecamatan-dash-pengajuan__item {
    border-top: 1px solid #f1f5f9;
}

.kecamatan-dash-agenda .list-group-item {
    padding: 0.85rem 1rem;
    border-color: #f1f5f9;
}

.kecamatan-dash-agenda .list-group-item:hover {
    background: #f8fafc;
}

.kecamatan-dash-stat:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08) !important;
    transition: transform 0.15s, box-shadow 0.15s;
}

.main-content {
    padding: 0 1.5rem 1.5rem;
}

/* Tombol aksi tabel & utilitas Duralux */
.btn-light-brand {
    color: #3454d1;
    background-color: #eef2ff;
    border: 1px solid #dbe4ff;
    text-transform: none;
    font-weight: 500;
    letter-spacing: normal;
}

.btn-light-brand:hover,
.btn-light-brand:focus {
    color: #fff;
    background-color: #3454d1;
    border-color: #3454d1;
}

.btn-primary,
.btn-danger,
.btn-light {
    text-transform: none;
    font-weight: 500;
    letter-spacing: normal;
}

.kecamatan-table-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.kecamatan-table-card .table thead th {
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #e9ecef;
    white-space: nowrap;
}

.kecamatan-table-card .table td {
    vertical-align: middle;
}

.kecamatan-table-card .badge {
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
}

.bg-soft-success {
    background-color: rgba(16, 185, 129, 0.12) !important;
}

.bg-soft-warning {
    background-color: rgba(245, 158, 11, 0.14) !important;
}

.text-success {
    color: #059669 !important;
}

.text-warning {
    color: #d97706 !important;
}

.bg-soft-primary {
    background-color: rgba(52, 84, 209, 0.12) !important;
}

.bg-soft-danger {
    background-color: rgba(220, 53, 69, 0.12) !important;
}

.bg-soft-info {
    background-color: rgba(14, 165, 233, 0.12) !important;
}

.bg-soft-secondary {
    background-color: rgba(100, 116, 139, 0.12) !important;
}

.text-primary {
    color: #3454d1 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-info {
    color: #0ea5e9 !important;
}

.text-secondary {
    color: #64748b !important;
}

/* Galeri album cards */
.kecamatan-galeri-album-card {
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kecamatan-galeri-album-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08) !important;
}

.kecamatan-galeri-album-card__cover {
    position: relative;
    aspect-ratio: 16 / 10;
    background: #f1f5f9;
    overflow: hidden;
}

.kecamatan-galeri-album-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kecamatan-galeri-album-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 2.5rem;
}

.kecamatan-galeri-album-card__featured {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #f59e0b;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.kecamatan-galeri-album-card__status {
    position: absolute;
    top: 10px;
    right: 10px;
}

.kecamatan-galeri-album-card__desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kecamatan-galeri-cover-preview {
    max-height: 120px;
    width: auto;
}

/* Galeri media items inside album */
.kecamatan-galeri-media-card__thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #f8fafc;
    overflow: hidden;
}

.kecamatan-galeri-media-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kecamatan-galeri-media-card__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.35);
    color: #fff;
    font-size: 1.75rem;
    pointer-events: none;
}

.kecamatan-galeri-media-card__badge {
    position: absolute;
    left: 8px;
    bottom: 8px;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    color: #fff;
}

.kecamatan-galeri-media-card__badge.is-photo {
    background: #3454d1;
}

.kecamatan-galeri-media-card__badge.is-video {
    background: #dc3545;
}

.kecamatan-galeri-empty {
    background: #f8fafc;
    border: 1px dashed #dbe4ff;
    border-radius: 12px;
}

/* Pengumuman PDF cards */
.kecamatan-pdf-card__icon {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.14);
    color: #d97706;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    line-height: 1;
}

.kecamatan-pdf-card__icon span {
    font-size: 0.625rem;
    font-weight: 800;
    margin-top: 0.15rem;
    letter-spacing: 0.04em;
}

.kecamatan-pengumuman-files-empty {
    background: #fffbeb;
    border: 1px dashed #fde68a;
    border-radius: 12px;
}

.kecamatan-layanan-fields-empty {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
}

/* Permission grid */
.kecamatan-section-divider {
    padding-top: 0.5rem;
    border-top: 1px solid #e9ecef;
}

.kecamatan-permission-panel__required {
    display: flex;
    align-items: center;
    padding: 0.65rem 0.85rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    font-size: 0.8125rem;
    color: #166534;
}

.kecamatan-permission-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    margin: 0;
    height: 100%;
}

.kecamatan-permission-item:hover {
    border-color: #c7d2fe;
    background: #fafbff;
}

.kecamatan-permission-item.is-checked {
    border-color: #3454d1;
    background: #f5f7ff;
    box-shadow: 0 0 0 1px rgba(52, 84, 209, 0.08);
}

.kecamatan-permission-item__input {
    flex-shrink: 0;
    margin: 0;
}

.kecamatan-permission-item__icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kecamatan-permission-item.is-checked .kecamatan-permission-item__icon {
    background: rgba(52, 84, 209, 0.12);
    color: #3454d1;
}

.kecamatan-permission-item__label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #334155;
    line-height: 1.3;
}

/* Role cards */
.kecamatan-role-card__icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(52, 84, 209, 0.12);
    color: #3454d1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.kecamatan-role-card__icon.is-super {
    background: rgba(245, 158, 11, 0.14);
    color: #d97706;
}

/* Admin profile */
.kecamatan-user-avatar {
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.kecamatan-user-avatar--sm {
    width: 36px;
    height: 36px;
    font-size: 0.875rem;
}

.kecamatan-user-avatar--md {
    width: 40px;
    height: 40px;
    font-size: 1rem;
}

.kecamatan-user-avatar--lg {
    width: 96px;
    height: 96px;
    font-size: 2rem;
}

.kecamatan-user-avatar--fallback {
    background: linear-gradient(135deg, #3454d1, #6366f1);
    color: #fff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.kecamatan-user-avatar--photo {
    border: 2px solid #e5e7eb;
    background: #f8fafc;
}

.kecamatan-profile-avatar-wrap {
    width: fit-content;
}

.kecamatan-admin-header-brand__logo {
    height: 32px;
    width: auto;
    max-width: 40px;
    object-fit: contain;
}

.kecamatan-admin-header-brand__name {
    font-size: 0.875rem;
    font-weight: 700;
    color: #283c50;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kecamatan-settings-preview__logo {
    max-height: 80px;
    max-width: 160px;
    object-fit: contain;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.5rem;
    background: #f8fafc;
}

.kecamatan-carousel-admin-item {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    height: 100%;
}

.kecamatan-carousel-admin-item__img {
    width: 100%;
    aspect-ratio: 16 / 5;
    object-fit: cover;
    display: block;
    background: #f1f5f9;
}

.kecamatan-carousel-admin-item__body {
    padding: 0.85rem;
}

.kecamatan-pegawai-admin-card {
    overflow: hidden;
}

.kecamatan-pegawai-admin-card__photo-wrap {
    position: relative;
    aspect-ratio: 4 / 5;
    background: #f1f5f9;
}

.kecamatan-pegawai-admin-card__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kecamatan-pegawai-admin-card__fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #3454d1, #6366f1);
}

.kecamatan-pegawai-admin-card__badge {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
}

.kecamatan-pegawai-form-preview {
    width: 120px;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.kecamatan-carousel-admin-empty {
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
}

.kecamatan-settings-preview__favicon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.35rem;
    background: #f8fafc;
}

.bg-soft-warning {
    background-color: rgba(245, 158, 11, 0.14) !important;
}

/* Auth — form login terpusat */
.kecamatan-auth-body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(145deg, #003d47 0%, #005461 42%, #007d91 100%);
}

.kecamatan-auth-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    overflow: hidden;
}

.kecamatan-auth-page__glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(0, 0, 0, 0.12) 0%, transparent 45%);
    pointer-events: none;
}

.kecamatan-auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 1.25rem;
    padding: 2rem 2rem 1.5rem;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
}

.kecamatan-auth-brand {
    text-align: center;
    margin-bottom: 1.5rem;
}

.kecamatan-auth-brand__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.kecamatan-auth-brand__logo {
    max-height: 64px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.kecamatan-auth-brand__fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, #005461, #007d91);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
}

.kecamatan-auth-brand__name {
    margin-top: 0.65rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
}

.kecamatan-auth-card__header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.kecamatan-auth-card__title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.35rem;
    line-height: 1.25;
}

.kecamatan-auth-card__subtitle {
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
}

.kecamatan-auth-card__desc {
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 0;
}

.kecamatan-auth-card__body {
    margin-top: 1.25rem;
}

.kecamatan-auth-card__footer {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
}

.kecamatan-auth-card__back,
.kecamatan-auth-card__meta {
    font-size: 0.8rem;
    color: #64748b;
    text-decoration: none;
}

.kecamatan-auth-card__back:hover {
    color: #005461;
}

.kecamatan-auth-page__site {
    position: relative;
    z-index: 1;
    margin-top: 1.25rem;
    margin-bottom: 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
    text-align: center;
}

.kecamatan-auth-form__label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.4rem;
}

.kecamatan-auth-form__input {
    border: 1px solid #cbd5e1;
    border-radius: 0.65rem;
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.kecamatan-auth-form__input:focus {
    border-color: #007d91;
    box-shadow: 0 0 0 0.2rem rgba(0, 125, 145, 0.15);
}

.kecamatan-auth-form__link {
    font-size: 0.8rem;
    color: #007d91;
    text-decoration: none;
    font-weight: 600;
}

.kecamatan-auth-form__link:hover {
    color: #005461;
    text-decoration: underline;
}

.kecamatan-auth-form__submit {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #005461 0%, #007d91 100%);
    border: none;
    border-radius: 0.65rem;
    transition: transform 0.15s, box-shadow 0.15s;
}

.kecamatan-auth-form__submit:hover {
    color: #fff;
    background: linear-gradient(135deg, #004652 0%, #006d7f 100%);
    box-shadow: 0 8px 20px rgba(0, 84, 97, 0.28);
    transform: translateY(-1px);
}

@media (max-width: 575px) {
    .kecamatan-auth-card {
        padding: 1.5rem 1.25rem 1.25rem;
    }

    .kecamatan-auth-card__title {
        font-size: 1.35rem;
    }
}
