/* =========================================================
   Calendário DDSHE — Professional UI
========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  --primary:       #0F766E;
  --primary-dark:  #0b5d57;
  --primary-light: #dff7f3;
  --gold:          #C9963A;
  --gold-light:    #fdf3e3;
  --gold-border:   #e8c882;

  --bg-page:  #f4f7f9;
  --bg-card:  #ffffff;
  --bg-soft:  #f8fafb;

  --text-main:  #111827;
  --text-muted: #6b7280;

  --border: #e5e7eb;

  --success: #16a34a;
  --danger:  #dc2626;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 30px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

body {
  font-family: 'DM Sans', sans-serif;
  background: radial-gradient(circle at top left, #ffffff 0%, #f4f7f9 45%), var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  margin: 0;
}

/* =========================================================
   CONTAINER
========================================================= */
.container { max-width: 900px; }

/* =========================================================
   HEADER — DDSHE style inspired by physical calendar
========================================================= */
.page-header {
  margin-bottom: 32px;
  text-align: center;
}

.calendar-brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.brand-eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
}

.brand-title {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: -.01em;
  line-height: 1;
  margin: 0;
}

.brand-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 4px;
}

.header-actions {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

/* =========================================================
   BUTTONS
========================================================= */
.btn-add {
  border: none;
  border-radius: 14px;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--primary) 0%, #14b8a6 100%);
  color: white;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .2s ease;
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.22);
}

.btn-add:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.28);
  color: white;
}

.btn-add i { font-size: 18px; }

/* =========================================================
   TABLE CARD
========================================================= */
.table-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.7);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* =========================================================
   TABLE
========================================================= */
.dds-table { margin: 0; }

.dds-table thead th {
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  border: none;
  padding: 18px 22px;
}

.dds-table tbody tr {
  transition: background .2s ease;
}

.dds-table tbody tr:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.dds-table tbody tr:hover { background: #fdfaf5; }

.dds-table tbody td,
.dds-table tbody th {
  padding: 20px 22px;
  vertical-align: middle;
  border: none;
}

/* =========================================================
   NUMBER COLUMN
========================================================= */
.row-number {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--gold-light);
  color: var(--gold);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gold-border);
}

/* =========================================================
   DATE RANGE DISPLAY
========================================================= */
.date-range {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-main);
}

.date-chip {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

.date-chip i {
  color: var(--primary);
  font-size: 15px;
  margin-right: 5px;
}

/* Golden arrow between dates */
.arrow-sep {
  color: var(--gold);
  font-size: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* =========================================================
   TEAM RESPONSIBLE
========================================================= */
.team-name {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 15px;
}

.team-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, #e8a84a 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(201, 150, 58, 0.3);
}

/* =========================================================
   DELETE BUTTON
========================================================= */
.btn-row-delete {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .15s ease;
  cursor: pointer;
}

.btn-row-delete:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: var(--danger);
}

/* =========================================================
   ACTIVE WEEK HIGHLIGHT
========================================================= */
.row-active {
  background: linear-gradient(90deg, #fdfaf4 0%, #ffffff 100%) !important;
  border-left: 3px solid var(--gold) !important;
}

.badge-active {
  font-size: 10px;
  font-weight: 700;
  background: var(--gold-light);
  color: var(--gold);
  border: 1px solid var(--gold-border);
  border-radius: 6px;
  padding: 2px 8px;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-left: 8px;
}

/* =========================================================
   FOOTER
========================================================= */
.table-footer {
  padding: 16px 22px;
  background: #fbfcfd;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

.saved-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
  margin-right: 6px;
}

/* =========================================================
   MODAL
========================================================= */
.modal-content {
  border: none;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,.15);
}

.modal-header {
  border-bottom: 1px solid var(--border);
  padding: 22px 24px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
}

.modal-body  { padding: 24px; }
.modal-footer {
  border-top: 1px solid var(--border);
  padding: 18px 24px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.form-control {
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 12px 14px;
  font-size: 14px;
  transition: all .15s ease;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(15,118,110,.12);
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 768px) {
  .brand-title { font-size: 2.2rem; }
  .header-actions { position: static; transform: none; margin-top: 16px; }

  .dds-table thead { display: none; }

  .dds-table tbody tr {
    display: block;
    margin: 14px;
    border-radius: 18px;
    background: white;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
  }

  .dds-table tbody td,
  .dds-table tbody th {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 14px 18px;
  }

  .date-range { flex-wrap: wrap; }
}

/* =========================================================
   STATS CARDS
========================================================= */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-icon.gold   { background: var(--gold-light);    color: var(--gold); }
.stat-icon.teal   { background: var(--primary-light); color: var(--primary); }
.stat-icon.red    { background: #fef2f2;              color: var(--danger); }
.stat-icon.purple { background: #f3f0ff;              color: #7c3aed; }

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-main);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

@media (max-width: 768px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   STATUS BADGES
========================================================= */
.dds-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.dds-badge.current  { background: var(--gold-light);    color: var(--gold);    border: 1px solid var(--gold-border); }
.dds-badge.done     { background: #f0fdf4;              color: var(--success); border: 1px solid #bbf7d0; }
.dds-badge.upcoming { background: #eff6ff;              color: #2563eb;        border: 1px solid #bfdbfe; }
.dds-badge.empty    { background: #fef2f2;              color: var(--danger);  border: 1px solid #fecaca; }

/* =========================================================
   INLINE TEAM INPUT
========================================================= */
.team-cell-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 12px;
  transition: border-color .15s, box-shadow .15s;
}

.team-cell-inner:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15,118,110,.1);
  background: #fff;
}

.team-cell-inner i {
  color: var(--text-muted);
  font-size: 16px;
  flex-shrink: 0;
}

.team-input {
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  outline: none;
  width: 100%;
  font-family: inherit;
}

.team-input::placeholder { color: var(--text-muted); font-weight: 400; }

/* =========================================================
   ROW ACTION BUTTON
========================================================= */
.btn-row-action {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s ease;
  color: var(--text-muted);
  font-size: 16px;
}

.btn-row-action.danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: var(--danger);
}

/* Number badge in table */
.row-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--gold-light);
  color: var(--gold);
  border: 1px solid var(--gold-border);
  font-size: 13px;
  font-weight: 700;
}

/* =========================================================
   CURRENT WEEK BANNER
========================================================= */
.current-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
}

.current-banner-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.current-banner-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--gold-light);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.current-banner-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.current-banner-team {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

@media (max-width: 576px) {
  .current-banner { flex-direction: column; align-items: flex-start; }
}