:root {
  --p-pink: #ffc2d1; --p-pink-dark: #ff85a1;
  --p-blue: #bde0fe; --p-purple: #cdb4db; --p-mint: #caffbf;
  --text: #5b4b66; --muted: #a18eb1; --glass: rgba(255, 255, 255, 0.85);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: linear-gradient(135deg, #fdfcfb 0%, #e2d1f9 100%);
  background-attachment: fixed; color: var(--text);
  font-family: "PingFang TC", sans-serif; min-height: 100vh; padding: 20px;
}
.container { max-width: 1200px; margin: 0 auto; }
.header-content { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.logo { font-size: 1.6rem; font-weight: bold; color: var(--p-pink-dark); display: flex; align-items: center; gap: 10px; }
.main-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
.full-width { grid-column: 1 / -1; }

.card-glass {
  background: var(--glass); backdrop-filter: blur(12px);
  border-radius: 20px; padding: 25px; border: 1px solid white;
  box-shadow: 0 8px 32px rgba(161, 142, 177, 0.15);
}

.section-title { font-size: 1.2rem; margin-bottom: 20px; color: var(--p-pink-dark); }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.cute-form { display: flex; flex-direction: column; gap: 15px; }
.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-group label { font-size: 0.85rem; font-weight: bold; color: var(--muted); }

/* 兩欄一排排版 */
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

input, select { padding: 10px 12px; border-radius: 10px; border: 1px solid #ddd; outline: none; font-size: 0.95rem; }
.filter-bar { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 20px; }

.btn { padding: 12px 20px; border-radius: 50px; border: none; cursor: pointer; font-weight: bold; display: inline-flex; align-items: center; gap: 8px; transition: 0.2s;}
.btn-login { background: var(--p-blue); }
.btn-submit { background: var(--p-pink); color: white; width: 100%; justify-content: center; font-size: 1.1rem; }
.btn-submit:disabled { background: #eee; color: #ccc; }
.btn-outline { background: white; border: 1px solid #ddd; }

/* 公司資金總覽卡片 */
.company-balances-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}
.company-card {
  padding: 20px;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  color: var(--text);
}
.company-name { font-size: 1.1rem; font-weight: bold; margin-bottom: 8px; opacity: 0.9; }
.company-amount { font-size: 1.6rem; font-weight: 900; }

.stats-container { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 25px; }
.stat-item { padding: 20px; border-radius: 18px; text-align: center; }
.stat-value { font-size: 1.4rem; font-weight: 800; margin-top:5px; }
.inc { background: var(--p-mint); color:#2e7d32;}
.exp { background: var(--p-pink); color:#c62828;}

.table-scroll { overflow-x: auto; border-radius: 15px; background: white; }
.macaron-table { width: 100%; border-collapse: collapse; min-width: 800px; }
.macaron-table th { background: #fcf8ff; padding: 15px 10px; text-align: center; font-size: 0.85rem; color: var(--muted); white-space: nowrap;}
.macaron-table td { padding: 12px 10px; border-bottom: 1px solid #f3f0f7; text-align: center; font-size: 0.9rem;}
.tag-bank { background: var(--p-blue); padding: 3px 10px; border-radius: 50px; font-size: 0.8rem; white-space: nowrap; }
.text-out { color: #e57373; font-weight: bold; }
.text-in { color: #81c784; font-weight: bold; }
.status-text { font-size: 0.8rem; text-align: center; margin-top: 10px; }

/* 響應式：手機畫面變回單排 */
@media (max-width: 768px) { 
  .main-grid { grid-template-columns: 1fr; }
  .row-2 { grid-template-columns: 1fr; } 
  .filter-bar { grid-template-columns: 1fr; }
}
