/* ===== Global Layout ===== */
*{
  box-sizing:border-box;
}

body{
  margin:0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:
    radial-gradient(circle at top, #fff8d6 0, #f5d46b 35%, transparent 60%),
    radial-gradient(circle at bottom, #2c1a4a 0, #130b26 55%);
  color:#1f1b2e;
}

/* ===== Common Card / Panel ===== */
.card,
.panel{
  position:relative;
  max-width:1100px;
  width:100%;
  background:rgba(255,255,255,0.98);
  border-radius:22px;
  padding:26px 26px 24px;
  box-shadow:
    0 22px 45px rgba(0,0,0,0.35),
    0 0 0 1px rgba(255,255,255,0.2);
  overflow:hidden;
}

/* Golden border glow */
.card::before,
.panel::before{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius:24px;
  background:conic-gradient(from 140deg, #ffecb3, #ffb300, #ffecb3, #ffd54f, #ffecb3);
  opacity:0.65;
  z-index:-1;
}

/* Inner mask for 3D frame effect */
.card::after,
.panel::after{
  content:"";
  position:absolute;
  inset:2px;
  border-radius:20px;
  background:linear-gradient(145deg, #ffffff, #f8f3e8);
  z-index:-1;
}

/* ===== Headings ===== */
h1,h2,h3{
  margin:0 0 12px;
  color:#4a3210;
  letter-spacing:0.03em;
}

h1{
  font-size:1.8rem;
  text-transform:uppercase;
}

h2{
  font-size:1.5rem;
}

/* ===== Header (panel top bar) ===== */
header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:18px;
  padding-bottom:10px;
  border-bottom:1px solid rgba(220,180,90,0.5);
}

header h1{
  display:flex;
  align-items:center;
  gap:8px;
}

header h1::before{
  content:"★";
  font-size:1.2rem;
  color:#ffb300;
  text-shadow:0 0 8px rgba(255,215,0,0.7);
}

.right{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:0.9rem;
  color:#5a4b2b;
}

/* ===== Buttons ===== */
button,
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 20px;
  border-radius:999px;
  border:none;
  outline:none;
  font-weight:600;
  cursor:pointer;
  text-decoration:none;
  font-size:0.95rem;
  background:
    linear-gradient(135deg,#ffe082,#ffca28);
  box-shadow:
    0 8px 18px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.9);
  color:#4a2c00;
  transition:transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

button:hover,
.btn:hover{
  transform:translateY(-2px);
  box-shadow:
    0 14px 26px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.95);
  background:
    linear-gradient(135deg,#ffecb3,#ffc107);
}

button:active,
.btn:active{
  transform:translateY(1px);
  box-shadow:
    0 5px 10px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.8);
}

/* ===== Forms ===== */
input[type="text"],
input[type="password"],
input[type="date"],
input[type="email"],
input[type="number"],
input[type="file"]{
  width:100%;
  padding:9px 11px;
  margin-top:4px;
  border-radius:10px;
  border:1px solid rgba(180,150,80,0.6);
  background:#fdf8ec;
  outline:none;
  font-size:0.95rem;
  transition:border 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input[type="file"]{
  padding:6px 4px;
  background:#fffdf5;
}

input:focus{
  border-color:#ffb300;
  box-shadow:0 0 0 2px rgba(255,193,7,0.6);
  background:#fffef7;
}

label{
  font-size:0.9rem;
  font-weight:600;
  color:#5b4520;
}

/* ===== Upload / List Layout ===== */
.upload{
  margin-bottom:20px;
  padding:14px 14px 16px;
  border-radius:16px;
  background:linear-gradient(145deg,#fffaf0,#ffeec2);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.7);
}

.list{
  margin-top:10px;
}

/* ===== Messages ===== */
.msg{
  margin:6px 0 12px;
  padding:8px 12px;
  border-radius:8px;
  background:#e8f5e9;
  color:#256029;
  font-size:0.9rem;
  border:1px solid #a5d6a7;
}

.error{
  margin:6px 0 12px;
  padding:8px 12px;
  border-radius:8px;
  background:#ffebee;
  color:#c62828;
  font-size:0.9rem;
  border:1px solid #ef9a9a;
}

/* ===== Tables ===== */
table{
  width:100%;
  border-collapse:collapse;
  font-size:0.9rem;
  background:#fffdf7;
  border-radius:14px;
  overflow:hidden;
}

thead{
  background:linear-gradient(90deg,#ffeb99,#ffca28);
}

th,td{
  padding:9px 10px;
  border-bottom:1px solid rgba(230,210,150,0.6);
  text-align:left;
}

tbody tr:nth-child(every){
  background:#fff9e9;
}

tbody tr:hover{
  background:#fff4d7;
}

/* Links */
a{
  color:#1565c0;
  text-decoration:none;
}

a:hover{
  text-decoration:underline;
}

/* ===== Login-specific tweak ===== */
.card{
  max-width:420px;
}

/* ===== Confetti Pieces (for JS) ===== */
.confetti-piece{
  position:fixed;
  width:8px;
  height:14px;
  border-radius:3px;
  opacity:0.9;
  pointer-events:none;
  animation:confetti-fall 2.4s ease-out forwards;
}

@keyframes confetti-fall{
  0%{
    transform:translate3d(0,-100vh,0) rotateZ(0deg);
  }
  100%{
    transform:translate3d(0,100vh,0) rotateZ(480deg);
    opacity:0;
  }
}

/* ===== Small Screen ===== */
@media (max-width:768px){
  body{
    padding:12px;
  }
  .panel,
  .card{
    padding:18px 14px;
  }
  header{
    flex-direction:column;
    align-items:flex-start;
    gap:8px;
  }
  table{
    font-size:0.8rem;
  }
}
