/* ============================================
   MyWeddingStory Design System
   Main Color: #81D8D0 (Tiffany Mint)
   ============================================ */

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

/* ── CSS Variables ── */
:root {
  --primary: #81D8D0;
  --primary-dark: #5BBDB5;
  --primary-light: #A8E6E2;
  --primary-ultra-light: #E8F9F8;
  --bg-main: #F4FFFD;
  --bg-white: #FFFFFF;
  --text-dark: #24323D;
  --text-medium: #4A5E6A;
  --text-light: #8A9FAA;
  --text-muted: #B8C8CF;
  --border: #E6ECEC;
  --border-light: #F0F5F5;
  --coral: #FF8A7A;
  --coral-light: #FFE8E5;
  --gold: #E8C97A;
  --gold-light: #FDF6E3;
  --green: #6DD5A0;
  --green-light: #E8F8EE;
  --orange: #FFB347;
  --orange-light: #FFF3E0;
  --red: #FF6B6B;
  --red-light: #FFE8E8;
  --purple: #9B8FCC;
  --purple-light: #F0EEFF;
  --shadow-sm: 0 1px 4px rgba(36,50,61,0.06);
  --shadow-md: 0 4px 16px rgba(36,50,61,0.08);
  --shadow-lg: 0 8px 32px rgba(36,50,61,0.12);
  --shadow-card: 0 2px 12px rgba(129,216,208,0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --sidebar-width: 240px;
  --header-height: 64px;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans KR', 'Inter', -apple-system, sans-serif;
  background: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Layout ── */
.app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Global Header ── */
.global-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-text .brand {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.3px;
}

.logo-text .tagline {
  font-size: 10px;
  color: var(--text-light);
  letter-spacing: 0.5px;
  font-weight: 400;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-icon-btn {
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-medium);
  font-size: 17px;
  transition: all 0.2s;
  position: relative;
}

.header-icon-btn:hover {
  background: var(--primary-ultra-light);
  color: var(--primary-dark);
}

.notification-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--coral);
  border-radius: 50%;
  border: 2px solid white;
}

.header-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 4px;
}

.header-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s;
  border: none;
  background: transparent;
}

.header-profile:hover { background: var(--primary-ultra-light); }

.profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.profile-info { text-align: left; }

.profile-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.3;
}

.profile-role {
  font-size: 11px;
  color: var(--text-light);
  line-height: 1.2;
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-medium);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.logout-btn:hover {
  border-color: var(--coral);
  color: var(--coral);
  background: var(--coral-light);
}

/* ── Main Layout ── */
.main-layout {
  display: flex;
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-white);
  border-right: 1px solid var(--border);
  position: fixed;
  top: var(--header-height);
  left: 0;
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  z-index: 100;
  padding: 20px 0 40px;
}

.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 16px 20px 8px;
}

.sidebar-menu { list-style: none; }

.sidebar-menu-item {
  position: relative;
}

.sidebar-menu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  text-decoration: none;
  color: var(--text-medium);
  font-size: 13.5px;
  font-weight: 400;
  border-radius: 0;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  position: relative;
}

.sidebar-menu-link:hover {
  background: var(--primary-ultra-light);
  color: var(--primary-dark);
}

.sidebar-menu-link.active {
  background: linear-gradient(90deg, var(--primary-ultra-light) 0%, transparent 100%);
  color: var(--primary-dark);
  font-weight: 600;
}

.sidebar-menu-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

.sidebar-menu-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.sidebar-menu-link.active .sidebar-menu-icon { color: var(--primary); }

.sidebar-badge {
  margin-left: auto;
  background: var(--coral);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.sidebar-badge.mint {
  background: var(--primary);
}

/* Sub-menu */
.sidebar-submenu {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
  background: var(--bg-main);
}

.sidebar-submenu.open { max-height: 300px; }

.sidebar-submenu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px 8px 50px;
  color: var(--text-medium);
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.2s;
  border-left: none;
  white-space: nowrap;
}

