/* ============================================
   ADMIN STYLING - CLEAN & MINIMALIST LIGHT
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Root Variables - Light Theme */
:root {
    --admin-primary: #176b4d;
    --admin-primary-light: #39b27a;
    --admin-bg: #fafbfc;
    --admin-surface: #ffffff;
    --admin-border: #e5e7eb;
    --admin-text: #1f2937;
    --admin-text-light: #6b7280;
    --admin-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    --admin-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.08);
    --admin-radius: 8px;
    --admin-transition: all 0.2s ease;
}

/* Global Reset */
* {
    box-sizing: border-box;
}

body.admin {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--admin-bg);
    color: var(--admin-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   SIDEBAR - CLEAN & MINIMALIST
   ============================================ */

.unfold-sidebar {
    background: var(--admin-surface);
    border-right: 1px solid var(--admin-border);
    width: 260px;
    box-shadow: none;
}

.unfold-sidebar .sidebar-header {
    background: var(--admin-surface);
    padding: 1.5rem;
    border-bottom: 1px solid var(--admin-border);
}

.unfold-sidebar .sidebar-header h1 {
    color: var(--admin-text);
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
    text-shadow: none;
    margin: 0;
}

/* Navigation Groups */
.unfold-sidebar .navigation-group-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--admin-text-light);
    padding: 0.75rem 1.5rem 0.5rem;
    margin-top: 0.5rem;
}

/* Navigation Items */
.unfold-sidebar .navigation-item {
    margin: 0.15rem 0.75rem;
    border-radius: var(--admin-radius);
    padding: 0.65rem 1rem;
    color: var(--admin-text);
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--admin-transition);
    text-decoration: none;
}

.unfold-sidebar .navigation-item:hover {
    background: #f3f4f6;
    color: var(--admin-primary);
    transform: none;
}

.unfold-sidebar .navigation-item.active {
    background: #f0fdf4;
    color: var(--admin-primary);
    font-weight: 600;
    box-shadow: none;
}

.unfold-sidebar .navigation-item.active::before {
    display: none;
}

/* ============================================
   HEADER - CLEAN DESIGN
   ============================================ */

.unfold-header {
    background: var(--admin-surface);
    border-bottom: 1px solid var(--admin-border);
    box-shadow: var(--admin-shadow);
    padding: 1rem 2rem;
}

.unfold-header::before {
    display: none;
}

/* ============================================
   CONTENT AREA - CLEAN LAYOUT
   ============================================ */

.unfold-content {
    background: var(--admin-bg);
    padding: 2rem;
    min-height: calc(100vh - 60px);
}

#content {
    background: var(--admin-surface);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
    border: 1px solid var(--admin-border);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Typography */
h1, h2, h3 {
    color: var(--admin-text);
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 1rem;
}

h1 {
    font-size: 1.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--admin-border);
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

/* ============================================
   CARDS & MODULES - MINIMALIST
   ============================================ */

.unfold-card,
.module {
    background: var(--admin-surface);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
    border: 1px solid var(--admin-border);
    transition: var(--admin-transition);
}

.unfold-card:hover,
.module:hover {
    box-shadow: var(--admin-shadow-hover);
    transform: none;
    border-color: var(--admin-border);
}

.unfold-card::before,
.module::before {
    display: none;
}

/* ============================================
   BUTTONS - CLEAN STYLE
   ============================================ */

.unfold-button,
input[type="submit"],
button[type="submit"],
.button,
.default {
    background: var(--admin-primary);
    color: white;
    border: none;
    border-radius: var(--admin-radius);
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--admin-transition);
    box-shadow: none;
    text-transform: none;
}

.unfold-button:hover,
input[type="submit"]:hover,
button[type="submit"]:hover,
.button:hover,
.default:hover {
    background: var(--admin-primary-light);
    box-shadow: var(--admin-shadow);
    transform: none;
}

.button-secondary,
.button {
    background: var(--admin-surface);
    color: var(--admin-primary);
    border: 1px solid var(--admin-border);
}

.button-secondary:hover,
.button:hover {
    background: #f9fafb;
    border-color: var(--admin-primary);
}

.deletelink,
.button-danger {
    background: #ef4444;
    color: white;
}

.deletelink:hover,
.button-danger:hover {
    background: #dc2626;
    box-shadow: var(--admin-shadow);
}

