/* ===================================================
   Portal Busa 2 — Industrial Professional Theme (Light)
   =================================================== */

:root {
  /* Colors - Clean Industrial Palette */
  --bg-main:        #f1f5f9;
  --surface:        #ffffff;
  --primary:        #1e40af; /* More vibrant Royal Navy */
  --primary-dark:   #1e3a8a; /* Deep Navy */
  --primary-light:  #3b82f6;
  --accent:         #0284c7; 
  --accent-muted:   #bae6fd;
  
  --text-main:      #1e293b;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;

  --border-light:   #e2e8f0;
  --border-medium:  #cbd5e1;
  --border-heavy:   #475569;

  --radius-xs:      2px;
  --radius-sm:      4px; /* Industrial Sharpness */
  --radius-md:      8px;

  --shadow-sm:      0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md:      0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg:      0 10px 15px -3px rgba(0, 0, 0, 0.1);

  --transition:     all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #f8fafc;
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Premium Professional Background */
  background-image: 
    radial-gradient(circle at 2px 2px, #e2e8f0 1px, transparent 0),
    linear-gradient(180deg, rgba(248, 250, 252, 0.8) 0%, #f1f5f9 100%);
  background-size: 32px 32px, 100% 100%;
  background-attachment: fixed;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 600px;
  background: radial-gradient(circle at 50% -20%, rgba(99, 102, 241, 0.06), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 30px 20px;
}

/* ── Header ─────────────────────────────────────── */
.header {
  background: var(--surface);
  padding: 24px 32px;
  border: 1px solid var(--border-light);
  border-left: 6px solid var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.brand-text p {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.header-meta {
  text-align: right;
}

.header-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.header-date {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── Typography ─────────────────────────────────── */
.section-divider {
  height: 3px;
  background: var(--border-light);
  margin: 35px 0 25px 0;
  border-radius: 2px;
  width: 100%;
}


/* ── Buttons ────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-medium);
  background: var(--surface);
  color: var(--text-main);
  text-decoration: none;
}

.btn:hover {
  background: #f8fafc;
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

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

.btn-primary:hover {
  background: #1e293b;
  border-color: #1e293b;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.7rem;
}

/* ── Grid & Cards ───────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 24px;
  transition: var(--transition);
  position: relative;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
  background: var(--border-light);
  transition: background 0.3s;
}

.card:hover::before {
  background: var(--primary);
}

.card-icon {
  width: 44px;
  height: 44px;
  background: #f1f5f9;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  border: 1px solid var(--border-light);
}

.card-badge {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  min-height: 40px;
}

.card-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Manage Table ───────────────────────────────── */
.manage-panel {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.manage-header {
  background: var(--primary);
  padding: 16px 24px;
  border-bottom: 1px solid var(--primary);
  display: grid;
  grid-template-columns: 50px 1fr 120px 150px 150px;
  gap: 20px;
  font-size: 0.7rem;
  font-weight: 800;
  color: #ffffff; /* White text for visibility */
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.manage-row {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: grid;
  grid-template-columns: 50px 1fr 120px 150px 150px;
  gap: 20px;
  align-items: center;
  transition: var(--transition);
}

.manage-row:last-child { border-bottom: none; }

.manage-row:hover {
  background: #fdfdfd;
  box-shadow: inset 4px 0 0 var(--primary);
}

/* ── Modals ─────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(2px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius-sm);
  width: 90%;
  max-width: 500px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  border-top: 4px solid var(--primary);
}

/* ── Mobile ─────────────────────────────────────── */
@media (max-width: 768px) {
  .container { padding: 15px; }
  .header { flex-direction: column; text-align: center; gap: 24px; padding: 20px; }
  .header-brand { flex-direction: column; align-items: center; }
  .header-meta { align-items: center !important; text-align: center; }
  .header-time { font-size: 1.75rem !important; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .card { padding: 20px; }
  .manage-header { display: none; }
  .manage-row { grid-template-columns: 1fr; gap: 12px; }
  .btn { width: 100%; justify-content: center; }
}
