/* ===== Reset & Base ===== */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;font-size:16px;-webkit-text-size-adjust:100%}
body{font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;line-height:1.6;color:#1e293b;background:#f8fafc;min-height:100vh;display:flex;flex-direction:column}
img,svg{display:block;max-width:100%}
button,input{font:inherit;color:inherit}
a{color:inherit;text-decoration:none}
ul,ol{list-style:none}

/* ===== Skip Link ===== */
.skip-link{position:absolute;top:-100%;left:1rem;background:#1e40af;color:#fff;padding:0.5rem 1rem;border-radius:0 0 0.375rem 0.375rem;z-index:1000;font-weight:600;transition:top 0.2s}
.skip-link:focus{top:0}

/* ===== Container ===== */
.container{width:100%;max-width:1100px;margin:0 auto;padding:0 1.25rem}

/* ===== Header ===== */
.site-header{background:#fff;border-bottom:1px solid #e2e8f0;position:sticky;top:0;z-index:100;box-shadow:0 1px 4px rgba(0,0,0,0.04)}
.header-inner{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:0.75rem;padding:0.875rem 0}
.logo-area{display:flex;align-items:center;gap:0.625rem}
.logo-icon{font-size:1.75rem;line-height:1}
.site-title{font-weight:700;font-size:1.15rem;color:#0f172a;line-height:1.2}
.site-tagline{font-size:0.8rem;color:#64748b;line-height:1.2}
.site-nav{display:flex;gap:1.25rem;flex-wrap:wrap}
.site-nav a{font-size:0.9rem;font-weight:500;color:#475569;padding:0.375rem 0;border-bottom:2px solid transparent;transition:color 0.2s,border-color 0.2s}
.site-nav a:hover,.site-nav a:focus-visible{color:#1e40af;border-bottom-color:#1e40af;outline:none}

/* ===== Hero ===== */
.hero{background:linear-gradient(135deg,#eff6ff 0%,#dbeafe 50%,#ede9fe 100%);padding:3rem 0 3.5rem;border-bottom:1px solid #e2e8f0}
.hero-grid{display:grid;grid-template-columns:1fr 1fr;gap:2.5rem;align-items:center}
.hero-text h1{font-size:2.2rem;font-weight:800;color:#0f172a;line-height:1.2;margin-bottom:1rem;letter-spacing:-0.02em}
.hero-lead{font-size:1.05rem;color:#475569;max-width:48ch;margin-bottom:1.5rem;line-height:1.65}
.hero-stats{display:flex;gap:2rem;flex-wrap:wrap}
.stat{text-align:center;background:#fff;padding:0.75rem 1.25rem;border-radius:0.75rem;box-shadow:0 2px 8px rgba(0,0,0,0.06);min-width:100px}
.stat-number{display:block;font-size:1.75rem;font-weight:800;color:#1e40af;line-height:1.1}
.stat-label{display:block;font-size:0.75rem;color:#64748b;text-transform:uppercase;letter-spacing:0.04em;margin-top:0.25rem}
.hero-visual{display:flex;justify-content:center;align-items:center}
.hero-card{background:#fff;border-radius:1rem;padding:1.5rem 2rem;box-shadow:0 8px 30px rgba(0,0,0,0.08);display:flex;flex-direction:column;gap:0.75rem;width:100%;max-width:280px}
.hero-card-dot{width:12px;height:12px;border-radius:50%}
.dot-green{background:#22c55e}
.dot-yellow{background:#eab308}
.dot-red{background:#ef4444}
.hero-card-lines{display:flex;flex-direction:column;gap:0.5rem;margin-top:0.5rem}
.line{height:8px;background:#e2e8f0;border-radius:4px;width:100%}
.line.short{width:65%}

/* ===== Section Common ===== */
.section-header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:1rem;margin-bottom:1.5rem}
.section-header h2{margin-bottom:0}
h2{font-size:1.6rem;font-weight:700;color:#0f172a;margin-bottom:0.5rem}
.section-desc{color:#64748b;margin-bottom:1.5rem;max-width:60ch}

/* ===== Filter Bar ===== */
.filter-bar{display:flex;gap:0.375rem;flex-wrap:wrap}
.filter-btn{padding:0.4rem 0.9rem;border:1px solid #cbd5e1;border-radius:2rem;background:#fff;font-size:0.8rem;font-weight:500;cursor:pointer;transition:all 0.2s;color:#475569}
.filter-btn:hover{background:#eff6ff;border-color:#93c5fd}
.filter-btn.active{background:#1e40af;color:#fff;border-color:#1e40af}

/* ===== Deadlines Section ===== */
.deadlines-section{padding:2.5rem 0}
.deadlines-list{display:flex;flex-direction:column;gap:0.875rem;min-height:100px}
.empty-state{text-align:center;color:#94a3b8;padding:2.5rem 1rem;font-size:0.95rem;background:#fff;border-radius:0.75rem;border:2px dashed #e2e8f0}

/* ===== Deadline Card ===== */
.deadline-card{background:#fff;border:1px solid #e2e8f0;border-radius:0.75rem;padding:1rem 1.25rem;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:0.75rem;transition:box-shadow 0.2s,border-color 0.2s}
.deadline-card:hover{box-shadow:0 4px 16px rgba(0,0,0,0.06);border-color:#cbd5e1}
.deadline-card[data-status="submitted"]{opacity:0.6;background:#f1f5f9;border-color:#e2e8f0}
.deadline-card[data-status="submitted"] .card-name{text-decoration:line-through}
.deadline-card.urgent{border-left:4px solid #ef4444;background:#fef2f2}
.deadline-card.soon{border-left:4px solid #eab308;background:#fffdf0}
.card-top{display:flex;align-items:center;gap:1rem;flex:1;min-width:0}
.card-info{flex:1;min-width:0}
.card-name{font-weight:700;font-size:1rem;color:#0f172a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.card-org{font-size:0.8rem;color:#64748b;margin-top:0.15rem}
.card-amount{font-size:0.85rem;font-weight:600;color:#1e40af;margin-top:0.25rem}
.card-date-badge{text-align:center;background:#f1f5f9;border-radius:0.5rem;padding:0.5rem 0.75rem;min-width:60px;flex-shrink:0}
.date-day{display:block;font-size:1.3rem;font-weight:800;color:#0f172a;line-height:1}
.date-month{display:block;font-size:0.7rem;color:#64748b;text-transform:uppercase;letter-spacing:0.05em;margin-top:0.15rem}
.card-actions{display:flex;gap:0.5rem;flex-shrink:0}
.btn{padding:0.45rem 0.85rem;border-radius:0.5rem;font-size:0.8rem;font-weight:600;cursor:pointer;border:1px solid transparent;transition:all 0.2s;white-space:nowrap}
.btn-mark{background:#f0fdf4;color:#166534;border-color:#bbf7d0}
.btn-mark:hover{background:#dcfce7}
.btn-delete{background:#fff;color:#dc2626;border-color:#fecaca}
.btn-delete:hover{background:#fef2f2}

/* ===== Add Section ===== */
.add-section{padding:2.5rem 0;background:#fff;border-top:1px solid #e2e8f0;border-bottom:1px solid #e2e8f0}
.add-form{display:flex;flex-direction:column;gap:1rem;max-width:700px}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.form-group{display:flex;flex-direction:column;gap:0.35rem}
.form-group label{font-size:0.85rem;font-weight:600;color:#334155}
.form-group label span{color:#dc2626}
.form-group input{padding:0.65rem 0.85rem;border:1px solid #cbd5e1;border-radius:0.5rem;font-size:0.9rem;transition:border-color 0.2s,box-shadow 0.2s;background:#f8fafc}
.form-group input:focus{border-color:#1e40af;box-shadow:0 0 0 3px rgba(30,64,175,0.15);outline:none;background:#fff}
.form-group input:user-invalid{border-color:#fca5a5}
.btn-primary{padding:0.7rem 1.5rem;background:#1e40af;color:#fff;font-size:0.95rem;border-radius:0.5rem;align-self:flex-start;font-weight:600;cursor:pointer;border:none;transition:background 0.2s,transform 0.1s}
.btn-primary:hover{background:#1e3a8a}
.btn-primary:active{transform:scale(0.98)}
.form-feedback{margin-top:0.5rem;font-size:0.85rem;min-height:1.2em}
.form-feedback.success{color:#166534}
.form-feedback.error{color:#dc2626}

/* ===== Tips Section ===== */
.tips-section{padding:2.5rem 0 3rem}
.tips-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:1.25rem}
.tip-card{background:#fff;border:1px solid #e2e8f0;border-radius:0.75rem;padding:1.25rem;transition:box-shadow 0.2s}
.tip-card:hover{box-shadow:0 4px 16px rgba(0,0,0,0.06)}
.tip-icon{font-size:1.5rem;display:block;margin-bottom:0.5rem}
.tip-card h3{font-size:1rem;font-weight:700;color:#0f172a;margin-bottom:0.4rem}
.tip-card p{font-size:0.85rem;color:#475569;line-height:1.55}

/* ===== Footer ===== */
.site-footer{background:#0f172a;color:#cbd5e1;padding:2rem 0 1.5rem;margin-top:auto}
.footer-grid{display:flex;justify-content:space-between;flex-wrap:wrap;gap:1.5rem;margin-bottom:1.25rem}
.footer-title{font-weight:700;font-size:1rem;color:#fff;margin-bottom:0.35rem}
.footer-desc{font-size:0.8rem;color:#94a3b8;max-width:42ch;line-height:1.5}
.footer-links{display:flex;gap:1.5rem;flex-wrap:wrap;align-items:flex-start}
.footer-links a{font-size:0.85rem;color:#cbd5e1;transition:color 0.2s;text-decoration:underline;text-underline-offset:3px}
.footer-links a:hover{color:#fff}
.footer-copy{font-size:0.75rem;color:#64748b;border-top:1px solid #1e293b;padding-top:1rem}

/* ===== Responsive ===== */
@media(max-width:768px){
  .hero-grid{grid-template-columns:1fr;gap:1.5rem}
  .hero-text h1{font-size:1.6rem}
  .hero-lead{font-size:0.95rem}
  .hero-stats{gap:0.75rem}
  .stat{padding:0.5rem 0.75rem;min-width:80px}
  .stat-number{font-size:1.3rem}
  .form-row{grid-template-columns:1fr}
  .section-header{flex-direction:column;align-items:flex-start}
  .deadline-card{flex-direction:column;align-items:stretch}
  .card-actions{justify-content:flex-end}
  .card-top{flex-direction:column;align-items:flex-start}
  .card-date-badge{align-self:flex-start}
  .footer-grid{flex-direction:column;gap:1rem}
  .site-nav{gap:0.75rem}
  .header-inner{flex-direction:column;align-items:flex-start}
}
@media(max-width:480px){
  .hero-text h1{font-size:1.35rem}
  h2{font-size:1.3rem}
  .tips-grid{grid-template-columns:1fr}
  .filter-btn{padding:0.3rem 0.65rem;font-size:0.75rem}
}

/* ===== Focus Visible ===== */
:focus-visible{outline:2px solid #1e40af;outline-offset:2px;border-radius:2px}

/* ===== Print ===== */
@media print{
  .site-header,.site-footer,.add-section,.filter-bar,.card-actions{display:none}
  .deadline-card{break-inside:avoid;border:1px solid #000}
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.site-utility-links {
  width: min(900px, calc(100% - 32px));
  margin: 32px auto;
  padding-top: 16px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(127, 127, 127, 0.25);
  font-size: 0.9rem;
}

.site-utility-links a {
  color: inherit;
  opacity: 0.75;
}
