/* ========================================
   Disdukcapil Design System â€” Stitch UI
   ======================================== */

/* â”€â”€ Design Tokens â”€â”€ */
:root {
    --primary: #B91C1C;
    --primary-light: #FEF2F2;
    --primary-dark: #991B1B;
    --accent-green: #10b981;
    --accent-green-light: #d1fae5;
    --accent-orange: #f97316;
    --accent-orange-light: #fff7ed;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --info: #3b82f6;
    --info-light: #eff6ff;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --success: #10b981;
    --success-light: #d1fae5;
    --bg-light: #f6f6f8;
    --bg-dark: #101622;
    --surface: #ffffff;
    --surface-dark: #1e293b;
    --border: #e2e8f0;
    --border-dark: #334155;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius-sm: 0.25rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --transition: all 0.2s ease;
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --topbar-height: 64px;
}

/* â”€â”€ Reset & Base â”€â”€ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* â”€â”€ Typography â”€â”€ */
h1 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

h4 {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.35;
}

h5 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

h6 {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.5;
}

.text-small {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

/* â”€â”€ Material Icons â”€â”€ */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

/* â”€â”€ Buttons â”€â”€ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.875rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-family);
    line-height: 1.5;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(17, 82, 212, 0.3);
}

.btn-success {
    background: var(--accent-green);
    color: #fff;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-warning {
    background: var(--accent-orange);
    color: #fff;
}

.btn-warning:hover {
    background: #ea580c;
}

.btn-outline {
    background: transparent;
    border-color: var(--border);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.btn-sm {
    padding: 6px 16px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: 10px;
    border-radius: var(--radius-full);
}

/* â”€â”€ Cards â”€â”€ */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-flat {
    box-shadow: none;
}

.card-flat:hover {
    box-shadow: none;
}

/* â”€â”€ Stat Cards â”€â”€ */
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-card .stat-icon.primary {
    background: var(--primary-light);
    color: var(--primary);
}

.stat-card .stat-icon.success {
    background: var(--success-light);
    color: var(--success);
}

.stat-card .stat-icon.warning {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-card .stat-icon.danger {
    background: var(--danger-light);
    color: var(--danger);
}

.stat-card .stat-icon.info {
    background: var(--info-light);
    color: var(--info);
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* â”€â”€ Badges â”€â”€ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-info {
    background: var(--info-light);
    color: var(--info);
}

.badge-default {
    background: #f1f5f9;
    color: var(--text-secondary);
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary);
}

/* â”€â”€ Alerts â”€â”€ */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 16px;
}

.alert-success {
    background: var(--success-light);
    color: #065f46;
    border-left: 4px solid var(--success);
}

.alert-warning {
    background: var(--warning-light);
    color: #92400e;
    border-left: 4px solid var(--warning);
}

.alert-danger {
    background: var(--danger-light);
    color: #991b1b;
    border-left: 4px solid var(--danger);
}

.alert-info {
    background: var(--info-light);
    color: #1e40af;
    border-left: 4px solid var(--info);
}

.alert .material-symbols-outlined {
    font-size: 20px;
    margin-top: 1px;
    flex-shrink: 0;
}

/* â”€â”€ Forms â”€â”€ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    padding-left: 2px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    font-family: var(--font-family);
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--primary-light);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(17, 82, 212, 0.12);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.form-control-icon {
    position: relative;
}

.form-control-icon .material-symbols-outlined {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 20px;
}

.form-control-icon .form-control {
    padding-left: 44px;
}

.form-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-text.error {
    color: var(--danger);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%2394a3b8' d='m12 15.4-6-6L7.4 8l4.6 4.6L16.6 8 18 9.4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* â”€â”€ Data Table â”€â”€ */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: var(--surface);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table thead {
    background: #f8fafc;
}

.data-table th {
    padding: 14px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.data-table td {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

/* â”€â”€ Pagination â”€â”€ */
.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.pagination li a,
.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.pagination li a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.pagination li.active span {
    background: var(--primary);
    color: #fff;
    font-weight: 700;
}

.pagination li.disabled span {
    opacity: 0.4;
    cursor: not-allowed;
}

/* â”€â”€ Tabs â”€â”€ */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 24px;
}

.tab-item {
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
}

.tab-item:hover {
    color: var(--primary);
}

.tab-item.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* â”€â”€ Breadcrumb â”€â”€ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb .separator {
    color: var(--text-muted);
}

.breadcrumb .current {
    color: var(--text-primary);
    font-weight: 600;
}

/* â”€â”€ Modal â”€â”€ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--surface);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.25s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.125rem;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

/* â”€â”€ Stepper â”€â”€ */
.stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 0;
}

.stepper-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    background: var(--border);
    transition: var(--transition);
}

.stepper-dot.active {
    width: 32px;
    background: var(--primary);
}

.stepper-dot.completed {
    background: var(--accent-green);
}

