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

:root {
  --pink: #FF3B7F;
  --pink-light: #FFE0ED;
  --pink-dark: #CC2B66;
  --coral: #FF6B6B;
  --bg: #ffffff;
  --bg2: #f8f8f8;
  --bg3: #f3f3f3;
  --border: #e8e8e8;
  --text: #1a1a1a;
  --text2: #555555;
  --text3: #999999;
  --radius: 12px;
  --radius-md: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg3);
  color: var(--text);
  font-size: 14px;
}

.app { display: flex; min-height: 100vh; }
.main { flex: 1; padding: 24px; overflow-y: auto; }

.sidebar {
  width: 210px; min-width: 210px;
  background: var(--bg);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; min-height: 100vh;
}
.sidebar-header { padding: 16px; border-bottom: 1px solid var(--border); }
.sidebar-logo { display: flex; align-items: center; gap: 10px; }
.logo-dot { width: 32px; height: 32px; border-radius: 9px; background: var(--pink); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.logo-dot svg { width: 17px; height: 17px; }
.logo-text { font-size: 14px; font-weight: 700; color: var(--text); }
.logo-sub  { font-size: 11px; color: var(--text3); }

.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 18px; width: 100%; background: none; border: none; font-size: 13px; color: var(--text2); cursor: pointer; text-align: left; transition: background 0.12s, color 0.12s; }
.nav-item:hover  { background: var(--bg2); color: var(--text); }
.nav-item.active { background: var(--pink-light); color: var(--pink-dark); font-weight: 600; }
.nav-icon { width: 16px; height: 16px; flex-shrink: 0; }

.sidebar-footer { margin-top: auto; padding: 12px 16px; border-top: 1px solid var(--border); }
.apikey-btn { width: 100%; background: none; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 7px 10px; cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text3); justify-content: center; }
.apikey-btn:hover { border-color: var(--pink); color: var(--pink); }

