:root {
    --bg: #000000;
    --stroke: rgba(255, 255, 255, .08);
    --text: #e8eefc;
    --muted: #edcf09;
    --accent: #ead40f;
    --accent2: #f0ff4f;
    --danger: #ef4444;
    --shadow: 0 14px 40px rgba(0, 0, 0, .35);
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: radial-gradient(1200px 700px at 20% -10%, rgba(254, 238, 8, 0.22), transparent 60%), radial-gradient(900px 600px at 90% 10%, rgba(238, 226, 5, 0.18), transparent 55%), var(--bg);
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text);
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.nav {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--stroke);
}

.nav-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: .2px;
}

.badge {
    font-size: 12px;
    color: var(--muted);
    border: 1px solid var(--stroke);
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .03);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 22px 18px 40px;
}

.panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
}

.h1 {
    font-size: 22px;
    margin: 0 0 10px;
}

.h2 {
    font-size: 16px;
    color: var(--muted);
    margin: 0 0 16px;
}

.flash {
    margin: 0 0 14px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(90, 162, 255, .12);
    border: 1px solid rgba(90, 162, 255, .22);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, .04);
    color: var(--text);
    cursor: pointer;
    font-weight: 600;
}

.btn:hover {
    background: rgba(255, 255, 255, .07);
}

.btn.primary {
    background: linear-gradient(180deg, rgba(244, 210, 17, 0.95), rgba(239, 186, 9, .72));
    border-color: rgba(239, 186, 9, 0.45);
    color: #081427;
}

.btn.success {
    background: linear-gradient(180deg, rgba(34, 197, 94, .92), rgba(34, 197, 94, .70));
    border-color: rgba(34, 197, 94, .45);
    color: #052013;
}

.btn.danger {
    background: rgba(239, 68, 68, .14);
    border-color: rgba(239, 68, 68, .35);
    color: #ffd5d5;
}

.form {
    display: grid;
    gap: 10px;
    max-width: 520px;
}

.input {
    font-size: 16px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, .03);
    color: var(--text);
    outline: none;
}

.input:focus {
    border-color: rgba(90, 162, 255, .55);
    box-shadow: 0 0 0 4px rgba(90, 162, 255, .12);
}

.table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid var(--stroke);
    background: rgba(0, 0, 0, 0.55);
}

.table th,
.table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--stroke);
    text-align: left;
    vertical-align: top;
}

.table th {
    color: var(--muted);
    font-weight: 650;
    background: rgba(255, 255, 255, .03);
}

.table tr:hover td {
    background: rgba(255, 255, 255, .03);
}

.small {
    font-size: 12px;
    color: var(--muted);
}

.row-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.table-wrap{
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
}

.nowrap {
    white-space: nowrap;
}

.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 14px;
}

.card {
    grid-column: span 4;
    background: rgba(0, 0, 0, 0.72);
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    padding: 14px;
}

.card .label {
    color: var(--muted);
    font-size: 12px;
}

.card .value {
    font-size: 18px;
    font-weight: 700;
    margin-top: 6px;
}

@media (max-width:900px) {
    .card {
        grid-column: span 6;
    }
}

@media (max-width:560px) {
    .card {
        grid-column: span 12;
    }
}

/* --- Mobile nav (hamburger + dropdown) --- */

/* Make nav the positioning parent for the absolute dropdown */
.nav{
  position: relative;
}

/* Desktop links row */
.nav-desktop{
  display:flex;
  gap:10px;
  align-items:center;
}

/* Hamburger button (hidden on desktop) */
.hamburger{
  display:none;
  width:42px;
  height:42px;
  border-radius:12px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-size: 18px;
  cursor:pointer;
}

/* Mobile dropdown menu (anchored to LEFT edge of navbar) */
.nav-mobile-menu{
  display:none;

  position:absolute;
  left:0;              /* ✅ force left */
  top:100%;            /* directly under navbar */
  width:100%;

  padding: 12px 18px 16px;

  background: rgba(0,0,0,.80);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--stroke);

  text-align:left;
  z-index: 9999;
}

/* When open, show stacked links */
.nav-mobile-menu.open{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
}

/* Make dropdown buttons full width and left-aligned */
.nav-mobile-menu .btn{
  width:100%;
  justify-content:flex-start;
}

/* Small screens: hide desktop links, show hamburger */
@media (max-width: 760px){
  .nav-desktop{ display:none; }
  .hamburger{
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }
  .nav-user{ display:none; } /* optional: hide username to save space */
}