.sidebar-submenu-item:hover { color: var(--primary-dark); background: var(--primary-ultra-light); }

.sidebar-submenu-item.active {
  color: var(--primary-dark);
  font-weight: 600;
  background: var(--primary-ultra-light);
}

.sidebar-submenu-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}

.sidebar-submenu-item.active .sidebar-submenu-dot { background: var(--primary); }

.sidebar-divider {
  margin: 12px 20px;
  border: none;
  border-top: 1px solid var(--border-light);
}

/* ── Content Area ── */
.content-area {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 32px 36px;
  min-height: calc(100vh - var(--header-height));
}

/* ── Page Header ── */
.page-header {
  margin-bottom: 28px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 10px;
}

.breadcrumb-item { cursor: pointer; }
.breadcrumb-item:hover { color: var(--primary-dark); }
.breadcrumb-sep { color: var(--border); }
.breadcrumb-item.current { color: var(--primary-dark); font-weight: 500; }

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 400;
}

/* ── Tab Navigation (Smart Scheduler) ── */
.smart-tab-nav {
  display: flex;
  gap: 4px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 5px;
  margin-bottom: 28px;
  width: fit-content;
  box-shadow: var(--shadow-sm);
}

.smart-tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: none;
  background: transparent;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
}

.smart-tab-btn:hover { background: var(--primary-ultra-light); color: var(--primary-dark); }

.smart-tab-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(129,216,208,0.4);
}

.smart-tab-btn .tab-icon { font-size: 14px; }

/* ── Card Component ── */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s;
}

.card:hover { box-shadow: var(--shadow-md); }