.stepper-labels {
    display: flex;
    justify-content: space-between;
    padding: 0 32px;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.stepper-labels span.active {
    color: var(--primary);
}

.stepper-labels span.completed {
    color: var(--accent-green);
}

/* â”€â”€ Step Panel (Pengajuan Form) â”€â”€ */
.step-panel {
    background: var(--primary-light) !important;
    border-color: rgba(17, 82, 212, 0.15) !important;
}

.step-panel .form-control {
    background: #fff;
}

/* â”€â”€ File Upload Dropzone â”€â”€ */
.dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(246, 246, 248, 0.5);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.dropzone:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.dropzone .dropzone-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: var(--transition);
}

.dropzone:hover .dropzone-icon {
    transform: scale(1.1);
}

.dropzone .dropzone-icon .material-symbols-outlined {
    font-size: 28px;
    color: var(--primary);
}

/* â”€â”€ File Preview â”€â”€ */
.file-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
}

.file-preview .file-thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.file-preview .file-info {
    flex: 1;
    overflow: hidden;
}

.file-preview .file-name {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-preview .file-meta {
    font-size: 0.625rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

/* â”€â”€ Dropdown â”€â”€ */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: 100;
    padding: 8px;
    animation: fadeIn 0.15s ease;
}

.dropdown-menu.active {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 0.875rem;
    color: var(--text-primary);
    border-radius: var(--radius);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: var(--font-family);
}

.dropdown-item:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 6px 0;
}

/* â”€â”€ Layout: Admin Sidebar â”€â”€ */
.admin-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-brand {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand .brand-icon {
    color: var(--primary);
    font-size: 28px;
}

.sidebar-brand .brand-text h1 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.sidebar-brand .brand-text span {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar.collapsed .brand-text {
    display: none;
}

.sidebar-nav {
    flex: 1;
    padding: 0 12px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    margin-bottom: 2px;
    text-decoration: none;
}

.nav-item:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
}

.sidebar.collapsed .nav-item span.nav-label {
    display: none;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 12px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
}

.sidebar-user .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.sidebar-user .user-info {
    overflow: hidden;
}

.sidebar-user .user-name {
    font-size: 0.875rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user .user-role {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.sidebar.collapsed .sidebar-user .user-info {
    display: none;
}

/* â”€â”€ Layout: Topbar â”€â”€ */
.topbar {
    height: var(--topbar-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    flex-shrink: 0;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.topbar-toggle:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.notification-btn {
    position: relative;
}

.notification-btn .notif-count {
    position: absolute;
    top: 0;
    right: 0;
    width: 18px;
    height: 18px;
    background: var(--danger);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--surface);
}

/* â”€â”€ Layout: Main Content â”€â”€ */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-y: auto;
}

.content-wrapper {
    padding: 32px;
    flex: 1;
}

.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* â”€â”€ Layout: Grid â”€â”€ */
.grid {
    display: grid;
    gap: 24px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* â”€â”€ Public Navbar â”€â”€ */
.public-navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.9);
}

.public-navbar .nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.public-navbar .nav-brand h1 {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--text-primary);
}

.public-navbar .nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.public-navbar .nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.public-navbar .nav-links a:hover {
    color: var(--primary);
}

.public-navbar .nav-links a.active {
    color: var(--primary);
    font-weight: 700;
}

.public-navbar .nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* â”€â”€ Hero Section â”€â”€ */
.hero {
    position: relative;
    height: 320px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 32px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary) 0%, rgba(17, 82, 212, 0.4) 100%);
    z-index: 1;
}

.hero-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    max-width: 640px;
}

.hero-content .hero-badge {
    background: var(--accent-green);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: fit-content;
    margin-bottom: 16px;
}

.hero-content h2 {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 8px;
}

.hero-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

/* â”€â”€ Service Grid â”€â”€ */
.service-card {
    background: #dc2626;
    border: 1px solid #dc2626;
    border-radius: var(--radius-xl);
    padding: 24px;
    transition: var(--transition);
    color: #fff;
}

.service-card:hover {
    border-color: #b91c1c;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: #b91c1c;
}

.service-card .service-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-bottom: 16px;
}

/* â”€â”€ Info Pelayanan Section â”€â”€ */
.info-pelayanan {
    background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    color: #fff;
    margin-top: 32px;
}

.info-pelayanan-header {
    text-align: center;
    margin-bottom: 40px;
}

.info-pelayanan-header h3 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.info-pelayanan-body {
    display: flex;
    align-items: center;
    gap: 48px;
    margin-bottom: 40px;
}

.info-pelayanan-body .ip-left h2 {
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1.2;
    font-style: italic;
    text-transform: uppercase;
    max-width: 280px;
}

.ip-nav {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}

.ip-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    border: 2px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.ip-nav-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: #fff;
}

