/* Laxmi Centre portal — modest practical UI */
:root {
  --bg: #f4f5f7;
  --surface: #fff;
  --border: #d8dde5;
  --text: #1a1d21;
  --muted: #5c6570;
  --accent: #1e4d7b;
  --accent-hover: #163a5c;
  --sidebar-w: 220px;
  --topbar-h: 52px;
  --danger: #b33;
  --ok: #0a7;
  --radius: 6px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.45;
  font-size: 15px;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Login */
.login-wrap {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.login-card h1 {
  margin: 0 0 .25rem;
  font-size: 1.35rem;
  color: var(--accent);
}
.login-card .tagline {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: .9rem;
}
label { display: block; font-weight: 600; margin: 0 0 .35rem; font-size: .9rem; }
input[type=text],
input[type=password],
input[type=email] {
  width: 100%;
  padding: .55rem .65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  margin-bottom: 1rem;
  background: #fff;
}
input:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 35%, white);
  border-color: var(--accent);
}
.btn {
  display: inline-block;
  border: none;
  border-radius: var(--radius);
  padding: .55rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
}
.btn:hover { background: var(--accent-hover); }
.btn-block { width: 100%; }
.alert {
  padding: .65rem .75rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: .9rem;
}
.alert-error { background: #fde8e8; color: var(--danger); border: 1px solid #f5c2c2; }
.alert-ok { background: #e6f6ef; color: #066; border: 1px solid #b7e2d0; }

/* Shell layout */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--topbar-h) 1fr;
  height: 100vh;
  height: 100dvh;
}
.topbar {
  grid-column: 1 / -1;
  grid-row: 1;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  gap: 1rem;
}
.topbar .brand { font-weight: 700; font-size: 1.05rem; letter-spacing: .02em; }
.topbar .user-area {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .9rem;
}
.topbar .user-area a {
  color: #fff;
  border: 1px solid rgba(255,255,255,.45);
  padding: .25rem .6rem;
  border-radius: var(--radius);
  text-decoration: none;
}
.topbar .user-area a:hover { background: rgba(255,255,255,.12); }
.sidebar {
  grid-column: 1;
  grid-row: 2;
  background: #243447;
  color: #dfe6ee;
  padding: .75rem 0;
  overflow-y: auto;
}
.sidebar nav a,
.sidebar nav span {
  display: block;
  padding: .55rem 1rem;
  color: #dfe6ee;
  text-decoration: none;
  border-left: 3px solid transparent;
  font-size: .92rem;
}
.sidebar nav a:hover {
  background: rgba(255,255,255,.06);
  text-decoration: none;
}
.sidebar nav a.active {
  background: rgba(255,255,255,.1);
  border-left-color: #7eb6e8;
  font-weight: 600;
}
.sidebar nav .disabled {
  color: #7a8694;
  cursor: default;
}
.sidebar .nav-section {
  margin: .75rem 1rem .25rem;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #8a96a3;
}
.main {
  grid-column: 2;
  grid-row: 2;
  background: var(--bg);
  min-width: 0;
  min-height: 0;
}
.main iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: var(--bg);
}

/* Pages inside iframe */
.page {
  padding: 1.25rem 1.5rem 2rem;
  max-width: 720px;
}
.page h1 {
  margin: 0 0 .5rem;
  font-size: 1.35rem;
  color: var(--accent);
}
.page p.lead { color: var(--muted); margin-top: 0; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 1rem;
}
.form-row { margin-bottom: 1rem; }
.form-actions { margin-top: 1.25rem; }
.muted { color: var(--muted); font-size: .9rem; }
table.settings-meta { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.settings-meta th, table.settings-meta td {
  text-align: left; padding: .35rem 0; border-bottom: 1px solid var(--border);
}
table.settings-meta th { width: 40%; color: var(--muted); font-weight: 600; }

/* Documents module */
.page-wide { max-width: 960px; }
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
  margin: .75rem 0 1rem;
  font-size: .95rem;
}
.breadcrumb a { font-weight: 600; }
.breadcrumb .bc-sep { color: var(--muted); }
.breadcrumb .bc-current { font-weight: 700; color: var(--text); }
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 1rem;
  align-items: flex-start;
}
.panel-details { position: relative; }
.panel-details > summary {
  list-style: none;
  cursor: pointer;
}
.panel-details > summary::-webkit-details-marker { display: none; }
.panel-details[open] > summary { margin-bottom: .5rem; }
.panel-details .inline-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  max-width: 520px;
}
.panel-details .inline-form input[type=text],
.panel-details .inline-form input[type=file] {
  margin-bottom: 0;
  flex: 1 1 180px;
  min-width: 140px;
}
.btn-secondary {
  background: #fff;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-secondary:hover {
  background: #eef3f8;
  color: var(--accent-hover);
}
.card-flush { padding: 0; overflow: hidden; }
.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
.doc-table th,
.doc-table td {
  text-align: left;
  padding: .65rem .9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.doc-table th {
  background: #f0f3f7;
  color: var(--muted);
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.doc-table tr:last-child td { border-bottom: none; }
.doc-table .empty-row { padding: 1.25rem .9rem; }
.doc-table .actions {
  white-space: nowrap;
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  align-items: center;
}
.doc-folder { font-weight: 600; }
.inline-action { display: inline; margin: 0; }
.link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
}
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--danger); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Folder visibility badges */
.vis-badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  padding: .15rem .45rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f0f3f7;
  color: var(--muted);
  vertical-align: middle;
  white-space: nowrap;
}
.vis-owner { background: #e8f5e9; color: #2e7d32; border-color: #c8e6c9; }
.vis-committee { background: #e3f2fd; color: #1565c0; border-color: #bbdefb; }
.vis-executive { background: #fff3e0; color: #e65100; border-color: #ffe0b2; }
.vis-admin { background: #fce4ec; color: #c62828; border-color: #f8bbd9; }
.breadcrumb .vis-badge { margin-left: .5rem; }
.vis-edit { display: inline-block; margin-left: .35rem; vertical-align: middle; }
.vis-edit > summary { list-style: none; cursor: pointer; }
.vis-edit > summary::-webkit-details-marker { display: none; }
.vis-edit-inline { display: inline-block; margin-left: .35rem; }
.vis-edit-inline > summary { list-style: none; cursor: pointer; font-size: .8rem; }
.vis-edit-inline > summary::-webkit-details-marker { display: none; }
.panel-details .inline-form select,
.vis-edit .inline-form select,
.vis-edit-inline .inline-form select {
  margin-bottom: 0;
  padding: .35rem .5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  font: inherit;
}
