/* ==============================================================================
   Akademia Tańca Smooth — Stylistyka Portalu i Panelu
   ============================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=DM+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --bg-dark: #120e0b;
  --bg-card: #1a1510;
  --bg-card-hover: #221c15;
  --gold: #c9a84c;
  --gold-light: #e8d090;
  --gold-glow: rgba(201, 168, 76, 0.15);
  --border-gold: rgba(201, 168, 76, 0.22);
  --text-cream: #f5f0e8;
  --text-muted: rgba(245, 240, 232, 0.65);
  --text-subtle: rgba(245, 240, 232, 0.4);
  --danger: #e05252;
  --danger-bg: rgba(224, 82, 82, 0.12);
  --success: #38bdf8;
  --success-bg: rgba(56, 189, 248, 0.12);
  --radius: 12px;
  --transition: all 0.25s ease;
}

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

body {
  background: var(--bg-dark);
  color: var(--text-cream);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Typografia ── */
h1, h2, h3, h4, .font-serif {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  letter-spacing: 0.02em;
}

h1 { font-size: 2.2rem; color: var(--gold); }
h2 { font-size: 1.7rem; color: var(--gold-light); margin-bottom: 0.5rem; }
h3 { font-size: 1.3rem; color: var(--text-cream); }

a {
  color: var(--gold);
  text-decoration: none;
  transition: var(--transition);
}
a:hover {
  color: var(--gold-light);
}

/* ── Pasek Górny (Navbar) ── */
.panel-nav {
  background: rgba(26, 21, 16, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-gold);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.brand-badge {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  background: var(--gold-glow);
  color: var(--gold);
  border: 1px solid var(--border-gold);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.user-tag {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.user-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-cream);
}

.user-role {
  font-size: 0.72rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Kontenery i Układ ── */
.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  flex: 1;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  padding: 1.8rem;
  margin-bottom: 1.8rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.4rem;
  border-bottom: 1px solid rgba(201, 168, 76, 0.12);
  padding-bottom: 0.8rem;
}

/* ── Formularze i Pola ── */
.form-group {
  margin-bottom: 1.2rem;
}

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--gold-light);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="time"],
input[type="number"],
select,
textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  color: var(--text-cream);
  padding: 0.75rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  transition: var(--transition);
  outline: none;
}

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

select option {
  background: #1e1913;
  color: #f5f0e8;
}

/* ── Przyciski ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
}

.btn-gold {
  background: var(--gold);
  color: #120e0b;
}
.btn-gold:hover {
  background: var(--gold-light);
  color: #120e0b;
  box-shadow: 0 0 15px rgba(201, 168, 76, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
}
.btn-outline:hover {
  background: var(--gold-glow);
  color: var(--gold-light);
  border-color: var(--gold-light);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(224, 82, 82, 0.3);
}
.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-sm {
  padding: 0.35rem 0.8rem;
  font-size: 0.75rem;
}

/* ── Tabele ── */
.table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border-gold);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

th {
  background: rgba(201, 168, 76, 0.08);
  color: var(--gold-light);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border-gold);
}

td {
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid rgba(201, 168, 76, 0.1);
  color: var(--text-cream);
  vertical-align: middle;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ── Pigułki i Etykiety (Badges) ── */
.badge {
  display: inline-block;
  padding: 0.22rem 0.65rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge-gold {
  background: var(--gold-glow);
  color: var(--gold);
  border: 1px solid var(--border-gold);
}

.badge-group {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-cream);
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin-right: 0.3rem;
  margin-bottom: 0.3rem;
}

/* ── Karty Grafiku Dni Tygodnia (Timetable) ── */
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
  margin-top: 1rem;
}

.day-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-gold);
  border-radius: 10px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
}

.day-card.has-classes {
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.03);
}

.day-title {
  font-size: 1.15rem;
  font-family: 'Cormorant Garamond', serif;
  color: var(--gold);
  border-bottom: 1px solid rgba(201, 168, 76, 0.15);
  padding-bottom: 0.4rem;
  margin-bottom: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.class-item {
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--gold);
  border-radius: 0 6px 6px 0;
  padding: 0.7rem 0.85rem;
  margin-bottom: 0.7rem;
}

.class-time {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.class-group {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-cream);
  margin: 0.2rem 0;
}

.class-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── Komunikaty Flash ── */
.flash-msg {
  padding: 0.9rem 1.2rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.flash-success {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
}
.flash-danger {
  background: rgba(224, 82, 82, 0.12);
  border: 1px solid rgba(224, 82, 82, 0.3);
  color: #fca5a5;
}

/* ── Karty Logowania ── */
.login-wrap {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  text-align: center;
}

.login-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 0.2rem;
}

.login-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ── Zakładki Admina (Tabs) ── */
.admin-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-gold);
  margin-bottom: 2rem;
}

.tab-btn {
  padding: 0.8rem 1.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--gold-light);
}

.tab-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  background: rgba(201, 168, 76, 0.05);
}

.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

/* ── Siatka 2-kolumnowa ── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .panel-nav {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .schedule-grid {
    grid-template-columns: 1fr;
  }
}
