/* * YOUI FRAMEWORK v2.1 (Complete Edition)
 * Author: Yoga Nugroho (YoBase)
 * License: MIT
 */

:root {
  /* --- THEME VARIABLES --- */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --secondary: #64748b;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #0ea5e9;
  --light: #f1f5f9;
  --dark: #0f172a;

  /* --- UI VARIABLES --- */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  
  --radius: 0.5rem;
  --radius-sm: 0.25rem;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

/* DARK MODE */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-body: #0f172a;
    --bg-surface: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --light: #1e293b;
    --dark: #f8fafc;
  }
}

/* --- RESET --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-sans); background: var(--bg-body); color: var(--text-main); line-height: 1.6; }
a { color: var(--primary); text-decoration: none; transition: 0.2s; }
a:hover { text-decoration: underline; }

/* --- GRID SYSTEM --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.container-fluid { width: 100%; padding: 0 1rem; }
.row { display: flex; flex-wrap: wrap; margin: 0 -0.75rem; }
[class^="col-"] { padding: 0 0.75rem; width: 100%; }

.col-12 { width: 100%; }
@media (min-width: 768px) {
  .col-md-3 { width: 25%; }
  .col-md-4 { width: 33.333%; }
  .col-md-6 { width: 50%; }
  .col-md-8 { width: 66.666%; }
  .col-md-12 { width: 100%; }
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.6rem 1.25rem; border-radius: var(--radius); border: 1px solid transparent;
  font-weight: 600; cursor: pointer; transition: 0.2s; font-size: 0.95rem;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); color: white; }
.btn-secondary { background: white; border-color: var(--border-color); color: var(--text-main); }
.btn-secondary:hover { background: var(--light); }
.btn-danger { background: var(--danger); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-sm { padding: 0.25rem 0.75rem; font-size: 0.8rem; }

/* --- ALERTS --- */
.alert { padding: 1rem; border-radius: var(--radius); margin-bottom: 1rem; border: 1px solid transparent; position: relative; }
.alert-info { background: #e0f2fe; color: #075985; border-color: #bae6fd; }
.alert-success { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.alert-danger { background: #fee2e2; color: #991b1b; border-color: #fecaca; }

/* --- CARDS --- */
.card {
  background: var(--bg-surface); border: 1px solid var(--border-color);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.card-header, .card-footer { padding: 1rem 1.5rem; background: rgba(0,0,0,0.02); border-bottom: 1px solid var(--border-color); font-weight: 600; }
.card-footer { border-bottom: none; border-top: 1px solid var(--border-color); }
.card-body { padding: 1.5rem; }

/* --- FORMS --- */
.form-label { display: block; margin-bottom: 0.5rem; font-size: 0.9rem; font-weight: 500; }
.form-control {
  width: 100%; padding: 0.6rem 1rem; border: 1px solid var(--border-color);
  border-radius: var(--radius); background: var(--bg-surface); color: var(--text-main);
  transition: 0.2s;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15); }

/* --- MODAL (POPUP) --- */
.modal {
  display: none; position: fixed; z-index: 1000; left: 0; top: 0;
  width: 100%; height: 100%; background-color: rgba(0,0,0,0.5);
  align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s;
}
.modal.show { display: flex; opacity: 1; }
.modal-content {
  background: var(--bg-surface); padding: 0; border-radius: var(--radius);
  width: 100%; max-width: 500px; box-shadow: var(--shadow);
  transform: translateY(-20px); transition: transform 0.3s;
}
.modal.show .modal-content { transform: translateY(0); }
.modal-header, .modal-footer { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; }
.modal-footer { border-bottom: none; border-top: 1px solid var(--border-color); justify-content: flex-end; gap: 0.5rem; }
.modal-body { padding: 1.5rem; }

/* --- TABLES --- */
.table-responsive { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; text-align: left; }
.table th, .table td { padding: 0.75rem; border-bottom: 1px solid var(--border-color); }
.table th { background: rgba(0,0,0,0.02); font-weight: 600; }
.table tr:hover { background: rgba(0,0,0,0.01); }

/* --- BADGES --- */
.badge { display: inline-block; padding: 0.25em 0.6em; font-size: 0.75em; font-weight: 700; border-radius: var(--radius-full); color: white; line-height: 1; }
.bg-primary { background: var(--primary); }
.bg-success { background: var(--success); }
.bg-danger { background: var(--danger); }
.bg-warning { background: var(--warning); color: black; }

/* --- UTILITIES & HELPERS --- */
.d-flex { display: flex !important; }
.align-items-center { align-items: center !important; }
.justify-content-between { justify-content: space-between !important; }
.text-center { text-align: center; }
.mt-2 { margin-top: 0.5rem; } .mb-2 { margin-bottom: 0.5rem; }
.mt-3 { margin-top: 1rem; } .mb-3 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1.5rem; } .mb-4 { margin-bottom: 1.5rem; }
.w-100 { width: 100%; }

/* --- NAVBAR --- */
.navbar { background: var(--bg-surface); padding: 1rem 0; border-bottom: 1px solid var(--border-color); }
.navbar-brand { font-size: 1.25rem; font-weight: 800; color: var(--primary); }

/* --- SPINNER --- */
.spinner { border: 3px solid rgba(0,0,0,0.1); border-left-color: var(--primary); border-radius: 50%; width: 24px; height: 24px; animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
         
