/* ============================================================
   Circle96 — Shared Stylesheet v2.0
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --gold: #d4af37; --gold2: #b8860b; --gold-light: #f0d060;
  --navy: #0a0f1e; --navy2: #111827; --navy3: #1f2937; --navy4: #0d1526;
  --slate: #334155; --slate2: #475569;
  --text: #e2e8f0; --muted: #94a3b8; --dim: #64748b;
  --red: #f87171; --green: #4ade80; --yellow: #fbbf24; --blue: #60a5fa;
  --red-bg: rgba(248,113,113,0.1); --green-bg: rgba(74,222,128,0.1);
  --yellow-bg: rgba(251,191,36,0.1); --blue-bg: rgba(96,165,250,0.1);
  --radius: 14px; --radius-sm: 8px; --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.6);
  --transition: all 0.2s ease;
}

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

body {
  background: var(--navy);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  line-height: 1.6;
}

/* ── TYPOGRAPHY ─────────────────────────────────── */
.cinzel { font-family: 'Cinzel', serif; }
h1,h2,h3 { font-family: 'Cinzel', serif; }
.text-gold { color: var(--gold); }
.text-muted { color: var(--muted); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-yellow { color: var(--yellow); }

/* ── CARDS ──────────────────────────────────────── */
.card {
  background: var(--navy2);
  border: 1px solid var(--navy3);
  border-radius: var(--radius);
  padding: 24px;
}
.card:hover { border-color: var(--slate); }

/* ── BUTTONS ────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; font-family: 'Inter', sans-serif;
  cursor: pointer; border: none; transition: var(--transition);
  letter-spacing: 0.5px; text-decoration: none; white-space: nowrap;
}
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold2)); color: #0a0f1e; }
.btn-gold:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(212,175,55,0.3); }
.btn-outline { background: transparent; border: 1px solid var(--slate); color: var(--muted); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-danger { background: var(--red-bg); border: 1px solid rgba(248,113,113,0.3); color: var(--red); }
.btn-danger:hover { background: rgba(248,113,113,0.2); }
.btn-success { background: var(--green-bg); border: 1px solid rgba(74,222,128,0.3); color: var(--green); }
.btn-success:hover { background: rgba(74,222,128,0.2); }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-lg { padding: 15px 32px; font-size: 15px; letter-spacing: 2px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn-full { width: 100%; }

/* ── FORMS ──────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
label { display: block; font-size: 11px; font-weight: 600; letter-spacing: 1.5px; color: var(--muted); margin-bottom: 7px; text-transform: uppercase; }
input, select, textarea {
  width: 100%; padding: 12px 16px;
  background: var(--navy4); border: 1px solid var(--slate);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 14px; font-family: 'Inter', sans-serif;
  transition: var(--transition);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.1);
}
input::placeholder, textarea::placeholder { color: var(--dim); }
select option { background: var(--navy2); }
textarea { resize: vertical; min-height: 100px; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ── ALERTS ─────────────────────────────────────── */
.alert { padding: 13px 16px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; display: none; }
.alert.show { display: flex; align-items: center; gap: 10px; }
.alert-success { background: var(--green-bg); border: 1px solid rgba(74,222,128,0.3); color: var(--green); }
.alert-error { background: var(--red-bg); border: 1px solid rgba(248,113,113,0.3); color: var(--red); }
.alert-warning { background: var(--yellow-bg); border: 1px solid rgba(251,191,36,0.3); color: var(--yellow); }
.alert-info { background: var(--blue-bg); border: 1px solid rgba(96,165,250,0.3); color: var(--blue); }

/* ── BADGES ─────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.badge-green { background: var(--green-bg); color: var(--green); border: 1px solid rgba(74,222,128,0.2); }
.badge-red { background: var(--red-bg); color: var(--red); border: 1px solid rgba(248,113,113,0.2); }
.badge-yellow { background: var(--yellow-bg); color: var(--yellow); border: 1px solid rgba(251,191,36,0.2); }
.badge-blue { background: var(--blue-bg); color: var(--blue); border: 1px solid rgba(96,165,250,0.2); }
.badge-gold { background: rgba(212,175,55,0.1); color: var(--gold); border: 1px solid rgba(212,175,55,0.2); }

/* ── TABLES ─────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 11px 13px; font-size: 10px; font-weight: 700; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; border-bottom: 1px solid var(--navy3); text-align: left; white-space: nowrap; }
td { padding: 12px 13px; border-bottom: 1px solid rgba(31,41,55,0.4); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(31,41,55,0.3); }
.td-mono { font-family: monospace; color: var(--gold); font-size: 13px; }

/* ── STAT CARDS ─────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card { background: var(--navy2); border: 1px solid var(--navy3); border-radius: var(--radius); padding: 22px; transition: var(--transition); }
.stat-card:hover { border-color: var(--slate); transform: translateY(-2px); }
.stat-label { font-size: 10px; font-weight: 700; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; margin-bottom: 12px; }
.stat-value { font-size: 26px; font-weight: 700; margin-bottom: 4px; }
.stat-sub { font-size: 12px; color: var(--muted); }

/* ── MODAL ──────────────────────────────────────── */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 300; display: none; align-items: flex-start; justify-content: center; padding: 40px 20px; overflow-y: auto; backdrop-filter: blur(4px); }
.modal-bg.open { display: flex; }
.modal { background: var(--navy2); border: 1px solid var(--navy3); border-radius: var(--radius-lg); padding: 30px; max-width: 580px; width: 100%; position: relative; box-shadow: var(--shadow-lg); }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; color: var(--muted); font-size: 18px; cursor: pointer; width: 30px; height: 30px; border-radius: 6px; display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.modal-close:hover { background: var(--navy3); color: var(--text); }
.modal h3 { font-family: 'Cinzel', serif; color: var(--gold); margin-bottom: 22px; padding-right: 36px; font-size: 17px; }