.card-sm { padding: 16px 20px; border-radius: var(--radius-md); }
.card-lg { padding: 28px 32px; border-radius: var(--radius-xl); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title-icon {
  width: 28px;
  height: 28px;
  background: var(--primary-ultra-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  font-size: 13px;
}

/* ── KPI Cards ── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: all 0.25s;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
}

.kpi-card.coral::before { background: linear-gradient(90deg, var(--coral) 0%, #FFB3AA 100%); }
.kpi-card.gold::before { background: linear-gradient(90deg, var(--gold) 0%, #F0D89A 100%); }
.kpi-card.green::before { background: linear-gradient(90deg, var(--green) 0%, #9BE5BF 100%); }
.kpi-card.purple::before { background: linear-gradient(90deg, var(--purple) 0%, #C4BCEC 100%); }

.kpi-label {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 8px;
  font-weight: 500;
}

.kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 4px;
}

.kpi-value .unit {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-medium);
  letter-spacing: 0;
}

.kpi-sub {
  font-size: 11.5px;
  color: var(--text-light);
}

.kpi-icon {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: var(--primary-ultra-light);
  color: var(--primary);
}

.kpi-card.coral .kpi-icon { background: var(--coral-light); color: var(--coral); }
.kpi-card.gold .kpi-icon { background: var(--gold-light); color: #C9A960; }
.kpi-card.green .kpi-icon { background: var(--green-light); color: #4DB880; }
.kpi-card.purple .kpi-icon { background: var(--purple-light); color: var(--purple); }

/* ── Progress Bar ── */
.progress-bar-wrap {
  background: var(--border-light);
  border-radius: 99px;
  overflow: hidden;
  height: 6px;
}

.progress-bar {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  transition: width 0.8s ease;
}

.progress-bar.coral { background: linear-gradient(90deg, var(--coral) 0%, #FFB3AA 100%); }
.progress-bar.gold { background: linear-gradient(90deg, var(--gold) 0%, #F0D89A 100%); }
.progress-bar.green { background: linear-gradient(90deg, var(--green) 0%, #9BE5BF 100%); }
.progress-bar.purple { background: linear-gradient(90deg, var(--purple) 0%, #C4BCEC 100%); }
.progress-bar.warning { background: linear-gradient(90deg, #FF8A4A 0%, #FFBB77 100%); }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

.badge-mint { background: var(--primary-ultra-light); color: var(--primary-dark); }
.badge-coral { background: var(--coral-light); color: #E06050; }
.badge-green { background: var(--green-light); color: #3AA870; }
.badge-gold { background: var(--gold-light); color: #A08040; }
.badge-gray { background: var(--border-light); color: var(--text-light); }
.badge-purple { background: var(--purple-light); color: #7060B0; }
.badge-orange { background: var(--orange-light); color: #C07830; }
.badge-red { background: var(--red-light); color: #C04040; }

.badge::before { font-size: 7px; line-height: 1; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(129,216,208,0.4);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 14px rgba(129,216,208,0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-white);
  color: var(--text-medium);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: var(--primary-ultra-light);
}

.btn-outline-primary {
  background: transparent;
  color: var(--primary-dark);
  border: 1.5px solid var(--primary);
}

.btn-outline-primary:hover {
  background: var(--primary);
  color: white;
}

.btn-ghost {
  background: transparent;
  color: var(--text-medium);
  border: none;
  padding: 7px 12px;
}

.btn-ghost:hover {
  background: var(--primary-ultra-light);
  color: var(--primary-dark);
}

.btn-danger {
  background: var(--red-light);
  color: var(--red);
  border: none;
}

.btn-danger:hover { background: var(--red); color: white; }

.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }
.btn-lg { padding: 12px 24px; font-size: 14px; border-radius: 12px; }
.btn-xs { padding: 4px 8px; font-size: 11px; border-radius: 6px; }

/* ── Table ── */
.data-table-wrap {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  background: var(--bg-main);
  color: var(--text-light);
  font-size: 11.5px;
  font-weight: 600;
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.data-table td {
  padding: 11px 14px;
  font-size: 13px;
  color: var(--text-dark);
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: none; }

.data-table tbody tr {
  transition: background 0.15s;
  cursor: pointer;
}

.data-table tbody tr:hover { background: var(--primary-ultra-light); }

.data-table tbody tr.selected { background: #EAF9F8; }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-medium);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 9px 13px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-dark);
  background: var(--bg-white);
  transition: all 0.2s;
  font-family: inherit;
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(129,216,208,0.2);
}

.form-control::placeholder { color: var(--text-muted); }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238A9FAA' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
  cursor: pointer;
}

/* ── Filter Bar ── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filter-select {
  padding: 8px 32px 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--text-medium);
  background: var(--bg-white);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238A9FAA' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
  transition: border-color 0.2s;
  outline: none;
}

.filter-select:focus { border-color: var(--primary); }

.search-wrap {
  position: relative;
  flex: 1;
  max-width: 280px;
}

.search-wrap .search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
}

.search-input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 12.5px;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(129,216,208,0.15);
}

/* ── View Toggle ── */
.view-toggle {
  display: flex;
  gap: 2px;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
}

.view-toggle-btn {
  padding: 6px 12px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.view-toggle-btn.active {
  background: var(--bg-white);
  color: var(--primary-dark);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* ── Calendar ── */
.calendar-wrap {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-white);
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cal-nav-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: var(--bg-white);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-medium);
  font-size: 13px;
  transition: all 0.2s;
}

.cal-nav-btn:hover {
  background: var(--primary-ultra-light);
  border-color: var(--primary);
  color: var(--primary-dark);
}

.cal-month-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.cal-day-header {
  padding: 10px 0;
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-light);
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-main);
}

.cal-day-header.weekend { color: var(--coral); }

.cal-cell {
  min-height: 90px;
  padding: 8px 8px 6px;
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  position: relative;
  cursor: pointer;
  transition: background 0.15s;
  vertical-align: top;
}

.cal-cell:hover { background: var(--primary-ultra-light); }

.cal-cell.other-month { background: #FAFCFC; }

.cal-cell.today {
  background: linear-gradient(135deg, rgba(129,216,208,0.08) 0%, rgba(129,216,208,0.05) 100%);
}

.cal-cell.selected { background: var(--primary-ultra-light); }

.cal-date {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-medium);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.cal-cell.today .cal-date {
  background: var(--primary);
  color: white;
  font-weight: 700;
}

.cal-cell.other-month .cal-date { color: var(--text-muted); }
.cal-cell.weekend .cal-date { color: var(--coral); }

.cal-event {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 500;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.cal-event.mint { background: var(--primary-ultra-light); color: var(--primary-dark); }
.cal-event.coral { background: var(--coral-light); color: #D06050; }
.cal-event.gold { background: var(--gold-light); color: #A08040; }
.cal-event.green { background: var(--green-light); color: #3AA870; }
.cal-event.purple { background: var(--purple-light); color: #7060B0; }

/* ── Checklist Items ── */
.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
  cursor: pointer;
}

.checklist-item:hover { background: var(--primary-ultra-light); }
.checklist-item:last-child { border-bottom: none; }
.checklist-item.completed { opacity: 0.6; }

.check-box {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.check-box.checked {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  font-size: 11px;
}

.checklist-content { flex: 1; min-width: 0; }

.checklist-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.checklist-item.completed .checklist-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.checklist-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.checklist-meta-item {
  font-size: 11.5px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 3px;
}

.checklist-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.2s;
}

.checklist-item:hover .checklist-actions { opacity: 1; }

/* ── Budget Cards ── */
.budget-summary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.budget-summary-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.budget-summary-label {
  font-size: 11.5px;
  color: var(--text-light);
  margin-bottom: 8px;
  font-weight: 500;
}

.budget-summary-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.5px;
}

.budget-summary-value .won { font-size: 12px; font-weight: 500; margin-right: 2px; }

/* ── Detail Panel ── */
.detail-panel {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.detail-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.detail-field { margin-bottom: 14px; }
.detail-field-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 4px;
  letter-spacing: 0.2px;
}

.detail-field-value {
  font-size: 13.5px;
  color: var(--text-dark);
  font-weight: 500;
}

.detail-field-memo {
  font-size: 12.5px;
  color: var(--text-medium);
  background: var(--bg-main);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 10px 12px;
  line-height: 1.6;
}

/* ── Donut Chart ── */
.donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.donut-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}

.donut-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.donut-legend-name { flex: 1; color: var(--text-medium); }
.donut-legend-value { font-weight: 600; color: var(--text-dark); }

/* ── Status Badge with dot ── */
.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
}

.status-dot::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.scheduled::before { background: var(--primary); }
.status-dot.in-progress::before { background: var(--gold); }
.status-dot.done::before { background: var(--green); }
.status-dot.delayed::before { background: var(--coral); }
.status-dot.auto::before { background: var(--purple); }

/* ── Info Banner ── */
.info-banner {
  background: linear-gradient(135deg, var(--primary-ultra-light) 0%, #EDF8F7 100%);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

.info-banner-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.info-banner-text { font-size: 13px; color: var(--text-medium); line-height: 1.6; }

.ai-banner {
  background: linear-gradient(135deg, #F0EEFF 0%, #E8F9F8 100%);
  border: 1px solid #D0C8F0;
}

/* ── AI Card ── */
.ai-card {
  background: linear-gradient(135deg, #667EEA15 0%, #81D8D015 100%);
  border: 1px solid #D8D4F0;
  border-radius: var(--radius-lg);
  padding: 20px 22px;
}

/* ── Week schedule ── */
.week-schedule-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.week-schedule-item:last-child { border-bottom: none; }

.week-date-badge {
  min-width: 42px;
  text-align: center;
  background: var(--primary-ultra-light);
  border-radius: 10px;
  padding: 6px 8px;
}

.week-date-day { font-size: 10px; color: var(--primary-dark); font-weight: 600; }
.week-date-num { font-size: 17px; font-weight: 700; color: var(--primary-dark); line-height: 1; }

.week-event-content { flex: 1; }
.week-event-title { font-size: 13px; font-weight: 600; color: var(--text-dark); margin-bottom: 2px; }
.week-event-meta { font-size: 11.5px; color: var(--text-light); }

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-light);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-medium);
  margin-bottom: 8px;
}

.empty-state-desc { font-size: 13px; }

/* ── Tooltip ── */
.tooltip-wrap {
  position: relative;
  display: inline-flex;
}

.tooltip-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-light);
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  font-style: italic;
  font-weight: 700;
}

.tooltip-icon:hover { background: var(--primary); color: white; }

/* ── Grid Helpers ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid-auto { display: grid; grid-template-columns: 1fr 320px; gap: 20px; }
.grid-auto-rev { display: grid; grid-template-columns: 320px 1fr; gap: 20px; }

/* ── Utility ── */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap-8 { gap: 8px; }
.flex-gap-12 { gap: 12px; }
.flex-gap-16 { gap: 16px; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }

.text-primary { color: var(--primary-dark); }
.text-coral { color: var(--coral); }
.text-green { color: #3AA870; }
.text-gold { color: #A08040; }
.text-light { color: var(--text-light); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.font-700 { font-weight: 700; }
.font-600 { font-weight: 600; }
.font-500 { font-weight: 500; }

.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }

.section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: '';
  width: 3px;
  height: 16px;
  background: var(--primary);
  border-radius: 2px;
}

/* ── Tab Category ── */
.category-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.category-tab {
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--bg-white);
  color: var(--text-medium);
  transition: all 0.2s;
}

.category-tab:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: var(--primary-ultra-light);
}

.category-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(129,216,208,0.35);
}

/* ── Quick Info ── */
.wedding-info-bar {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  color: white;
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(129,216,208,0.4);
  position: relative;
  overflow: hidden;
}

.wedding-info-bar::before {
  content: '💍';
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 48px;
  opacity: 0.15;
}

.wib-item { display: flex; flex-direction: column; gap: 4px; }
.wib-label { font-size: 11.5px; opacity: 0.8; font-weight: 400; }
.wib-value { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; }
.wib-sub { font-size: 12px; opacity: 0.85; }
.wib-divider { width: 1px; height: 40px; background: rgba(255,255,255,0.25); }
.wib-actions { margin-left: auto; display: flex; gap: 8px; }

.btn-white {
  background: rgba(255,255,255,0.9);
  color: var(--primary-dark);
  border: none;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.btn-white:hover { background: white; box-shadow: 0 2px 10px rgba(0,0,0,0.1); transform: translateY(-1px); }

.btn-white-outline {
  background: transparent;
  color: white;
  border: 1.5px solid rgba(255,255,255,0.6);
}

.btn-white-outline:hover { background: rgba(255,255,255,0.15); border-color: white; }

/* ── Link integration badge ── */
.auto-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 600;
  background: var(--purple-light);
  color: #6050A0;
}

.auto-badge::before {
  content: '⚡';
  font-size: 9px;
}

/* ── Connection lines for integration ── */
.integration-flow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(90deg, var(--primary-ultra-light) 0%, #EFF6FF 100%);
  border-radius: 10px;
  border: 1px solid var(--border-light);
  margin-bottom: 8px;
}

.flow-source {
  padding: 4px 10px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-medium);
}

.flow-arrow {
  color: var(--primary);
  font-size: 16px;
  flex-shrink: 0;
}

.flow-target {
  padding: 4px 10px;
  background: var(--primary);
  color: white;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}

/* ── Notification items ── */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
}

.notif-item:hover { background: var(--primary-ultra-light); }
.notif-item:last-child { border-bottom: none; }

.notif-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  background: var(--primary-ultra-light);
  color: var(--primary-dark);
}

.notif-content { flex: 1; }
.notif-title { font-size: 13px; font-weight: 600; color: var(--text-dark); margin-bottom: 2px; }
.notif-desc { font-size: 12px; color: var(--text-light); }
.notif-time { font-size: 11px; color: var(--text-muted); flex-shrink: 0; margin-top: 2px; }

/* ── Amount display ── */
.amount-positive { color: #3AA870; font-weight: 700; }
.amount-negative { color: var(--coral); font-weight: 700; }
.amount-warning { color: var(--orange); font-weight: 700; }
.over-budget { background: var(--red-light); color: var(--red); }

/* ── Scrollable ── */
.scrollable { overflow-y: auto; }
.scrollable::-webkit-scrollbar { width: 4px; }
.scrollable::-webkit-scrollbar-track { background: transparent; }
.scrollable::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ── Screen visibility ── */
.screen { display: none; }
.screen.active { display: block; }

/* ── Custom Scrollbar for content-area ── */
.content-area::-webkit-scrollbar { width: 5px; }
.content-area::-webkit-scrollbar-track { background: transparent; }
.content-area::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Number highlight ── */
.num-highlight {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ── Sidebar footer ── */
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-light);
  margin-top: auto;
}

.sidebar-footer-card {
  background: linear-gradient(135deg, var(--primary-ultra-light) 0%, #EDF8F7 100%);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

/* ── Card accent ── */
.card-accent-left {
  border-left: 3px solid var(--primary);
}

/* ── Skeleton loading (placeholder) ── */
.skeleton {
  background: linear-gradient(90deg, var(--border-light) 25%, var(--bg-main) 50%, var(--border-light) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 6px;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Stat row ── */
.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

.stat-row:last-child { border-bottom: none; }
.stat-label { font-size: 13px; color: var(--text-medium); }
.stat-value { font-size: 13px; font-weight: 700; color: var(--text-dark); }

/* ── Hover card ── */
.hover-lift {
  transition: transform 0.2s, box-shadow 0.2s;
}

.hover-lift:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* ── Active state ripple ── */
.btn:active {
  transform: scale(0.97);
}

/* ── Tag Pill ── */
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 500;
  background: var(--border-light);
  color: var(--text-medium);
  cursor: pointer;
  transition: all 0.2s;
}

.tag-pill:hover {
  background: var(--primary-ultra-light);
  color: var(--primary-dark);
}

.tag-pill.active {
  background: var(--primary);
  color: white;
}

/* ══════════════════════════════════════════════
   TIMELINE VIEW STYLES
══════════════════════════════════════════════ */

.tl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.tl-header-left { display: flex; align-items: center; gap: 4px; }
.tl-header-right { display: flex; gap: 8px; }

/* D-day progress track */
.tl-dday-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.tl-dday-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
}

.tl-dday-track {
  flex: 1;
  height: 10px;
  background: var(--border-light);
  border-radius: 99px;
  position: relative;
}

.tl-dday-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 99px;
  transition: width 0.8s ease;
}

.tl-dday-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 2;
}

.tl-dday-marker-dot {
  width: 16px;
  height: 16px;
  background: var(--primary-dark);
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(129,216,208,0.3);
}

.tl-dday-marker-label {
  font-size: 10px;
  color: var(--primary-dark);
  font-weight: 700;
  white-space: nowrap;
  position: absolute;
  top: 18px;
}

/* Phase containers */
.tl-phases {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tl-phase {
  background: var(--bg-white);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}

.tl-phase:hover { box-shadow: var(--shadow-md); }

.tl-phase-done { border-left: 3px solid var(--green); }
.tl-phase-active { border-left: 3px solid var(--primary); box-shadow: var(--shadow-card); }
.tl-phase-upcoming { border-left: 3px solid var(--border); }

.tl-phase-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}

.tl-phase-head:hover { background: var(--bg-main); }

.tl-phase-active .tl-phase-head {
  background: linear-gradient(90deg, var(--primary-ultra-light) 0%, transparent 60%);
}

.tl-phase-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.tl-phase-range {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  white-space: nowrap;
  min-width: 130px;
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.3px;
}

.tl-phase-active .tl-phase-range { color: var(--primary-dark); }
.tl-phase-done .tl-phase-range { color: #3AA870; }

.tl-phase-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-medium);
}

.tl-phase-badges { display: flex; gap: 6px; flex-wrap: wrap; }

.tl-phase-chevron {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform 0.25s;
  flex-shrink: 0;
}

.tl-phase-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.tl-phase-body.open {
  max-height: 1200px;
}

/* Simple grid items (for collapsed phases) */
.tl-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-main);
}

.tl-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  transition: box-shadow 0.15s;
}

.tl-item:hover { box-shadow: var(--shadow-sm); }

.tl-item-done { opacity: 0.75; }

.tl-item-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
}

.tl-item-dot.done { background: var(--green); }
.tl-item-dot.active { background: var(--primary); box-shadow: 0 0 0 3px rgba(129,216,208,0.25); }
.tl-item-dot.upcoming { background: var(--border); border: 2px solid var(--text-muted); }

.tl-item-content { flex: 1; min-width: 0; }

.tl-item-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
  line-height: 1.4;
}

.tl-item-done .tl-item-title { text-decoration: line-through; color: var(--text-light); }

.tl-item-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* Sub-timeline (detailed view for active phase) */
.tl-sub-timeline {
  padding: 20px 24px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-main);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tl-sub-item {
  display: flex;
  gap: 0;
  align-items: stretch;
  min-height: 90px;
}

.tl-sub-item:last-child { min-height: 60px; }

.tl-sub-date {
  width: 48px;
  text-align: right;
  padding-right: 14px;
  padding-top: 12px;
  flex-shrink: 0;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-medium);
  line-height: 1.3;
}

.tl-sub-date span {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
}

.tl-sub-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 24px;
  flex-shrink: 0;
}

.tl-sub-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 14px;
  z-index: 1;
  transition: box-shadow 0.2s;
}

.tl-sub-dot.done {
  background: var(--green);
  border: 2px solid white;
  box-shadow: 0 0 0 3px rgba(109,213,160,0.25);
}

.tl-sub-dot.active {
  background: var(--primary);
  border: 2px solid white;
  box-shadow: 0 0 0 4px rgba(129,216,208,0.3);
}

.tl-sub-dot.upcoming {
  background: var(--bg-white);
  border: 2px solid var(--border);
}

.tl-sub-dot.add {
  background: var(--bg-white);
  border: 2px dashed var(--primary);
  width: 14px;
  height: 14px;
}

.tl-sub-line {
  flex: 1;
  width: 2px;
  background: var(--border-light);
  margin-top: 2px;
}

.tl-sub-dot.done + .tl-sub-line { background: var(--green); opacity: 0.3; }
.tl-sub-dot.active + .tl-sub-line { background: linear-gradient(180deg, var(--primary-light) 0%, var(--border-light) 100%); }

.tl-sub-card {
  flex: 1;
  background: var(--bg-white);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: 8px 0 8px 12px;
  transition: all 0.2s;
}

.tl-sub-card:hover { box-shadow: var(--shadow-md); }

.tl-sub-done {
  border-color: rgba(109,213,160,0.3);
  background: #FAFFFD;
}

.tl-sub-active {
  border-color: var(--primary-light);
  background: linear-gradient(135deg, var(--primary-ultra-light) 0%, white 100%);
  box-shadow: var(--shadow-card);
}

.tl-sub-card-top {
  display: flex;
  gap: 5px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.tl-sub-card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.tl-sub-done .tl-sub-card-title {
  text-decoration: line-through;
  color: var(--text-light);
}

.tl-sub-card-meta {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 10px;
}

.tl-sub-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.tl-sub-add {
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.tl-sub-add:hover { opacity: 1; }

.tl-sub-card-add {
  flex: 1;
  border: 2px dashed var(--primary-light);
  border-radius: var(--radius-md);
  margin: 8px 0 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--primary-dark);
  font-weight: 500;
  cursor: pointer;
  padding: 12px;
  transition: all 0.2s;
  min-height: 52px;
}

.tl-sub-card-add:hover {
  background: var(--primary-ultra-light);
  border-color: var(--primary);
}

/* ══════════════════════════════════════════════
   MODAL STYLES
══════════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(36, 50, 61, 0.45);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(36,50,61,0.2);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.open .modal-box {
  transform: translateY(0) scale(1);
}

.modal-box-sm { max-width: 480px; }

.modal-box::-webkit-scrollbar { width: 4px; }
.modal-box::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border-light);
}

.modal-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.modal-title-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary-ultra-light);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.3px;
  margin-bottom: 2px;
}

.modal-subtitle {
  font-size: 12.5px;
  color: var(--text-light);
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--border-light);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 14px;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-top: 4px;
}

.modal-close-btn:hover {
  background: var(--coral-light);
  color: var(--coral);
}

.modal-body {
  padding: 22px 24px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--border-light);
}

.modal-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-required {
  color: var(--coral);
  font-size: 12px;
}

.modal-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-medium);
  cursor: pointer;
  font-weight: 500;
}

.modal-checkbox-label:hover { color: var(--text-dark); }

/* Input with icon */
.input-icon-wrap {
  position: relative;
}

.input-icon-right {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
  pointer-events: none;
}

/* Input with unit */
.input-unit-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-unit-wrap .form-control {
  padding-right: 36px;
}

.input-unit {
  position: absolute;
  right: 12px;
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
  pointer-events: none;
}

/* File upload area */
.file-upload-label { display: block; cursor: pointer; }

.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  transition: all 0.2s;
  background: var(--bg-main);
}

.file-upload-area:hover {
  border-color: var(--primary);
  background: var(--primary-ultra-light);
}

/* Warning banner inside modal */
.modal-warn-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--coral-light);
  border: 1px solid rgba(255,138,122,0.4);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 12.5px;
  color: #C04040;
  line-height: 1.5;
  margin-top: 12px;
}

