/* AcceptMyMOI - Bootstrap 5 theme (logo colours: navy, blue, green, gold) */
:root {
  --amm-primary: #0b2a5e;          /* logo navy "AcceptMy" */
  --amm-primary-rgb: 11, 42, 94;
  --amm-primary-dark: #071c40;
  --amm-blue: #1468c2;             /* logo blue figure */
  --amm-blue-rgb: 20, 104, 194;
  --amm-accent: #22913a;           /* logo green "MOI" */
  --amm-accent-rgb: 34, 145, 58;
  --amm-accent-dark: #1a7330;
  --amm-accent-light: #4cb35a;
  --amm-gold: #c9962e;             /* logo gold gift */
  --amm-gold-light: #e8c46a;
  --amm-gold-soft: #fbf3df;
  --amm-bg: #f3f6fb;
  --amm-border: #e2e8f1;
  --amm-muted: #6b7890;
  --amm-sidebar-w: 260px;
  --bs-primary: #0b2a5e;
  --bs-primary-rgb: 11, 42, 94;
  --bs-success: #22913a;
  --bs-success-rgb: 34, 145, 58;
  --bs-link-color: #1468c2;
  --bs-link-color-rgb: 20, 104, 194;
  --bs-link-hover-color: #0b2a5e;
  --bs-link-hover-color-rgb: 11, 42, 94;
  --bs-body-font-family: 'Poppins', 'Noto Sans Tamil', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

body { background: var(--amm-bg); font-size: .925rem; color: #1f2a3d; }
.ta, [lang="ta"] { font-family: 'Noto Sans Tamil', 'Poppins', sans-serif; }
.text-primary { color: var(--amm-primary) !important; }
.bg-primary { background-color: var(--amm-primary) !important; }
.text-accent { color: var(--amm-accent) !important; }
.text-gold { color: var(--amm-gold) !important; }
.bg-gold-soft { background: var(--amm-gold-soft) !important; }
.text-muted { color: var(--amm-muted) !important; }
.fw-semibold { font-weight: 600 !important; }

/* Buttons */
.btn { border-radius: .6rem; font-weight: 500; }
.btn-primary {
  --bs-btn-bg: var(--amm-primary); --bs-btn-border-color: var(--amm-primary);
  --bs-btn-hover-bg: var(--amm-blue); --bs-btn-hover-border-color: var(--amm-blue);
  --bs-btn-active-bg: var(--amm-primary-dark); --bs-btn-active-border-color: var(--amm-primary-dark);
  --bs-btn-disabled-bg: var(--amm-primary); --bs-btn-disabled-border-color: var(--amm-primary);
  --bs-btn-focus-shadow-rgb: var(--amm-primary-rgb);
}
.btn-outline-primary {
  --bs-btn-color: var(--amm-primary); --bs-btn-border-color: var(--amm-primary);
  --bs-btn-hover-bg: var(--amm-primary); --bs-btn-hover-border-color: var(--amm-primary);
  --bs-btn-active-bg: var(--amm-primary); --bs-btn-active-border-color: var(--amm-primary);
  --bs-btn-focus-shadow-rgb: var(--amm-primary-rgb);
}
.btn-accent {
  --bs-btn-color: #fff; --bs-btn-bg: var(--amm-accent); --bs-btn-border-color: var(--amm-accent);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--amm-accent-dark); --bs-btn-hover-border-color: var(--amm-accent-dark);
  --bs-btn-active-color: #fff; --bs-btn-active-bg: #145c26; --bs-btn-active-border-color: #145c26;
  --bs-btn-focus-shadow-rgb: var(--amm-accent-rgb);
  box-shadow: 0 4px 12px rgba(var(--amm-accent-rgb), .25);
}
.btn-soft { background: rgba(var(--amm-blue-rgb), .08); color: var(--amm-primary); border: 0; }
.btn-soft:hover { background: rgba(var(--amm-blue-rgb), .16); color: var(--amm-primary); }

/* Forms */
.form-control, .form-select { border-radius: .6rem; border-color: #d8e0ec; }
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: rgba(var(--amm-blue-rgb), .6);
  box-shadow: 0 0 0 .2rem rgba(var(--amm-blue-rgb), .15);
}
.form-check-input:checked { background-color: var(--amm-accent); border-color: var(--amm-accent); }
.form-label { font-weight: 500; font-size: .85rem; color: #46546a; margin-bottom: .3rem; }
.form-control-xl { font-size: 1.2rem; padding: .7rem 1rem; border-radius: .75rem; }
.nav-pills .nav-link.active, .nav-pills .show > .nav-link { background: var(--amm-primary); }
.nav-pills .nav-link { color: #46546a; }
.nav-tabs .nav-link.active { color: var(--amm-primary); font-weight: 600; }

/* Brand */
.brand-img { height: 40px; width: auto; display: block; }
.brand-mark { height: 34px; width: auto; }

/* Sidebar (white, so the full-colour logo sits on its native background) */
.amm-sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; width: var(--amm-sidebar-w); z-index: 1040;
  background: #fff; border-right: 1px solid var(--amm-border); color: #1f2a3d;
  display: flex; flex-direction: column; transition: transform .25s ease;
}
.amm-sidebar .brand { padding: 1rem 1.1rem .85rem; border-bottom: 1px solid var(--amm-border); }
.amm-sidebar .brand a { text-decoration: none; display: block; }
.amm-sidebar .brand .brand-img { height: auto; width: 100%; max-width: 220px; }
.amm-sidebar .brand small { display: block; color: var(--amm-muted); font-size: .7rem; margin-top: .45rem; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amm-sidebar .nav { padding: .75rem; gap: .15rem; overflow-y: auto; flex: 1; flex-wrap: nowrap; }
.amm-sidebar .nav-link { color: #46546a; border-radius: .6rem; padding: .65rem .9rem; display: flex; align-items: center; gap: .75rem; font-weight: 500; position: relative; }
.amm-sidebar .nav-link i { font-size: 1.1rem; color: #8a97ab; }
.amm-sidebar .nav-link:hover { background: #f1f5fb; color: var(--amm-primary); }
.amm-sidebar .nav-link:hover i { color: var(--amm-blue); }
.amm-sidebar .nav-link.active { background: linear-gradient(90deg, var(--amm-primary), var(--amm-blue)); color: #fff; box-shadow: 0 6px 16px rgba(var(--amm-primary-rgb), .25); }
.amm-sidebar .nav-link.active i { color: #fff; }
.amm-sidebar .nav-link.active::before { content: ""; position: absolute; left: -.75rem; top: 20%; bottom: 20%; width: 4px; border-radius: 0 4px 4px 0; background: var(--amm-accent); }
.amm-sidebar .nav-section { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #9aa6b8; padding: .9rem .9rem .3rem; }
.sidebar-foot { margin: .75rem; padding: .9rem 1rem; border-radius: .8rem; font-size: .82rem; background: linear-gradient(135deg, var(--amm-primary), var(--amm-blue)); color: #fff; }
.sidebar-foot .text-white-50 { color: rgba(255, 255, 255, .65) !important; }
.sidebar-foot a { color: var(--amm-gold-light) !important; }

.amm-main { margin-left: var(--amm-sidebar-w); min-height: 100vh; }
.amm-topbar {
  position: sticky; top: 0; z-index: 1020; background: rgba(255, 255, 255, .95); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--amm-border); padding: .6rem 1.25rem; display: flex; align-items: center; gap: .6rem;
}
.amm-topbar h1 { font-size: 1.12rem; margin: 0; font-weight: 600; color: var(--amm-primary); }
.amm-content { padding: 1.25rem; }
.amm-backdrop { display: none; }
.lang-switch .btn { min-width: 58px; }

@media (max-width: 991.98px) {
  .amm-sidebar { transform: translateX(-100%); }
  body.sidebar-open .amm-sidebar { transform: none; }
  body.sidebar-open .amm-backdrop { display: block; position: fixed; inset: 0; background: rgba(7, 28, 64, .45); z-index: 1035; }
  .amm-main { margin-left: 0; }
  .amm-content { padding: 1rem .8rem; }
  body.has-bottomnav .amm-content { padding-bottom: 6.5rem; }
  .amm-topbar { padding: .55rem .8rem; }
}

/* Mobile bottom navigation (tenant / mobile app look) */
.amm-bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; background: #fff; border-top: 1px solid var(--amm-border);
  display: flex; justify-content: space-around; align-items: flex-end;
  padding: .4rem .25rem calc(.4rem + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(11, 42, 94, .06);
}
.amm-bottomnav a { flex: 1; text-align: center; color: #7d8aa0; text-decoration: none; font-size: .68rem; display: flex; flex-direction: column; align-items: center; gap: .1rem; line-height: 1.15; }
.amm-bottomnav a i { font-size: 1.3rem; }
.amm-bottomnav a.active { color: var(--amm-primary); font-weight: 600; }
.amm-bottomnav .fab-btn {
  width: 56px; height: 56px; border-radius: 50%; margin-top: -1.9rem; margin-bottom: .1rem;
  background: linear-gradient(135deg, var(--amm-accent-light), var(--amm-accent-dark)); color: #fff;
  display: flex; align-items: center; justify-content: center; border: 4px solid #fff;
  box-shadow: 0 6px 16px rgba(var(--amm-accent-rgb), .45);
}
.amm-bottomnav .fab-btn i { font-size: 1.5rem; }

/* Cards & widgets */
.card { border: 0; border-radius: 1rem; box-shadow: 0 1px 2px rgba(11, 42, 94, .04), 0 4px 16px rgba(11, 42, 94, .06); }
.card-header { background: transparent; border-bottom: 1px solid #edf1f7; font-weight: 600; padding: .9rem 1.25rem; color: var(--amm-primary); }
.card-header:first-child { border-radius: 1rem 1rem 0 0; }
.card-footer { background: transparent; border-top: 1px solid #edf1f7; }
.stat-card .stat-icon { width: 48px; height: 48px; border-radius: .85rem; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; flex-shrink: 0; }
.stat-card .stat-value { font-size: 1.4rem; font-weight: 700; line-height: 1.2; color: var(--amm-primary); }
.stat-card .stat-label { color: var(--amm-muted); font-size: .8rem; }
.ic-cash { background: #e6f4e9; color: var(--amm-accent); }
.ic-gold { background: #fbf1d9; color: #a87a1c; }
.ic-silver { background: #eef1f5; color: #6c7786; }
.ic-gift { background: #fde8ee; color: #c2185b; }
.ic-primary { background: rgba(var(--amm-blue-rgb), .1); color: var(--amm-primary); }
.ic-info { background: #e3effb; color: var(--amm-blue); }

.hero-band {
  background: linear-gradient(115deg, var(--amm-primary) 0%, var(--amm-blue) 70%, var(--amm-accent) 140%); color: #fff;
  border-radius: 1rem; position: relative; overflow: hidden;
}
.hero-band::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 196, 106, .45) 0 2px, transparent 3px) 0 0 / 18px 18px;
  opacity: .7;
}
.hero-band > * { position: relative; z-index: 1; }

.table > :not(caption) > * > * { padding: .7rem .75rem; }
.table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: #6b7890; font-weight: 600; background: #f6f8fc; border-bottom: 0; white-space: nowrap; }
.table-hover tbody tr:hover > * { background: #f8fafe; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; background: rgba(var(--amm-blue-rgb), .12); color: var(--amm-primary); font-size: .8rem; flex-shrink: 0; }
.avatar-sm { width: 28px; height: 28px; font-size: .7rem; }

.badge-soft-success { background: #e3f4e7; color: #1a7330; }
.badge-soft-danger { background: #fde4e6; color: #b02a37; }
.badge-soft-warning { background: #fdf1d6; color: #85600f; }
.badge-soft-primary { background: rgba(var(--amm-blue-rgb), .12); color: var(--amm-primary); }
.badge-soft-secondary { background: #eceff4; color: #56627a; }
.badge-soft-info { background: #e1eefb; color: #11589f; }
.badge-soft-dark { background: #dde2ea; color: #1f2a3d; }
.type-badge { font-weight: 500; }
.type-cash { background: #e3f4e7; color: #1a7330; }
.type-gold { background: #fbefcf; color: #85600f; }
.type-silver { background: #eceff3; color: #50596a; }
.type-gift { background: #fde4ec; color: #ad1457; }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 5px; animation: pulse 1.2s infinite; vertical-align: middle; }
@keyframes pulse { 50% { opacity: .25; } }

/* Function cards */
.fn-date { width: 62px; border-radius: .75rem; background: rgba(var(--amm-blue-rgb), .08); text-align: center; padding: .45rem 0; color: var(--amm-primary); flex-shrink: 0; border-bottom: 3px solid var(--amm-gold); }
.fn-date .d { font-size: 1.4rem; font-weight: 700; line-height: 1; }
.fn-date .m { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; }
.function-card { transition: transform .15s, box-shadow .15s; }
.function-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(11, 42, 94, .12); }

/* Collection entry */
.type-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; }
.type-picker input { position: absolute; opacity: 0; pointer-events: none; }
.type-picker label {
  display: block; border: 2px solid var(--amm-border); border-radius: .9rem; padding: .7rem .25rem; text-align: center;
  cursor: pointer; background: #fff; transition: .15s; font-weight: 600; font-size: .9rem; user-select: none;
}
.type-picker label i { display: block; font-size: 1.6rem; margin-bottom: .15rem; }
.type-picker label:hover { border-color: rgba(var(--amm-blue-rgb), .45); }
.type-picker input:checked + label { border-color: var(--amm-accent); background: rgba(var(--amm-accent-rgb), .06); color: var(--amm-primary); box-shadow: 0 0 0 3px rgba(var(--amm-accent-rgb), .15); }
.type-picker input:focus-visible + label { outline: 2px solid var(--amm-blue); outline-offset: 2px; }
.type-picker input:disabled + label { opacity: .35; cursor: not-allowed; }
.chip-row .btn { border-radius: 2rem; padding: .25rem .8rem; }
.ta-preview { font-size: .9rem; color: var(--amm-accent-dark); min-height: 1.3rem; font-family: 'Noto Sans Tamil', sans-serif; }
.entry-list .entry { border-bottom: 1px dashed #e2e8f1; padding: .6rem 0; }
.entry-list .entry:last-child { border-bottom: 0; }
.kbd-hint kbd { background: #e8edf5; color: #46546a; font-size: .7rem; }

.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--amm-muted); }
.empty-state i { font-size: 2.5rem; color: #c9d3e1; display: block; margin-bottom: .5rem; }

.modal-content { border: 0; border-radius: 1rem; }
.modal-header { border-bottom-color: #edf1f7; }
.modal-header .modal-title { color: var(--amm-primary); }
.modal-footer { border-top-color: #edf1f7; }
.section-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--amm-muted); font-weight: 600; }

/* Landing page */
.landing-nav { background: rgba(255, 255, 255, .97); backdrop-filter: blur(8px); box-shadow: 0 1px 0 var(--amm-border); }
.landing-nav .navbar-brand { display: flex; align-items: center; padding: .2rem 0; }
.landing-nav .brand-img { height: 52px; }
.badge-gold { background: var(--amm-gold-light); color: var(--amm-primary-dark); }
.landing-nav .nav-link { color: #46546a; font-weight: 500; }
.landing-nav .nav-link:hover { color: var(--amm-blue); }
.landing-hero {
  background: radial-gradient(900px 420px at 90% 0%, rgba(var(--amm-accent-rgb), .35), transparent 60%),
              radial-gradient(700px 380px at 0% 100%, rgba(201, 150, 46, .22), transparent 60%),
              linear-gradient(135deg, var(--amm-primary-dark) 0%, var(--amm-primary) 50%, var(--amm-blue) 100%);
  color: #fff; padding: 6rem 0 5rem; position: relative; overflow: hidden;
}
.landing-hero h1 { font-weight: 700; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.15; }
.landing-hero .lead { color: rgba(255, 255, 255, .85); }
.hero-phone { max-width: 300px; margin: 0 auto; background: #fff; color: #1f2a3d; border-radius: 2rem; padding: 1rem; border: 8px solid #061633; box-shadow: 0 30px 60px rgba(0, 0, 0, .35); }
.feature-icon { width: 56px; height: 56px; border-radius: 1rem; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.section-pad { padding: 4.5rem 0; }
.kolam-divider { height: 14px; background: radial-gradient(circle, var(--amm-gold) 2px, transparent 3px) 0 0 / 16px 14px; opacity: .5; }
.price-card.popular { border: 2px solid var(--amm-accent) !important; transform: translateY(-6px); }
.footer-dark { background: var(--amm-primary-dark); color: rgba(255, 255, 255, .7); }
.footer-dark a { color: rgba(255, 255, 255, .85); text-decoration: none; }

/* Module layout page */
.module-card { border-top: 4px solid var(--amm-primary) !important; height: 100%; }
.module-card.gold { border-top-color: var(--amm-gold) !important; }
.module-card.info { border-top-color: var(--amm-accent) !important; }
.module-card ul { padding-left: 1.1rem; margin-bottom: 0; }
.module-card li { margin-bottom: .2rem; }
.arch-box { border: 2px dashed #cfd9e8; border-radius: 1rem; padding: 1rem; background: #fff; text-align: center; height: 100%; }
.arch-box .bi { font-size: 1.8rem; color: var(--amm-blue); }
.arch-arrow { text-align: center; color: var(--amm-accent); font-size: 1.6rem; }

/* Mobile preview */
.phone-frame { width: 390px; height: 800px; border: 12px solid #061633; border-radius: 2.6rem; overflow: hidden; background: #fff; box-shadow: 0 25px 50px rgba(0, 0, 0, .25); position: relative; flex-shrink: 0; }
.phone-frame::before { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 120px; height: 22px; background: #061633; border-radius: 0 0 14px 14px; z-index: 2; }
.phone-frame iframe { width: 100%; height: 100%; border: 0; }

@media print {
  .amm-sidebar, .amm-topbar, .amm-bottomnav, .no-print { display: none !important; }
  .amm-main { margin: 0; }
  body { background: #fff; }
  .card { box-shadow: none; }
}
