/* ==========================================================================
   PUSTAKA DIGITAL - TEMA PASTEL GREEN + BEIGE
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Color Palette - Pastel Green + Warm Beige */
    --bg-main: #f5f0e6;
    --bg-card: #ffffff;
    --bg-card-subtle: #fcfaf7;
    --bg-sidebar: #1b3328;
    --bg-sidebar-active: rgba(82, 183, 136, 0.2);
    
    --text-main: #1c2d24;
    --text-muted: #65756a;
    --text-light: #94a398;
    
    --primary: #2d5a44;
    --primary-hover: #214332;
    --primary-light: #e8f3ed;
    --primary-gradient: linear-gradient(135deg, #437a5b 0%, #29523e 100%);
    
    --accent-gold: #d4a373;
    --accent-sage: #a3b18a;
    
    /* Category Colors - Pastel Green & Warm Earth Harmonies */
    --diari-primary: #2a9d8f;
    --diari-bg: #e8f5e9;
    --diari-gradient: linear-gradient(135deg, #52b788 0%, #2a9d8f 100%);
    
    --cerpen-primary: #e76f51;
    --cerpen-bg: #fbe9e7;
    --cerpen-gradient: linear-gradient(135deg, #f4a261 0%, #e76f51 100%);
    
    --novel-primary: #3a7ca5;
    --novel-bg: #e1f5fe;
    --novel-gradient: linear-gradient(135deg, #588b8b 0%, #3a7ca5 100%);
    
    --jurnal-primary: #588157;
    --jurnal-bg: #f3f0e6;
    --jurnal-gradient: linear-gradient(135deg, #a3b18a 0%, #588157 100%);
    
    /* Borders & Shadows */
    --border-color: #e6dfd5;
    --border-color-dark: rgba(255, 255, 255, 0.08);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 9999px;
    
    --shadow-sm: 0 2px 4px 0 rgba(70, 80, 65, 0.04);
    --shadow-md: 0 4px 12px -2px rgba(70, 80, 65, 0.06), 0 2px 4px -1px rgba(70, 80, 65, 0.03);
    --shadow-lg: 0 12px 28px -6px rgba(45, 90, 68, 0.08), 0 8px 10px -6px rgba(45, 90, 68, 0.02);
    --shadow-glow: 0 10px 20px -5px rgba(41, 82, 62, 0.35);
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .font-serif {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

/* Layout Setup */
.wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

#content {
    width: 100%;
    padding: 30px 40px;
    min-height: 100vh;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: var(--bg-main);
}

/* Modern Pastel Green Sidebar Styling */
#sidebar {
    min-width: 270px;
    max-width: 270px;
    background: linear-gradient(180deg, #1b3328 0%, #244235 100%);
    color: #a3b18a;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    z-index: 1040;
    box-shadow: 4px 0 24px rgba(27, 51, 40, 0.15);
}

.sidebar-header {
    padding: 30px 24px 24px 24px;
    background: rgba(255, 255, 255, 0.03);
    text-align: left;
    border-bottom: 1px solid var(--border-color-dark);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none !important;
}

.sidebar-brand-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.25rem;
    box-shadow: var(--shadow-glow);
}

.sidebar-brand-text {
    font-size: 1.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #dad7cd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.user-profile-summary {
    margin-top: 18px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color-dark);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, #3a5a40 0%, #344e41 100%);
    color: #a3b18a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.user-info-text {
    overflow: hidden;
}

.user-name {
    color: #f5f0e6;
    font-weight: 600;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.role-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(163, 177, 138, 0.2);
    color: #a3b18a;
    border: 1px solid rgba(163, 177, 138, 0.3);
}

/* Sidebar Navigation Items */
.sidebar-menu {
    padding: 20px 16px;
    list-style: none;
    margin: 0;
    flex: 1;
}

.menu-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #588157;
    padding: 16px 12px 8px 12px;
}

.sidebar-menu li {
    margin-bottom: 6px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: #dad7cd;
    text-decoration: none !important;
    font-size: 0.92rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.sidebar-menu a i {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
    color: #a3b18a;
    transition: color 0.2s ease;
}

.sidebar-menu a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-menu a:hover i {
    color: #ffffff;
}

.sidebar-menu li.active a {
    color: #ffffff;
    background: var(--primary-gradient);
    font-weight: 600;
    box-shadow: var(--shadow-glow);
}

.sidebar-menu li.active a i {
    color: #ffffff;
}

.sidebar-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color-dark);
    font-size: 0.75rem;
    color: #a3b18a;
    text-align: center;
}

/* Modern Top Navbar */
.top-navbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 12px 0 24px 0;
    margin-bottom: 10px;
}

.user-dropdown-btn {
    background: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    padding: 8px 16px !important;
    border-radius: var(--radius-pill) !important;
    box-shadow: var(--shadow-sm) !important;
    color: var(--text-main) !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    transition: all 0.2s ease !important;
}

.user-dropdown-btn:hover {
    box-shadow: var(--shadow-md) !important;
    border-color: #d8cfc4 !important;
}

.dropdown-menu {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    background-color: #ffffff;
}

.dropdown-item {
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-main);
    transition: all 0.15s ease;
}

.dropdown-item:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

/* Modern Pastel Buttons */
.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary-gradient);
    color: #ffffff !important;
    padding: 10px 22px;
    font-weight: 600;
    font-size: 0.92rem;
    border-radius: var(--radius-md);
    border: none;
    box-shadow: var(--shadow-glow);
    text-decoration: none !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 24px -5px rgba(41, 82, 62, 0.45);
    color: #ffffff !important;
}

.btn-modern-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #ffffff;
    color: var(--text-main) !important;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    text-decoration: none !important;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-modern-outline:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Modern Cards */
.modern-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.modern-card:hover {
    box-shadow: var(--shadow-lg);
}

/* Modern Form Controls */
.form-control, .form-select {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: 0.92rem;
    color: var(--text-main);
    background-color: #ffffff;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(45, 90, 68, 0.15);
    outline: none;
}

.form-label {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-main);
    margin-bottom: 6px;
}

/* Modern Table */
.table-modern-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.table-modern {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.table-modern th {
    background-color: #f0ebe1;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
}

.table-modern td {
    padding: 16px 20px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 0.9rem;
}

.table-modern tbody tr:last-child td {
    border-bottom: none;
}

.table-modern tbody tr:hover {
    background-color: #fbf9f4;
}

/* Modern Badges */
.badge-modern {
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-diari { background: var(--diari-bg); color: var(--diari-primary); border: 1px solid rgba(42, 157, 143, 0.2); }
.badge-cerpen { background: var(--cerpen-bg); color: var(--cerpen-primary); border: 1px solid rgba(231, 111, 81, 0.2); }
.badge-novel { background: var(--novel-bg); color: var(--novel-primary); border: 1px solid rgba(58, 124, 165, 0.2); }
.badge-jurnal { background: var(--jurnal-bg); color: var(--jurnal-primary); border: 1px solid rgba(88, 129, 87, 0.2); }

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f5f0e6;
}

::-webkit-scrollbar-thumb {
    background: #d4a373;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #bc8a5f;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