/* Notice in modal */
.modal-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--primary-ultra-light);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  font-size: 12.5px;
  color: var(--text-medium);
  line-height: 1.6;
  margin-top: 16px;
}

/* Regeneration options */
.regen-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.regen-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.regen-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.regen-option:hover {
  border-color: var(--primary-light);
  background: var(--primary-ultra-light);
}

.regen-option.selected {
  border-color: var(--primary);
  background: var(--primary-ultra-light);
}

.regen-option-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.regen-option-content { flex: 1; }

.regen-option-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 3px;
}

.regen-option-desc {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.55;
}

.regen-option-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: transparent;
  flex-shrink: 0;
  margin-top: 6px;
  transition: all 0.2s;
}

.regen-option.selected .regen-option-check {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ══════════════════════════════════════════════
   TOAST NOTIFICATION
══════════════════════════════════════════════ */

.toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--text-dark);
  color: white;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  max-width: 320px;
}

.toast.success { background: #2A5C45; border-left: 3px solid var(--green); }
.toast.warning { background: #5C3A20; border-left: 3px solid var(--orange); }
.toast.error { background: #5C2020; border-left: 3px solid var(--coral); }
.toast.info { background: #1E3A4A; border-left: 3px solid var(--primary); }

.toast-icon { font-size: 15px; flex-shrink: 0; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px) scale(0.9); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(30px); }
}

/* ── Responsive ── */
@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .budget-summary { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
  :root { --sidebar-width: 200px; }
  .grid-auto { grid-template-columns: 1fr; }
  .content-area { padding: 24px; }
}

/* ── Micro animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.screen.active { animation: fadeInUp 0.3s ease; }

/* ── Tooltip popup ── */
[data-tooltip] {
  position: relative;
}

[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-dark);
  color: white;
  font-size: 11.5px;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  z-index: 9999;
  pointer-events: none;
  box-shadow: var(--shadow-md);
}