.ip-slider-wrapper {
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

.ip-slider {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    padding-bottom: 4px;
}

.ip-slider::-webkit-scrollbar {
    display: none;
}

.ip-slider .ip-item {
    flex: 0 0 140px;
    scroll-snap-align: start;
}

.ip-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.ip-item .ip-icon {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.ip-item:hover .ip-icon {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(1.05);
}

.ip-item .ip-icon .material-symbols-outlined {
    font-size: 32px;
    color: #fff;
}

.ip-item p {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.4;
    letter-spacing: 0.02em;
}

.info-pelayanan-footer {
    text-align: center;
}

.info-pelayanan-footer p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 20px;
}

.info-pelayanan-footer .btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    border: 2px solid #fff;
    border-radius: var(--radius-full);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: transparent;
    transition: var(--transition);
    text-decoration: none;
}

.info-pelayanan-footer .btn-download:hover {
    background: #fff;
    color: #0d3b7a;
}

/* â”€â”€ Progress Bar â”€â”€ */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar .progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

/* â”€â”€ Animations â”€â”€ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .5;
    }
}

/* â”€â”€ Utility â”€â”€ */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--text-muted);
}

.text-primary {
    color: var(--primary);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.font-bold {
    font-weight: 700;
}

.font-black {
    font-weight: 900;
}

.mt-4 {
    margin-top: 16px;
}

.mt-8 {
    margin-top: 32px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-8 {
    margin-bottom: 32px;
}

.gap-4 {
    gap: 16px;
}

.gap-8 {
    gap: 32px;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.flex-1 {
    flex: 1;
}

.hidden {
    display: none !important;
}

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* â”€â”€ Responsive â”€â”€ */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .sidebar {
        position: fixed;
        left: -300px;
        z-index: 200;
        height: 100vh;
        box-shadow: var(--shadow-lg);
    }

    .sidebar.mobile-open {
        left: 0;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 199;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .info-pelayanan-body {
        flex-direction: column;
        gap: 32px;
    }

    .info-pelayanan-body .ip-left h2 {
        text-align: center;
        max-width: 100%;
    }

    .info-pelayanan-body .ip-right {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .info-pelayanan {
        padding: 32px 20px;
    }

    .info-pelayanan-body .ip-right {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .info-pelayanan-body .ip-left h2 {
        font-size: 1.25rem;
    }

    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .content-wrapper {
        padding: 16px;
    }

    .topbar {
        padding: 0 16px;
    }

    .public-navbar {
        padding: 0 16px;
    }

    .public-navbar .nav-links {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--surface);
        flex-direction: column;
        padding: 16px 24px;
        gap: 4px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        z-index: 99;
        animation: slideDown 0.2s ease;
    }

    .public-navbar .nav-links.mobile-open {
        display: flex;
    }

    .public-navbar .nav-links a {
        padding: 12px 16px;
        border-radius: var(--radius-lg);
        font-size: 0.9375rem;
    }

    .public-navbar .nav-links a:hover,
    .public-navbar .nav-links a.active {
        background: var(--primary-light);
    }

    .mobile-menu-btn {
        display: flex !important;
    }

    h1 {
        font-size: 1.5rem;
    }

    .hero {
        height: 240px;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .hero-content {
        padding: 24px;
    }

    /* Homepage responsive grid */
    .home-grid {
        grid-template-columns: 1fr !important;
    }

    /* Table horizontal scroll */
    .table-wrapper {
        margin: 0 -16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    /* Stepper labels smaller */
    .stepper-labels {
        padding: 0 8px;
        font-size: 0.5625rem;
    }

    /* Modal full-width on mobile */
    .modal {
        max-width: 100%;
        margin: 0 8px;
        max-height: 85vh;
    }

    /* Form grid responsive */
    .form-grid-2 {
        grid-template-columns: 1fr !important;
    }

    .form-grid-4 {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* -- Flash Alert Auto-dismiss -- */
.alert-dismissible {
    animation: alertSlideIn 0.3s ease, alertFadeOut 0.5s ease 4.5s forwards;
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes alertFadeOut {
    from {
        opacity: 1;
        max-height: 100px;
        margin-bottom: 16px;
        padding: 16px 20px;
    }
    to {
        opacity: 0;
        max-height: 0;
        margin-bottom: 0;
        padding: 0 20px;
        overflow: hidden;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* -- Button Loading State -- */
.btn-loading {
    pointer-events: none;
    opacity: 0.75;
    position: relative;
}

.btn-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: btnSpin 0.6s linear infinite;
    margin-left: 8px;
}

@keyframes btnSpin {
    to {
        transform: rotate(360deg);
    }
}

/* -- Page Entrance Animation -- */
.content-wrapper,
.public-page-content {
    animation: pageEnter 0.3s ease;
}

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* -- Persyaratan Table Styling (admin) -- */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table thead {
    background: #f8fafc;
}

.table th {
    padding: 14px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.table td {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    vertical-align: middle;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: #f8fafc;
}

/* -- Tooltip -- */
[title] {
    position: relative;
}

/* -- Print Styles -- */
@media print {
    .sidebar,
    .topbar,
    .public-navbar,
    footer,
    .btn,
    .no-print {
        display: none !important;
    }

    .main-content {
        margin: 0;
        padding: 0;
    }

    .content-wrapper {
        padding: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
