/* ============================================================
   MLAJU Admin Panel - Styles
   ============================================================ */

:root {
  --bg: #050505;
  --bg-card: #0d0d0d;
  --bg-card-hover: #141414;
  --bg-input: #1a1a1a;
  --bg-sidebar: #0a0a0a;
  --primary: #89ff00;
  --primary-dark: #6acc00;
  --accent-sport: #FF6B35;
  --accent-energy: #FFD60A;
  --text: #fff;
  --text-secondary: rgba(255,255,255,.5);
  --text-muted: rgba(255,255,255,.3);
  --border: rgba(255,255,255,.1);
  --success: #89ff00;
  --error: #ff4444;
  --warning: #ffaa00;
  --info: #00aaff;
  --sidebar-w: 240px;
  --radius: 8px;
  --radius-lg: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Poppins', sans-serif; background: var(--bg); color: var(--text); font-size: 14px; overflow: hidden; height: 100vh; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 3px; }
a { color: var(--primary); text-decoration: none; }

input, select, textarea { font-family: 'Poppins', sans-serif; font-size: 14px; color: var(--text); background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; outline: none; width: 100%; transition: border .2s; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); }
textarea { resize: vertical; min-height: 80px; }
select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M12 16l-6-6h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
button { font-family: 'Poppins', sans-serif; cursor: pointer; border: none; outline: none; transition: all .2s; }
.font-heading { font-family: 'Bebas Neue', sans-serif; letter-spacing: 2px; }

/* LOGIN */
#login-screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--bg); z-index: 9999; }
.login-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 48px 40px; width: 380px; text-align: center; }
.login-logo { font-family: 'Bebas Neue', sans-serif; font-size: 48px; color: var(--primary); letter-spacing: 6px; line-height: 1; }
.login-sub { font-size: 12px; color: var(--text-muted); letter-spacing: 4px; margin-bottom: 36px; font-family: 'Bebas Neue', sans-serif; }
.login-error { color: var(--error); font-size: 12px; margin-top: 12px; display: none; }
.btn-google { display: inline-flex; align-items: center; justify-content: center; width: 100%; padding: 12px 24px; background: #fff; color: #333; font-weight: 500; font-size: 14px; border-radius: var(--radius); cursor: pointer; border: none; transition: all .2s; }
.btn-google:hover { background: #f0f0f0; }
.btn-google:disabled { opacity: .6; cursor: not-allowed; }

/* LAYOUT */
#app { display: none; height: 100vh; overflow: hidden; }
.sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w); background: var(--bg-sidebar); border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 100; }
.sidebar-logo { padding: 24px 20px; border-bottom: 1px solid var(--border); }
.sidebar-logo h1 { font-family: 'Bebas Neue', sans-serif; font-size: 28px; color: var(--primary); letter-spacing: 4px; line-height: 1; }
.sidebar-logo span { font-size: 10px; color: var(--text-muted); letter-spacing: 3px; font-family: 'Bebas Neue', sans-serif; }
.sidebar-nav { flex: 1; padding: 16px 0; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; color: var(--text-secondary); cursor: pointer; transition: all .2s; font-size: 13px; border-left: 3px solid transparent; }
.nav-item:hover { color: var(--text); background: rgba(255,255,255,.03); }
.nav-item.active { color: var(--primary); border-left-color: var(--primary); background: rgba(137,255,0,.05); }
.nav-item i { font-size: 18px; width: 22px; text-align: center; }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid var(--border); }
.btn-logout { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 13px; background: none; padding: 8px 0; }
.btn-logout:hover { color: var(--error); }

.main { margin-left: var(--sidebar-w); width: calc(100% - var(--sidebar-w)); height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.header { padding: 20px 32px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; background: var(--bg); }
.header-title { font-family: 'Bebas Neue', sans-serif; font-size: 24px; letter-spacing: 3px; }
.header-user { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 12px; }
.content { flex: 1; overflow-y: auto; padding: 24px 32px 48px; }

/* BUTTONS */
.btn-primary { background: var(--primary); color: var(--bg); font-weight: 600; padding: 10px 24px; border-radius: var(--radius); font-size: 14px; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); padding: 10px 24px; border-radius: var(--radius); font-size: 14px; }
.btn-secondary:hover { color: var(--text); border-color: var(--text-secondary); }
.btn-danger { background: transparent; color: var(--error); border: 1px solid var(--error); padding: 6px 14px; border-radius: var(--radius); font-size: 12px; }
.btn-danger:hover { background: var(--error); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-icon { background: transparent; color: var(--text-secondary); padding: 6px; border-radius: var(--radius); font-size: 18px; }
.btn-icon:hover { color: var(--text); background: rgba(255,255,255,.05); }

/* STAT CARDS */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; transition: all .2s; }
.stat-card:hover { border-color: rgba(255,255,255,.2); background: var(--bg-card-hover); }
.stat-card .stat-icon { font-size: 20px; margin-bottom: 12px; opacity: .6; }
.stat-card .stat-value { font-family: 'Bebas Neue', sans-serif; font-size: 36px; letter-spacing: 2px; line-height: 1; }
.stat-card .stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.stat-card.green .stat-icon, .stat-card.green .stat-value { color: var(--primary); }
.stat-card.orange .stat-icon, .stat-card.orange .stat-value { color: var(--accent-sport); }
.stat-card.yellow .stat-icon, .stat-card.yellow .stat-value { color: var(--accent-energy); }
.stat-card.blue .stat-icon, .stat-card.blue .stat-value { color: var(--info); }
.stat-card.white .stat-icon, .stat-card.white .stat-value { color: var(--text); }

