/* ----------------------------------------------------
   Gelis Beb v2 - Premium Stylesheet
   Design Language: Dark Mode Glassmorphism & High-Contrast Accents
   ---------------------------------------------------- */

:root {
    --bg-base: #0a0b10;
    --bg-surface: rgba(20, 22, 32, 0.65);
    --bg-surface-hover: rgba(30, 33, 48, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-focus: rgba(147, 51, 234, 0.5); /* Purple glow */
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-purple: #a855f7;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    
    --grad-primary: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
    --grad-cyan: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --grad-rose: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    
    --status-draft: #475569;
    --status-review: #d97706;
    --status-approved: #059669;
    --status-posted: #0284c7;
    --status-rejected: #dc2626;
    
    --shadow-glow: 0 0 20px rgba(168, 85, 247, 0.15);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

/* App Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: rgba(10, 11, 16, 0.9);
    border-right: 1px solid var(--border-color);
    backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    padding: 24px;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: var(--transition-smooth);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.brand-logo {
    width: 42px;
    height: 42px;
    background: var(--grad-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    color: white;
    box-shadow: var(--shadow-glow);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 1px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--accent-cyan);
    font-weight: 600;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.nav-item:hover {
    color: white;
    background: var(--bg-surface);
    border-color: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    color: white;
    background: var(--grad-primary);
    box-shadow: var(--shadow-glow);
}

.nav-item i {
    width: 20px;
    height: 20px;
}

.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent-cyan);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.user-role {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
    display: inline-block;
    width: fit-content;
}

.badge-role-admin {
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent-purple);
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.badge-role-humas {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.logout-form {
    width: 100%;
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.btn-logout:hover {
    background: #ef4444;
    color: white;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

/* Main Content area */
.main-content {
    flex-grow: 1;
    margin-left: 280px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.top-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-toggle-sidebar {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

.page-title {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.current-date {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.current-date i {
    width: 16px;
    height: 16px;
    color: var(--accent-cyan);
}

/* Alerts */
.alert-container {
    margin-bottom: 24px;
}

.alert {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-radius: 12px;
    font-weight: 500;
    margin-bottom: 12px;
    position: relative;
}

.alert-success {
    background: rgba(5, 150, 105, 0.1);
    border: 1px solid rgba(5, 150, 105, 0.3);
    color: #34d399;
}

.alert-danger {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #fca5a5;
}

.alert-close {
    position: absolute;
    right: 20px;
    background: none;
    border: none;
    color: inherit;
    font-size: 1.25rem;
    cursor: pointer;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-color-focus);
    box-shadow: var(--shadow-glow);
}

.stat-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
}

/* Panels */
.glass-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(15px);
    margin-bottom: 30px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.panel-title {
    font-size: 1.35rem;
    font-weight: 700;
}

/* Action Controls & Filters */
.controls-row {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input-wrapper {
    position: relative;
}

.search-input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 18px;
}

.form-control {
    background: rgba(10, 11, 16, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 16px;
    color: white;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-smooth);
}

.form-control-search {
    padding-left: 44px;
    min-width: 240px;
}

.form-control:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.25);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--grad-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-cyan {
    background: var(--grad-cyan);
    color: white;
}

.btn-cyan:hover {
    opacity: 0.9;
}

.btn-rose {
    background: var(--grad-rose);
    color: white;
}

.btn-rose:hover {
    opacity: 0.9;
}

/* Table Style */
.table-wrapper {
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.custom-table th {
    padding: 16px 20px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
}

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

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

.custom-table tr {
    transition: var(--transition-smooth);
}

.custom-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Status Badges */
.badge-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-block;
    text-transform: uppercase;
}

.badge-draft {
    background: rgba(71, 85, 105, 0.2);
    color: #94a3b8;
    border: 1px solid rgba(71, 85, 105, 0.4);
}

.badge-review {
    background: rgba(217, 119, 6, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(217, 119, 6, 0.4);
}

.badge-approved {
    background: rgba(5, 150, 105, 0.2);
    color: #34d399;
    border: 1px solid rgba(5, 150, 105, 0.4);
}

.badge-posted {
    background: rgba(2, 132, 199, 0.2);
    color: #38bdf8;
    border: 1px solid rgba(2, 132, 199, 0.4);
}

.badge-ditolak {
    background: rgba(220, 38, 38, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(220, 38, 38, 0.4);
}

.badge-metode {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
}

/* Pagination */
.pagination-wrapper {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

/* Form Styles */
.form-group {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
}

/* Tab Interface */
.tab-container {
    margin-bottom: 30px;
}

.tab-headers {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
    gap: 10px;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition-smooth);
}

.tab-btn:hover {
    color: white;
}

.tab-btn.active {
    color: var(--accent-purple);
    border-bottom-color: var(--accent-purple);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

/* Form Layouts */
.form-row-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

/* File Previews */
.preview-container {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.02);
    padding: 16px;
    border-radius: 12px;
    border: 1px dashed var(--border-color);
}

.image-preview {
    max-width: 120px;
    max-height: 120px;
    border-radius: 8px;
    object-fit: cover;
}

/* AI Generate Button with Glow */
.btn-ai-glow {
    position: relative;
    background: linear-gradient(135deg, #a855f7 0%, #06b6d4 100%);
    color: white;
    font-weight: 700;
    border: none;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.btn-ai-glow:hover {
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.5);
    transform: scale(1.02);
}

/* Custom File Upload Styling */
.custom-file-upload {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.custom-file-upload:hover {
    border-color: var(--accent-purple);
    background: rgba(168, 85, 247, 0.02);
}

.custom-file-upload i {
    width: 36px;
    height: 36px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

/* Review Actions */
.review-actions-bar {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    margin-top: 30px;
}

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

/* Responsive */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding: 24px;
    }
    .btn-toggle-sidebar {
        display: block;
    }
}
