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

:root {
    --bg-primary: #0b0f19;
    --bg-secondary: #131b2e;
    --bg-tertiary: #1e2942;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-indigo: #6366f1;
    --accent-purple: #a855f7;
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #0ea5e9;
    --neutral: #64748b;
    
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-bg: rgba(19, 27, 46, 0.7);
    --glass-border: rgba(255, 255, 255, 0.06);
    
    --font-sans: 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    overflow-x: auto;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-brand {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--glass-border);
}

.sidebar-brand-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-cyan));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.sidebar-brand-text {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

.sidebar-brand-sub {
    font-size: 10px;
    color: var(--accent-cyan);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-menu {
    list-style: none;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow-y: auto;
}

.sidebar-menu-item a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    color: var(--text-secondary);
    border-radius: 12px;
    font-weight: 500;
}

.sidebar-menu-item a i {
    font-size: 18px;
    width: 24px;
    text-align: center;
    transition: var(--transition);
}

.sidebar-menu-item.active a,
.sidebar-menu-item a:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.15);
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.2);
}

.sidebar-menu-item.active a i {
    color: var(--accent-cyan);
    transform: scale(1.15);
}

.sidebar-user {
    padding: 20px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0,0,0,0.1);
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
}

.sidebar-user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-user-role {
    font-size: 11px;
    color: var(--accent-cyan);
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 2px;
}

.btn-logout {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition);
}

.btn-logout:hover {
    color: var(--danger);
    transform: scale(1.1);
}

/* Main Content Area */
.main-wrapper {
    margin-left: 280px;
    flex: 1;
    min-width: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 30px;
}

/* Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-title h1 {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(to right, #ffffff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-title p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

/* Cards & Glassmorphism */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.glass-card:hover {
    border-color: rgba(255,255,255,0.12);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
    transform: translateY(-2px);
}

/* Dashboard Summary Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-info h3 {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-info p {
    font-size: 32px;
    font-weight: 800;
    margin-top: 8px;
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.blue { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.stat-icon.cyan { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }
.stat-icon.warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.stat-icon.danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.stat-icon.success { background: rgba(16, 185, 129, 0.15); color: var(--success); }

/* Charts Area */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 30px;
}

@media (max-width: 1200px) {
    .sidebar {
        width: 80px;
    }
    .sidebar-brand {
        justify-content: center !important;
        padding: 20px 10px !important;
    }
    .sidebar-brand-text, .sidebar-brand-sub, .sidebar-user-info {
        display: none !important;
    }
    .sidebar-menu-item a {
        justify-content: center !important;
        padding: 12px 0 !important;
        gap: 0 !important;
    }
    .sidebar-menu-item a span {
        display: none !important;
    }
    .sidebar-user {
        flex-direction: column !important;
        gap: 10px !important;
        padding: 12px 5px !important;
        margin: 0 8px !important;
    }
    .sidebar-user > div {
        flex-direction: column !important;
        gap: 12px !important;
    }
    .main-wrapper {
        margin-left: 80px;
    }
}

@media (max-width: 992px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .top-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .top-header > div {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }
    .main-wrapper {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .sidebar {
        width: 60px;
    }
    .sidebar-brand {
        padding: 15px 5px !important;
    }
    .sidebar-user {
        margin: 0 4px !important;
        padding: 8px 2px !important;
    }
    .main-wrapper {
        margin-left: 60px;
        padding: 12px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Badges for Status */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    gap: 6px;
}

.badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
}

.badge-open {
    background-color: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
}
.badge-progress {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}
.badge-resolved {
    background-color: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}
.badge-verified {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--success);
}
.badge-closed {
    background-color: rgba(100, 116, 139, 0.15);
    color: var(--neutral);
}
.badge-dikembalikan {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

/* Tables styling */
.table-wrapper {
    overflow-x: auto;
    margin-top: 15px;
}

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

.custom-table th {
    padding: 16px;
    border-bottom: 2px solid var(--glass-border);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.custom-table td {
    padding: 16px;
    border-bottom: 1px solid var(--glass-border);
    font-size: 14px;
    vertical-align: middle;
}

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

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

/* Buttons styling */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-blue));
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    opacity: 0.9;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

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

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

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

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

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

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-indigo);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Login Page Specfic Styles */
.login-body {
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-image: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
                      radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.15) 0%, transparent 40%);
}

.login-card {
    width: 100%;
    max-width: 440px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    display: inline-flex;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-cyan));
    border-radius: 16px;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.5);
}

.login-header h2 {
    font-size: 24px;
    font-weight: 700;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 6px;
}

/* Detail UI & Timelines */
.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    aspect-ratio: 4/3;
    background-color: rgba(0,0,0,0.3);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
    list-style: none;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 5px;
    width: 2px;
    height: calc(100% - 10px);
    background: var(--bg-tertiary);
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -30px;
    top: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 3px solid var(--accent-indigo);
    z-index: 1;
}

.timeline-dot.success { border-color: var(--success); }
.timeline-dot.warning { border-color: var(--warning); }
.timeline-dot.danger { border-color: var(--danger); }
.timeline-dot.info { border-color: var(--info); }

.timeline-content {
    display: flex;
    flex-direction: column;
}

.timeline-time {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.timeline-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 2px;
}

.timeline-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.timeline-actor {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-top: 2px;
}

/* General Layout helpers */
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }

.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }

.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }

.alert {
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: #a7f3d0;
}