/* TABLE */
.table-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.search-box { position: relative; width: 300px; }
.search-box input { padding-left: 36px; }
.search-box i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 16px; }
table { width: 100%; border-collapse: collapse; }
thead th { text-align: left; padding: 12px 16px; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--border); cursor: pointer; white-space: nowrap; user-select: none; background: var(--bg-card); position: sticky; top: 0; z-index: 2; }
thead th:hover { color: var(--text-secondary); }
tbody tr { border-bottom: 1px solid var(--border); transition: background .15s; }
tbody tr:hover { background: var(--bg-card-hover); }
tbody td { padding: 12px 16px; font-size: 13px; vertical-align: middle; }
.table-wrap { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.table-scroll { overflow-x: auto; max-height: calc(100vh - 300px); overflow-y: auto; }

/* BADGES */
.badge { display: inline-block; padding: 3px 10px; border-radius: 50px; font-size: 11px; font-weight: 500; letter-spacing: .5px; }
.badge-article { border: 1px solid var(--primary); color: var(--primary); }
.badge-news { border: 1px solid var(--accent-sport); color: var(--accent-sport); }
.badge-event { border: 1px solid var(--accent-energy); color: var(--accent-energy); }
.badge-published { background: var(--primary); color: var(--bg); font-weight: 600; }
.badge-draft { border: 1px solid var(--text-muted); color: var(--text-muted); }

/* MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 1000; opacity: 0; visibility: hidden; transition: all .2s; }
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); width: 90%; max-width: 720px; max-height: 90vh; overflow-y: auto; transform: translateY(20px); transition: transform .2s; }
.modal-overlay.show .modal { transform: translateY(0); }
.modal-lg { max-width: 900px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg-card); z-index: 1; }
.modal-header h3 { font-family: 'Bebas Neue', sans-serif; font-size: 22px; letter-spacing: 2px; }
.modal-body { padding: 24px; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--border); }

/* FORM */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 1px; font-weight: 500; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group.error input, .form-group.error select, .form-group.error textarea { border-color: var(--error); }
.form-error { color: var(--error); font-size: 11px; margin-top: 4px; }
.img-preview { width: 100%; max-height: 200px; object-fit: cover; border-radius: var(--radius); margin-top: 8px; border: 1px solid var(--border); }
.img-preview-sm { width: 48px; height: 48px; object-fit: cover; border-radius: var(--radius); }

/* ACTIVITY DETAIL */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.detail-item .detail-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.detail-item .detail-value { font-family: 'Bebas Neue', sans-serif; font-size: 28px; letter-spacing: 1px; margin-top: 2px; }
.route-map { width: 100%; height: 300px; border-radius: var(--radius); border: 1px solid var(--border); background: #1a1a1a; }
.detail-photo { width: 100%; max-height: 300px; object-fit: cover; border-radius: var(--radius); margin-top: 12px; }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state i { font-size: 48px; margin-bottom: 16px; display: block; }
.empty-state p { font-size: 13px; }

/* TOAST */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 12px 20px; border-radius: var(--radius); font-size: 13px; border-left: 4px solid; background: var(--bg-card); border-color: var(--primary); animation: slideIn .3s ease; }
.toast.error { border-color: var(--error); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* LOADING */
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-center { display: flex; align-items: center; justify-content: center; padding: 60px; gap: 12px; color: var(--text-secondary); }

/* RECENT LIST */
.recent-section { margin-bottom: 32px; }
.recent-section h3 { font-family: 'Bebas Neue', sans-serif; font-size: 18px; letter-spacing: 2px; color: var(--text-secondary); margin-bottom: 12px; }
.recent-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); transition: background .15s; }
.recent-item:hover { background: var(--bg-card-hover); }
.recent-item:last-child { border-bottom: none; }
.recent-item .ri-title { font-size: 13px; font-weight: 500; }
.recent-item .ri-meta { font-size: 11px; color: var(--text-muted); }
.recent-list { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