/* ── SPINNER ────────────────────────────────────── */
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(212,175,55,0.2); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.7s linear infinite; }
.spinner-sm { width: 14px; height: 14px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── LOADING SCREEN ─────────────────────────────── */
.loading-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 300px; gap: 16px; color: var(--muted); }
.loading-screen .spinner { width: 40px; height: 40px; border-width: 3px; }

/* ── POWERED BY ─────────────────────────────────── */
.powered-by { position: fixed; bottom: 14px; right: 18px; display: flex; align-items: center; gap: 7px; opacity: 0.5; transition: var(--transition); z-index: 100; text-decoration: none; }
.powered-by:hover { opacity: 1; }
.powered-by span { font-size: 11px; color: var(--muted); letter-spacing: 0.5px; }
.powered-by img { height: 26px; width: auto; filter: drop-shadow(0 0 6px rgba(255,255,255,0.7)); animation: techzar-glow 2.5s ease-in-out infinite; }
@keyframes techzar-glow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(255,255,255,0.5)); }
  50% { filter: drop-shadow(0 0 12px rgba(255,255,255,0.95)) drop-shadow(0 0 20px rgba(212,175,55,0.4)); }
}

/* ── SECTION ────────────────────────────────────── */
.section { background: var(--navy2); border: 1px solid var(--navy3); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.section-title { font-family: 'Cinzel', serif; font-size: 14px; color: var(--gold); display: flex; align-items: center; gap: 8px; }

/* ── TABS ───────────────────────────────────────── */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--navy3); margin-bottom: 24px; overflow-x: auto; }
.tab { padding: 13px 18px; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; transition: var(--transition); }
.tab:hover { color: var(--text); }
.tab.active { color: var(--gold); border-bottom-color: var(--gold); }

/* ── PROGRESS BAR ───────────────────────────────── */
.progress-bar { background: var(--navy3); border-radius: 999px; height: 8px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-light)); border-radius: 999px; transition: width 0.5s ease; }

/* ── NOTIFICATION ITEM ──────────────────────────── */
.notif-item { padding: 14px; border-radius: var(--radius-sm); margin-bottom: 8px; border-left: 3px solid var(--slate); background: rgba(31,41,55,0.3); }
.notif-item.payment { border-color: var(--green); }
.notif-item.warning { border-color: var(--yellow); }
.notif-item.info, .notif-item.system { border-color: var(--gold); }
.notif-item.birthday { border-color: #f472b6; }
.notif-title { font-weight: 600; font-size: 14px; margin-bottom: 3px; }
.notif-msg { font-size: 13px; color: var(--muted); }
.notif-time { font-size: 11px; color: var(--dim); margin-top: 4px; }

/* ── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 768px) {
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .hide-mobile { display: none !important; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .section { padding: 16px; }
}