.page { display: none; }
.page.active { display: block; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.page-title { font-size: 22px; font-weight: 700; color: var(--text); }
.page-sub   { font-size: 13px; color: var(--text3); margin-top: 2px; }

.dash-hero { background: linear-gradient(135deg, var(--pink) 0%, var(--coral) 100%); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px; color: white; display: flex; align-items: center; justify-content: space-between; }
.hero-text h2 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.hero-text p  { font-size: 13px; opacity: 0.85; }
.gmail-btn { background: white; color: #CC0000; border: none; border-radius: var(--radius-md); padding: 9px 18px; font-size: 13px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 7px; text-decoration: none; white-space: nowrap; }
.gmail-btn:hover { background: #fff5f5; }

.btn-pink { background: var(--pink); color: white; border: none; border-radius: var(--radius-md); padding: 9px 18px; font-size: 13px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.btn-pink:hover { background: var(--pink-dark); }
.btn-cancel { background: var(--bg2); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius-md); padding: 9px 18px; font-size: 13px; cursor: pointer; }
.btn-cancel:hover { background: var(--bg3); }
.btn-danger { background: #fff0f0; color: #cc0000; border: 1px solid #fcc; border-radius: var(--radius-md); padding: 9px 18px; font-size: 13px; cursor: pointer; }
.btn-danger:hover { background: #ffe0e0; }
.btn-finance { background: white; color: var(--pink-dark); border: 1.5px solid var(--pink); border-radius: var(--radius-md); padding: 9px 18px; font-size: 13px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.btn-finance:hover { background: var(--pink-light); }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.stat-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; align-items: center; justify-content: space-between; }
.stat-val   { font-size: 24px; font-weight: 700; color: var(--text); }
.stat-label { font-size: 12px; color: var(--text3); margin-top: 3px; }
.stat-icon  { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.stat-icon.pink   { background: #FFE0ED; }
.stat-icon.green  { background: #dcfce7; }
.stat-icon.orange { background: #fef3c7; }

.card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card + .card { margin-top: 16px; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-title { font-size: 15px; font-weight: 600; color: var(--text); }

.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.home-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.home-card-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 12px; }

.filter-tabs { display: flex; gap: 4px; }
.filter-tab { padding: 5px 12px; font-size: 12px; border-radius: var(--radius-md); border: 1px solid var(--border); background: transparent; color: var(--text2); cursor: pointer; }
.filter-tab.active { background: var(--pink); color: white; border-color: var(--pink); }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 8px 12px; font-size: 11px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.4px; border-bottom: 1px solid var(--border); }
td { padding: 11px 12px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
tr:last-child td { border-bottom: none; }

.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.badge.pending    { background: #fffbeb; color: #b45309; }
.badge.reimbursed { background: #ecfdf5; color: #15803d; }

.check-btn { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border); background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s; flex-shrink: 0; }
.check-btn.done { background: var(--pink); border-color: var(--pink); }
.check-btn.done::after { content: ''; width: 5px; height: 9px; border: 2px solid white; border-top: none; border-left: none; transform: rotate(45deg) translateY(-1px); display: block; }

.upload-area { border: 2px dashed var(--border); border-radius: var(--radius); padding: 20px; text-align: center; cursor: pointer; transition: border-color 0.15s; margin-bottom: 14px; position: relative; overflow: hidden; min-height: 80px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.upload-area:hover { border-color: var(--pink); }
.upload-icon { width: 38px; height: 38px; background: var(--pink-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; }
.upload-text { font-size: 13px; color: var(--text2); font-weight: 500; }
.upload-sub  { font-size: 11px; color: var(--text3); margin-top: 4px; }
input[type="file"] { display: none; }
.ai-processing { display: none; border-radius: var(--radius-md); padding: 10px 14px; font-size: 12px; margin-bottom: 12px; }
.ai-processing.visible { display: block; }

.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-label { font-size: 11px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.4px; }
.form-input { padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 13px; background: var(--bg); color: var(--text); outline: none; width: 100%; }
.form-input:focus { border-color: var(--pink); }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-day-header { text-align: center; font-size: 11px; font-weight: 600; color: var(--text3); padding: 6px 0; }
.cal-day { text-align: center; padding: 6px 2px; font-size: 13px; cursor: pointer; border-radius: var(--radius-md); color: var(--text); position: relative; min-height: 34px; display: flex; align-items: center; justify-content: center; }
.cal-day:hover       { background: var(--bg2); }
.cal-day.other-month { color: var(--text3); }
.cal-day.today       { background: var(--pink); color: white; font-weight: 700; }
.cal-day.has-event::after { content: ''; position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 50%; background: var(--pink); }
.cal-day.today.has-event::after { background: white; }
.cal-nav { background: none; border: none; cursor: pointer; color: var(--text2); font-size: 22px; padding: 0 4px; line-height: 1; }
.cal-nav:hover { color: var(--pink); }

.meeting-list  { display: flex; flex-direction: column; gap: 8px; }
.meeting-item  { display: flex; align-items: center; gap: 12px; padding: 10px; background: var(--bg2); border-radius: var(--radius-md); }
.meeting-dot   { width: 8px; height: 8px; border-radius: 50%; background: var(--pink); flex-shrink: 0; }
.meeting-title { font-size: 13px; font-weight: 600; color: var(--text); }
.meeting-time  { font-size: 11px; color: var(--text3); margin-top: 2px; }
.meeting-del   { margin-left: auto; background: none; border: none; cursor: pointer; color: var(--text3); font-size: 16px; padding: 0 4px; }
.meeting-del:hover { color: #e53e3e; }

.todo-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.todo-item:last-child { border-bottom: none; }
.todo-text      { flex: 1; font-size: 13px; color: var(--text); }
.todo-text.done { text-decoration: line-through; color: var(--text3); }
.todo-del       { background: none; border: none; cursor: pointer; color: var(--text3); font-size: 18px; padding: 0 4px; }
.todo-del:hover { color: #e53e3e; }

.progress-bar  { width: 100%; height: 7px; background: var(--bg3); border-radius: 999px; overflow: hidden; margin-bottom: 6px; }
.progress-fill { height: 100%; background: var(--pink); border-radius: 999px; transition: width 0.3s ease; }
.progress-label { font-size: 12px; color: var(--text3); display: flex; justify-content: space-between; }

.sheets-list { display: flex; flex-direction: column; gap: 8px; }
.sheet-item  { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--bg2); border-radius: var(--radius-md); cursor: pointer; text-decoration: none; }
.sheet-item:hover { background: var(--pink-light); }
.sheet-icon  { width: 28px; height: 28px; background: #0F9D58; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sheet-name  { font-size: 13px; font-weight: 600; color: var(--text); }
.sheet-del   { margin-left: auto; background: none; border: none; cursor: pointer; color: var(--text3); font-size: 18px; padding: 0 4px; }
.sheet-del:hover { color: #e53e3e; }

.search-bar { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 16px; }
.search-bar input { border: none; outline: none; background: transparent; font-size: 13px; color: var(--text); flex: 1; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.35); display: none; align-items: center; justify-content: center; z-index: 200; }
.modal-overlay.open { display: flex; }
.modal { background: var(--bg); border-radius: var(--radius); padding: 24px; width: 460px; max-width: 95vw; max-height: 90vh; overflow-y: auto; }
.modal-title   { font-size: 16px; font-weight: 700; margin-bottom: 16px; color: var(--text); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

.notif-banner { background: #fffbeb; border: 1px solid #f5c75a; border-radius: var(--radius-md); padding: 10px 14px; font-size: 12px; color: #8a6200; margin-bottom: 16px; }
.empty-hint { font-size: 12px; color: var(--text3); }