/* ============================================
   TABLES - CLEAN DESIGN
   ============================================ */

.results table,
#result_list {
    border-radius: var(--admin-radius);
    overflow: hidden;
    box-shadow: var(--admin-shadow);
    border: 1px solid var(--admin-border);
    background: var(--admin-surface);
}

.results thead {
    background: #f9fafb;
}

.results thead th {
    color: var(--admin-text);
    font-weight: 600;
    padding: 1rem;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--admin-border);
}

.results thead th:not(:last-child)::after {
    display: none;
}

.results tbody tr {
    border-bottom: 1px solid var(--admin-border);
    transition: var(--admin-transition);
}

.results tbody tr:last-child {
    border-bottom: none;
}

.results tbody tr:hover {
    background: #f9fafb;
    transform: none;
    box-shadow: none;
}

.results tbody td {
    padding: 1rem;
    color: var(--admin-text);
    font-size: 0.875rem;
}

/* ============================================
   FORMS - CLEAN INPUTS
   ============================================ */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
textarea,
select {
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    padding: 0.625rem 0.875rem;
    transition: var(--admin-transition);
    font-family: 'Inter', sans-serif;
    background: var(--admin-surface);
    color: var(--admin-text);
    font-size: 0.875rem;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
textarea:focus,
select:focus {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(23, 107, 77, 0.1);
    outline: none;
}

/* Fieldsets */
fieldset {
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: var(--admin-surface);
}

fieldset legend {
    background: #f9fafb;
    color: var(--admin-text);
    padding: 0.5rem 1rem;
    border-radius: var(--admin-radius);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: none;
    border: 1px solid var(--admin-border);
}

/* ============================================
   MESSAGES - CLEAN ALERTS
   ============================================ */

.messagelist .success,
.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-radius: var(--admin-radius);
    padding: 1rem 1.25rem;
    box-shadow: none;
}

.messagelist .error,
.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: var(--admin-radius);
    padding: 1rem 1.25rem;
    box-shadow: none;
}

.messagelist .warning,
.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: var(--admin-radius);
    padding: 1rem 1.25rem;
    box-shadow: none;
}

.messagelist .info,
.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    border-radius: var(--admin-radius);
    padding: 1rem 1.25rem;
    box-shadow: none;
}

/* ============================================
   FILTERS & SEARCH - CLEAN
   ============================================ */

#changelist-filter {
    background: var(--admin-surface);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
    border: 1px solid var(--admin-border);
    padding: 1rem;
}

#changelist-filter h2 {
    background: #f9fafb;
    color: var(--admin-text);
    padding: 0.75rem 1rem;
    border-radius: var(--admin-radius);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: -1rem -1rem 1rem -1rem;
    border-bottom: 1px solid var(--admin-border);
}

#changelist-search {
    border-radius: var(--admin-radius);
    border: 1px solid var(--admin-border);
    padding: 0.625rem 0.875rem;
    transition: var(--admin-transition);
}

#changelist-search:focus {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(23, 107, 77, 0.1);
}

/* ============================================
   PAGINATION - CLEAN
   ============================================ */

.paginator {
    margin: 1.5rem 0;
}

.paginator a,
.paginator .this-page {
    padding: 0.5rem 0.875rem;
    border-radius: var(--admin-radius);
    transition: var(--admin-transition);
    margin: 0 0.25rem;
    font-size: 0.875rem;
}

.paginator a {
    background: var(--admin-surface);
    color: var(--admin-text);
    border: 1px solid var(--admin-border);
    text-decoration: none;
}

.paginator a:hover {
    background: #f9fafb;
    border-color: var(--admin-primary);
    color: var(--admin-primary);
    transform: none;
}

.paginator .this-page {
    background: var(--admin-primary);
    color: white;
    box-shadow: none;
}

/* ============================================
   ACTIONS & BREADCRUMBS
   ============================================ */

.actions {
    background: var(--admin-surface);
    border-radius: var(--admin-radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--admin-shadow);
    border: 1px solid var(--admin-border);
}

.breadcrumbs {
    background: var(--admin-surface);
    border-radius: var(--admin-radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--admin-shadow);
    border: 1px solid var(--admin-border);
}

.breadcrumbs a {
    color: var(--admin-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--admin-transition);
}

.breadcrumbs a:hover {
    color: var(--admin-primary-light);
    text-decoration: underline;
}

