/* ==========================================================================
   SIPSI CAFE - MODERN ADMIN DASHBOARD STYLESHEET
   ========================================================================== */

:root {
  --admin-bg: #0c0f14;
  --admin-sidebar: #12161f;
  --admin-panel: #161c26;
  --admin-panel-hover: #1c2330;
  --admin-border: #232c3d;
  --admin-border-focus: #d4af37;
  
  --admin-gold: #d4af37;
  --admin-gold-hover: #e8c458;
  --admin-gold-glow: rgba(212, 175, 55, 0.18);
  
  --admin-emerald: #10b981;
  --admin-rose: #f43f5e;
  --admin-blue: #3b82f6;

  --admin-text: #f8fafc;
  --admin-text-soft: #cbd5e1;
  --admin-text-muted: #8291a5;

  --admin-radius: 12px;
  --font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
  background-color: var(--admin-bg);
  color: var(--admin-text);
  font-family: var(--font-family);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

/* ==========================================================================
   TOPBAR & HEADER
   ========================================================================== */

.admin-header {
  background: var(--admin-sidebar);
  border-bottom: 1px solid var(--admin-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo span {
  font-size: 10px;
  color: var(--admin-gold);
  border: 1px solid var(--admin-gold);
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.15em;
  font-weight: 700;
}

.admin-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}

.admin-nav a {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--admin-text-soft);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.admin-nav a:hover, .admin-nav a.active {
  background: var(--admin-panel);
  color: var(--admin-gold);
}

.admin-main {
  padding: 36px 0 80px;
}

.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-heading small {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--admin-gold);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.page-heading h1 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
}

/* ==========================================================================
   STATS CARDS
   ========================================================================== */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat {
  background: var(--admin-panel);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.stat::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--admin-gold);
}

.stat small {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--admin-text-muted);
  text-transform: uppercase;
}

.stat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 800;
  color: #ffffff;
  margin-top: 6px;
}

/* ==========================================================================
   PANELS & FORMS
   ========================================================================== */

.panel {
  background: var(--admin-panel);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 26px;
  margin-bottom: 24px;
}

.panel h2 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel p {
  color: var(--admin-text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--admin-text-soft);
  margin-bottom: 16px;
}

input:not([type=checkbox]), textarea, select {
  display: block;
  width: 100%;
  margin-top: 6px;
  background: #0f131a;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  color: #ffffff;
  padding: 11px 14px;
  outline: none;
  transition: all 0.2s ease;
}

input::placeholder, textarea::placeholder {
  color: rgba(255, 255, 255, 0.2);
  font-family: inherit;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--admin-gold);
  box-shadow: 0 0 0 3px var(--admin-gold-glow);
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  margin: 12px 0 20px;
}

.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--admin-gold);
  cursor: pointer;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 8px;
  background: var(--admin-gold);
  border: 1px solid var(--admin-gold);
  color: #0c0f14;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.button:hover {
  background: var(--admin-gold-hover);
  transform: translateY(-1px);
}

.button.secondary {
  background: transparent;
  border-color: var(--admin-border);
  color: var(--admin-text-soft);
}

.button.secondary:hover {
  background: var(--admin-panel-hover);
  border-color: var(--admin-gold);
  color: var(--admin-gold);
}

.button.small {
  padding: 6px 12px;
  font-size: 12px;
}

.button.full {
  width: 100%;
}

.danger-link {
  background: none;
  border: 0;
  color: var(--admin-rose);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: opacity 0.2s ease;
}

.danger-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.link-button {
  background: none;
  border: 0;
  color: var(--admin-rose);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}

/* ==========================================================================
   ACCORDIONS & LISTS
   ========================================================================== */

.item {
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #111620;
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.item:hover {
  border-color: #2e3a4f;
}

.item summary {
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.item summary small {
  font-weight: 400;
  color: var(--admin-text-muted);
}

.item form {
  padding: 16px 18px 20px;
  border-top: 1px solid var(--admin-border);
  background: var(--admin-panel);
}

.thumb {
  width: 100px;
  height: 70px;
  border-radius: 6px;
  object-fit: cover;
  margin-bottom: 14px;
  border: 1px solid var(--admin-border);
}

/* ==========================================================================
   ALERTS
   ========================================================================== */

.alert {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.alert.error {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fb7185;
}

/* ==========================================================================
   FINANCE TABLE & CARDS
   ========================================================================== */

.finance-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.finance-summary div {
  background: var(--admin-panel);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 20px;
}

.finance-summary small {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--admin-text-muted);
  text-transform: uppercase;
}

.finance-summary strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  margin-top: 6px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th, .data-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--admin-border);
  font-size: 13px;
}

.data-table th {
  color: var(--admin-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.05em;
}

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

.table-wrap {
  overflow-x: auto;
}

/* ==========================================================================
   QR CODE CARD & PRINT
   ========================================================================== */

.qr-box {
  display: flex;
  align-items: center;
  gap: 30px;
  background: #111620;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 28px;
  flex-wrap: wrap;
}

.qr-box img {
  width: 180px;
  height: 180px;
  background: #ffffff;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   LOGIN CARD
   ========================================================================== */

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(circle at center, #171d29 0%, #0c0f14 100%);
}

.login-card {
  width: min(440px, 100%);
  background: var(--admin-panel);
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  padding: 40px 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.login-card h1 {
  font-family: var(--font-heading);
  font-size: 24px;
  margin: 16px 0 6px;
  color: #ffffff;
}

.login-card p {
  color: var(--admin-text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.back {
  display: block;
  text-align: center;
  margin-top: 24px;
  color: var(--admin-text-muted);
  font-size: 13px;
}

.back:hover {
  color: var(--admin-gold);
}
