* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; color: #0a2540; }

.container { width: min(1120px, 92%); margin: 0 auto; }

.site-header { background: #0a2540; color: #fff; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 10px; }
.logo { height: 28px; width: auto; display: block; }
.brand-text h1 { margin: 0; font-size: 20px; }
.brand-text p { margin: 2px 0 0; opacity: 0.8; font-size: 12px; }
.nav a { color: #fff; text-decoration: none; margin-left: 16px; padding: 6px 10px; border-radius: 6px; }
.nav a:hover, .nav a.active { background: rgba(255,255,255,0.12); }

.hero { background: linear-gradient(135deg, #e0f2fe, #f0f9ff); padding: 60px 0; text-align: center; }
.hero h2 { margin: 0 0 8px; font-size: 34px; color: #082a4a; }
.hero p { margin: 0 0 16px; color: #214d72; }
.btn { display: inline-block; background: #0a2540; color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none; border: none; cursor: pointer; }
.btn:hover { opacity: 0.9; }
.btn.outline { background: transparent; color: #0a2540; border: 1px solid #0a2540; }

.section { padding: 40px 0; }
.section.alt { background: #f8fafc; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; align-items: start; }
.list { margin: 10px 0 0; padding-left: 18px; }

.cards { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card { display: block; padding: 18px; border: 1px solid #e2e8f0; border-radius: 12px; text-decoration: none; color: inherit; background: #fff; transition: box-shadow 0.2s ease, transform 0.1s ease; }
.card:hover { box-shadow: 0 8px 24px rgba(2, 8, 23, 0.08); transform: translateY(-2px); }
.card h3 { margin: 0 0 6px; }
.card p { margin: 0; color: #475569; }

.site-footer { border-top: 1px solid #e2e8f0; padding: 16px 0; text-align: center; color: #475569; }

/* Enhanced theme and components */
:root {
  --brand: #0a2540;
  --brand-900: #071a2b;
  --accent: #0ea5e9;
  --muted: #475569;
  --border: #e2e8f0;
  --bg: #f8fafc;
}

.site-header { 
  position: relative; 
  background: var(--brand); 
}
.nav a { margin-left: 18px; padding: 8px 12px; border-radius: 8px; }
.nav a:hover, .nav a.active { background: rgba(255,255,255,0.14); }

.hero { background: radial-gradient(1200px 400px at 50% -10%, #e0f2fe, transparent), linear-gradient(135deg, #e0f2fe, #f8fbff); padding: 72px 0; }
.hero h2 { font-size: 36px; color: var(--brand-900); }
.hero p { color: #214d72; }

.btn { background: var(--brand); transition: transform .04s ease, opacity .2s ease; }
.btn:hover { transform: translateY(-1px); opacity: .95; }
.btn.outline { color: var(--brand); border-color: var(--brand); }
.btn.outline:hover { background: rgba(10,37,64,.06); }

.card { border-color: var(--border); }
.card h3 { color: var(--brand-900); }
.card p { color: var(--muted); }

/* Homepage components */
.section-title { margin: 0 0 16px; font-size: 22px; color: var(--brand-900); text-align: left; }
.hero .actions { margin-top: 14px; display: inline-flex; gap: 10px; flex-wrap: wrap; }

.stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stat { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 18px; text-align: center; box-shadow: 0 6px 18px rgba(2,8,23,0.04); }
.stat-value { font-size: 28px; font-weight: 700; color: var(--brand-900); }
.stat-label { margin-top: 6px; color: var(--muted); font-size: 13px; }

.quote { background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--accent); padding: 18px; border-radius: 10px; color: #0a2540; }

.news { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.news-card { display: block; padding: 16px; border: 1px solid var(--border); border-radius: 12px; text-decoration: none; color: inherit; background: #fff; transition: box-shadow .2s ease, transform .1s ease; }
.news-card:hover { box-shadow: 0 8px 24px rgba(2,8,23,.08); transform: translateY(-2px); }
.news-card h4 { margin: 0 0 6px; color: var(--brand-900); }
.news-card p { margin: 0; color: var(--muted); }

/* Owner-only visibility */
[data-owner-only] { display: none !important; }
body.owner-logged [data-owner-only] { display: inline-block !important; }

/* Mobile navigation */
.nav-toggle { display: none; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.4); padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.nav-toggle:hover { background: rgba(255,255,255,0.12); }

@media (max-width: 768px) {
  .site-header .container { align-items: flex-start; gap: 10px; }
  .nav-toggle { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
  .nav { position: absolute; left: 4%; right: 4%; top: 68px; background: var(--brand); border: 1px solid rgba(255,255,255,0.14); border-radius: 12px; padding: 8px; display: none; flex-direction: column; z-index: 10; }
  .nav.open { display: flex; }
  .nav a { margin: 4px 2px; }
}

/* Hero slider */
.hero .slider { position: relative; }
.hero .slide { display: none; }
.hero .slide.active { display: block; animation: heroFade .6s ease; }
@keyframes heroFade { from { opacity: 0 } to { opacity: 1 } }

/* Invoices page: expanded card actions */
.card.expanded { box-shadow: 0 10px 28px rgba(2,8,23,0.10); }
.card-expander { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.subcards { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.subcard { padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: #f8fafc; cursor: pointer; font-size: 14px; color: var(--brand-900); }
.subcard:hover { background: #eef6ff; }

.designation-manager { display: none; border: 1px solid var(--border); border-radius: 12px; background: #fff; padding: 12px; box-shadow: 0 6px 18px rgba(2,8,23,0.06); }
.designation-manager.open { display: block; }
.dm-head { margin-bottom: 10px; color: var(--brand-900); }
.dm-form { display: grid; grid-template-columns: 1fr 120px auto; gap: 8px; margin-bottom: 10px; }
.dm-form input { border: 1px solid var(--border); border-radius: 8px; padding: 8px; font-size: 14px; }
.dm-form .btn { padding: 8px 12px; }
.dm-list { display: grid; gap: 8px; }
.dm-item { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; background: #fff; }
.dm-item-info { display: flex; gap: 10px; align-items: baseline; }
.dm-item-name { font-weight: 600; }
.dm-item-pu { color: var(--muted); font-size: 13px; }
.dm-del { background: transparent; border: none; cursor: pointer; font-size: 16px; }
.dm-empty { color: var(--muted); margin: 0; }
