/* Tech Rajeshwar Admin */
:root {
  --navy: #0b2148; --navy-2: #12305f; --amber: #d97706; --amber-2: #f5b754; --amber-ink: #b45309;
  --ink: #111827; --ink-2: #374151; --muted: #6b7280; --line: #e7e3db; --line-2: #f0ece5;
  --bg: #f6f5f2; --card: #ffffff; --soft: #faf9f6;
  --green: #15803d; --green-bg: #dcfce7; --red: #b91c1c; --red-bg: #fee2e2; --blue: #1d4ed8; --blue-bg: #dbeafe;
  --violet: #6d28d9; --violet-bg: #ede9fe; --teal: #0f766e; --teal-bg: #ccfbf1; --amber-bg: #fef3c7; --grey-bg: #f1f0ec;
  --radius: 12px; --shadow: 0 1px 2px rgba(11, 33, 72, .05), 0 8px 24px rgba(11, 33, 72, .05);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif; font-size: 14px; color: var(--ink); background: var(--bg); line-height: 1.5; }
a { color: var(--navy); }
.ic { width: 18px; height: 18px; flex-shrink: 0; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hide { display: none !important; }

/* Shell */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--navy); color: #cbd5e1; display: flex; flex-direction: column; padding: 18px 14px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .08); margin-bottom: 10px; }
.brand img { height: 44px; width: auto; margin-left: -6px; }
.brand span { color: var(--amber-2); font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; border: 1px solid rgba(245, 183, 84, .4); border-radius: 6px; padding: 2px 6px; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-sec { font-size: 10.5px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: #7f8ba3; padding: 14px 10px 6px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: #d6deea; text-decoration: none; font-weight: 500; transition: background .15s, color .15s; }
.nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-link.is-active { background: rgba(245, 183, 84, .14); color: #fff; box-shadow: inset 3px 0 0 var(--amber-2); }
.nav-link.is-active .ic { color: var(--amber-2); }
.nav-badge { margin-left: auto; background: var(--amber-2); color: var(--navy); font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
.side-site { display: flex; align-items: center; gap: 8px; color: #aab6cb; text-decoration: none; font-size: 13px; padding: 12px 10px 4px; border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 10px; }
.side-site:hover { color: #fff; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; height: 60px; padding: 0 28px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-menu { display: none; background: none; border: 0; cursor: pointer; color: var(--navy); }
.top-title { font-weight: 600; color: var(--muted); font-size: 13px; }
.top-user { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.top-me { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 4px 8px; border-radius: 10px; }
.top-me:hover { background: var(--soft); }
.top-me-txt { display: flex; flex-direction: column; line-height: 1.2; }
.top-me-txt strong { font-size: 13px; color: var(--ink); }
.top-me-txt small { font-size: 11.5px; color: var(--muted); }
.av { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; align-items: center; justify-content: center; background: var(--navy); color: var(--amber-2); font-size: 12px; font-weight: 700; flex-shrink: 0; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { color: var(--red); border-color: #f3c4c4; }
.content { padding: 26px 28px 60px; max-width: 1360px; width: 100%; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; font-weight: 700; color: var(--navy); letter-spacing: -.2px; }
.page-sub { color: var(--muted); margin-top: 3px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 600; font-size: 13.5px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s; }
.btn:hover { border-color: #cfc8ba; background: var(--soft); }
.btn .ic { width: 16px; height: 16px; }
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); border-color: var(--navy-2); }
.btn-amber { background: linear-gradient(90deg, var(--amber), var(--amber-2)); border-color: transparent; color: var(--navy); }
.btn-amber:hover { filter: brightness(1.04); border-color: transparent; }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-bg); border-color: #f3c4c4; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; height: 44px; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.link-btn { background: none; border: 0; color: var(--navy); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }

/* Cards & layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 18px; }
.card-title { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-title small { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.form-card .card-title:not(:first-of-type) { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 16px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.cols-even { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.span2 { grid-column: span 2; }
.span3 { grid-column: 1 / -1; }
.form-foot { display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.sticky-side { position: sticky; top: 78px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); text-decoration: none; color: inherit; display: block; }
a.stat:hover { border-color: #e6d3ad; }
.stat-l { color: var(--muted); font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat-l .ic { width: 16px; height: 16px; color: var(--amber-ink); }
.stat-v { font-size: 26px; font-weight: 700; color: var(--navy); margin-top: 6px; letter-spacing: -.4px; }
.stat-s { color: var(--muted); font-size: 12px; margin-top: 2px; }
.up { color: var(--green); } .down { color: var(--red); }

/* Forms */
.fld { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.fld-l { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.fld-l em { color: var(--amber-ink); font-style: normal; }
.fld-h { color: var(--muted); font-size: 12px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=url], input[type=tel], input[type=search], input:not([type]), select, textarea {
  width: 100%; font: inherit; font-size: 14px; color: var(--ink); background: #fff; border: 1px solid #ddd8ce; border-radius: 9px; padding: 9px 11px; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(217, 119, 6, .14); }
input[disabled], select[disabled] { background: var(--soft); color: var(--muted); }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; margin-bottom: 10px; }
.check input { width: 16px; height: 16px; accent-color: var(--navy); }
.counter { float: right; font-weight: 500; color: var(--muted); }
.counter.over { color: var(--red); }

/* Toolbar / filters */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar input[type=search] { width: 260px; }
.toolbar select { width: auto; min-width: 150px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.is-on { color: var(--navy); border-bottom-color: var(--amber); }
.tabs a b { font-size: 11px; background: var(--grey-bg); color: var(--ink-2); border-radius: 999px; padding: 1px 7px; margin-left: 5px; }

/* Tables */
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; margin-bottom: 18px; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); background: var(--soft); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #fcfbf8; }
.tbl .t-main { font-weight: 600; color: var(--ink); text-decoration: none; }
.tbl a.t-main:hover { color: var(--amber-ink); }
.tbl .t-sub { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.tbl .t-act { display: flex; gap: 6px; justify-content: flex-end; }
.tbl .thumb { width: 64px; height: 36px; object-fit: cover; border-radius: 6px; background: var(--grey-bg); display: block; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Badges */
.badge { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.b-green { background: var(--green-bg); color: var(--green); } .b-red { background: var(--red-bg); color: var(--red); }
.b-blue { background: var(--blue-bg); color: var(--blue); } .b-amber { background: var(--amber-bg); color: #92400e; }
.b-violet { background: var(--violet-bg); color: var(--violet); } .b-teal { background: var(--teal-bg); color: var(--teal); }
.b-grey { background: var(--grey-bg); color: var(--ink-2); }

/* Flash, empty, pager */
.flash { padding: 11px 14px; border-radius: 10px; margin-bottom: 14px; font-weight: 500; border: 1px solid; }
.flash-ok { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.flash-err { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.flash-info { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.empty { text-align: center; padding: 48px 20px; background: #fff; border: 1px dashed #d9d3c7; border-radius: var(--radius); }
.empty h3 { color: var(--navy); font-size: 16px; margin-bottom: 4px; }
.empty p { color: var(--muted); margin-bottom: 14px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: -6px 0 18px; }
.pager div { display: flex; gap: 4px; }
.pager a { display: inline-flex; min-width: 32px; height: 32px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-decoration: none; color: var(--ink-2); font-weight: 600; }
.pager a.is-on { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Lists / definition */
.dl { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; }
.dl dt { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.dl dd { color: var(--ink); word-break: break-word; }
.feed { list-style: none; }
.feed li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.feed li:last-child { border-bottom: 0; }
.feed .feed-t { flex: 1; min-width: 0; }
.feed .feed-t a { font-weight: 600; text-decoration: none; color: var(--ink); }
.feed .feed-t small { display: block; color: var(--muted); }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) 70px; gap: 10px; align-items: center; padding: 6px 0; }
.bar-row .bar-l { position: relative; padding: 5px 8px; border-radius: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bar-row .bar-l i { position: absolute; inset: 0 auto 0 0; background: #fbecd0; border-radius: 6px; z-index: 0; }
.bar-row .bar-l span { position: relative; z-index: 1; }
.bar-row .bar-v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Auth */
body.bare { background: radial-gradient(1200px 600px at 10% -10%, #1a3a6e 0%, transparent 60%), var(--navy); min-height: 100vh; }
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 100%; max-width: 400px; background: #fff; border-radius: 18px; padding: 32px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.auth-logo { height: 40px; margin-bottom: 18px; }
.auth-card h1 { font-size: 22px; color: var(--navy); margin-bottom: 4px; }
.auth-card > p.muted { margin-bottom: 20px; }
.auth-foot { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 14px; }
body.bare > .flash { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 5; }

/* Modal (confirm) */
dialog.modal { border: 0; border-radius: 16px; padding: 0; width: min(460px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(0, 0, 0, .3); margin: auto; }
dialog.modal::backdrop { background: rgba(11, 33, 72, .45); }
.modal-b { padding: 22px; }
.modal-b h3 { color: var(--navy); margin-bottom: 6px; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; background: var(--soft); border-top: 1px solid var(--line); }

@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols { grid-template-columns: 1fr; }
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; z-index: 50; width: 260px; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  .side.is-open { transform: none; }
  .top-menu { display: inline-flex; }
  .top { padding: 0 16px; }
  .content { padding: 18px 16px 50px; }
  .grid2, .grid3, .cols-even { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .top-me-txt { display: none; }
  .toolbar input[type=search] { width: 100%; }
  .dl { grid-template-columns: 1fr; gap: 2px 0; }
  .dl dd { margin-bottom: 8px; }
}
@media print {
  .side, .top, .page-actions, .no-print { display: none !important; }
  .shell { display: block; } body { background: #fff; } .content { padding: 0; }
}