/* ============================================
   LOGIN PAGE - CLEAN
   ============================================ */

.login {
    background: var(--admin-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login .form-row {
    background: var(--admin-surface);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow-hover);
    border: 1px solid var(--admin-border);
    padding: 2.5rem;
    max-width: 400px;
    width: 100%;
}

.login h1 {
    background: transparent;
    color: var(--admin-text);
    padding: 0;
    border-radius: 0;
    margin: 0 0 2rem 0;
    text-align: center;
    font-weight: 600;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--admin-primary);
    padding-bottom: 1rem;
}

/* ============================================
   BADGES & STATUS - CLEAN
   ============================================ */

.badge,
.status-tag {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}

.badge-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.badge-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.badge-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.badge-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ============================================
   DASHBOARD SUMMARY - CLEAN
   ============================================ */

/* Override Recent Actions menjadi Ringkasan Dashboard */
.module h2,
.module h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--admin-text);
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--admin-border);
}

/* Ganti teks "Tindakan terbaru" menjadi "Ringkasan Dashboard" */
.module h2,
.module h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--admin-text);
}

/* Recent Actions List */
.module ul.actionlist,
.module .actionlist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.module ul.actionlist li,
.module .actionlist li {
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    transition: var(--admin-transition);
}

.module ul.actionlist li:last-child {
    border-bottom: none;
}

.module ul.actionlist li:hover {
    background: #f9fafb;
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    border-radius: var(--admin-radius);
}

.module ul.actionlist li a {
    color: var(--admin-text);
    text-decoration: none;
    font-weight: 500;
    flex: 1;
}

.module ul.actionlist li a:hover {
    color: var(--admin-primary);
}

.module ul.actionlist li .mini {
    color: var(--admin-text-light);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.module ul.actionlist li time {
    color: var(--admin-text-light);
    font-size: 0.75rem;
    margin-left: auto;
    white-space: nowrap;
}

/* Dashboard Summary Custom */
.dashboard-summary {
    background: var(--admin-surface);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
    border: 1px solid var(--admin-border);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-summary h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--admin-text);
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--admin-border);
}

.dashboard-summary-item {
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    transition: var(--admin-transition);
}

.dashboard-summary-item:last-child {
    border-bottom: none;
}

.dashboard-summary-item:hover {
    background: #f9fafb;
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    border-radius: var(--admin-radius);
}

.dashboard-summary-item a {
    color: var(--admin-text);
    text-decoration: none;
    font-weight: 500;
    flex: 1;
}

.dashboard-summary-item a:hover {
    color: var(--admin-primary);
}

.dashboard-summary-item .model-name {
    color: var(--admin-text-light);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.dashboard-summary-item .object-name {
    color: var(--admin-text);
    font-weight: 500;
    display: block;
}

.dashboard-summary-item .timestamp {
    color: var(--admin-text-light);
    font-size: 0.75rem;
    margin-left: auto;
    white-space: nowrap;
}

/* ============================================
   IMAGES - CLEAN
   ============================================ */

img {
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
    transition: var(--admin-transition);
}

img:hover {
    box-shadow: var(--admin-shadow-hover);
    transform: none;
}

/* ============================================
   SCROLLBAR - CLEAN
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--admin-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--admin-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d1d5db;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .unfold-sidebar {
        width: 240px;
    }
    
    .unfold-content {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .unfold-sidebar {
        width: 100%;
        position: relative;
    }
    
    .unfold-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    #content {
        padding: 1.5rem;
    }
}

/* ============================================
   UTILITIES
   ============================================ */

.text-muted {
    color: var(--admin-text-light);
}

.text-primary {
    color: var(--admin-primary);
}

.bg-light {
    background: #f9fafb;
}

.border-light {
    border-color: var(--admin-border);
}

/* ============================================
   JAVASCRIPT ENHANCEMENT
   ============================================ */

/* Pastikan teks "Ringkasan Dashboard" terlihat dengan baik */
.module h2:first-child,
.module h3:first-child {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--admin-text);
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--admin-border);
}

/* Focus States */
*:focus {
    outline: 2px solid var(--admin-primary);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: rgba(23, 107, 77, 0.2);
    color: var(--admin-text);
}

::-moz-selection {
    background: rgba(23, 107, 77, 0.2);
    color: var(--admin-text);
}

