/* Kridha Couture admin panel */
:root {
	--a-bg: #F4F5F8;
	--a-card: #FFFFFF;
	--a-ink: #161A23;
	--a-muted: #5B6273;
	--a-line: #E3E6EE;
	--a-side: #0B0D10;
	--a-side-2: #14171D;
	--a-gold: #B8912A;
	--a-gold-2: #D4AF37;
	--a-ok: #1E7F4F;
	--a-err: #C2382F;
	--a-info: #2456B8;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Montserrat', system-ui, sans-serif; font-size: 14px; color: var(--a-ink); background: var(--a-bg); line-height: 1.5; }
a { color: var(--a-info); }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; }
h2 { font-size: 17px; }
code { background: #EEF0F5; padding: 1px 6px; border-radius: 4px; }
:focus-visible { outline: 2px solid var(--a-gold-2); outline-offset: 2px; }

/* Shell */
.adm { display: flex; min-height: 100vh; }
.adm-side { width: 240px; flex: none; background: var(--a-side); color: #D1D5DB; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.adm-brand { display: block; padding: 22px 22px 18px; font-family: 'Cinzel', serif; font-size: 20px; font-weight: 700; letter-spacing: .12em; color: var(--a-gold-2); text-decoration: none; border-bottom: 1px solid #22262F; }
.adm-brand span { font-family: 'Montserrat', sans-serif; font-size: 10px; letter-spacing: .25em; color: #9CA3AF; font-weight: 500; text-transform: uppercase; margin-left: 4px; }
.adm-side nav { padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.adm-side nav a { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 6px; color: #C7CBD4; text-decoration: none; font-weight: 500; min-height: 40px; }
.adm-side nav a:hover { background: var(--a-side-2); color: #fff; }
.adm-side nav a.is-active { background: rgba(212,175,55,.14); color: var(--a-gold-2); }
.adm-pill { background: var(--a-gold-2); color: #0B0D10; border-radius: 10px; font-size: 11px; font-weight: 700; padding: 1px 8px; }
.adm-side__foot { padding: 14px 22px 22px; border-top: 1px solid #22262F; display: grid; gap: 8px; }
.adm-side__foot a { color: #9CA3AF; text-decoration: none; font-size: 13px; }
.adm-side__foot a:hover { color: #fff; }
.adm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.adm-top { display: flex; align-items: center; gap: 14px; padding: 18px 28px; background: var(--a-card); border-bottom: 1px solid var(--a-line); position: sticky; top: 0; z-index: 5; }
.adm-top h1 { font-size: 20px; margin: 0; flex: 1; }
.adm-top__user { color: var(--a-muted); font-size: 13px; }
.adm-burger { display: none; font-size: 22px; cursor: pointer; width: 40px; height: 40px; align-items: center; justify-content: center; border: 1px solid var(--a-line); border-radius: 6px; }
.adm-content { padding: 24px 28px 60px; }
@media (max-width: 900px) {
	.adm-side { position: fixed; left: 0; top: 0; bottom: 0; z-index: 20; transform: translateX(-100%); transition: transform .2s; }
	.adm-nav-toggle:checked ~ .adm-side { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.4); }
	.adm-burger { display: inline-flex; }
	.adm-content { padding: 18px 14px 60px; }
	.adm-top { padding: 12px 14px; }
}

/* Cards & grid */
.adm-card { background: var(--a-card); border: 1px solid var(--a-line); border-radius: 10px; padding: 20px; margin-bottom: 20px; }
.adm-card__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.adm-card__head h2 { margin: 0; }
.adm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px; }
.adm-stat { background: var(--a-card); border: 1px solid var(--a-line); border-radius: 10px; padding: 18px; text-decoration: none; color: inherit; display: block; }
.adm-stat:hover { border-color: var(--a-gold-2); }
.adm-stat small { display: block; color: var(--a-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.adm-stat strong { display: block; font-size: 26px; margin-top: 6px; }
.adm-cols { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.adm-cols--even { grid-template-columns: 1fr 1fr; }
@media (max-width: 1100px) { .adm-cols, .adm-cols--even { grid-template-columns: 1fr; } }

/* Tables */
.adm-table-wrap { overflow-x: auto; }
.adm-table { width: 100%; border-collapse: collapse; }
.adm-table th, .adm-table td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--a-line); vertical-align: top; }
.adm-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--a-muted); font-weight: 600; background: #FAFBFC; }
.adm-table tr:hover td { background: #FBFBFD; }
.adm-table .num { text-align: right; white-space: nowrap; }
.adm-thumb { width: 44px; height: 54px; object-fit: cover; border-radius: 4px; background: #EEF0F5; display: block; }
.adm-empty { color: var(--a-muted); padding: 24px; text-align: center; }

/* Badges */
.adm-badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 10px; background: #EEF0F5; color: var(--a-muted); white-space: nowrap; }
.adm-badge--new, .adm-badge--pending { background: #FFF4D6; color: #8A6500; }
.adm-badge--paid, .adm-badge--delivered, .adm-badge--done, .adm-badge--confirmed, .adm-badge--published, .adm-badge--active { background: #DCF3E6; color: var(--a-ok); }
.adm-badge--cancelled, .adm-badge--failed, .adm-badge--inactive { background: #FBE2E0; color: var(--a-err); }
.adm-badge--tailoring, .adm-badge--measuring, .adm-badge--ready, .adm-badge--shipped { background: #E2EAFB; color: var(--a-info); }

/* Forms */
.adm-form { display: grid; gap: 14px; }
.adm-form fieldset { border: 1px solid var(--a-line); border-radius: 10px; padding: 16px; margin: 0; display: grid; gap: 12px; }
.adm-form legend { font-weight: 700; padding: 0 6px; }
.adm-form label, .adm-label { display: grid; gap: 6px; font-weight: 600; font-size: 13px; }
.adm-form .adm-hint, .adm-hint { font-weight: 400; color: var(--a-muted); font-size: 12px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=date], input[type=tel], input:not([type]), select, textarea {
	width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #CDD2DD; border-radius: 6px; font: inherit; color: var(--a-ink); background: #fff;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--a-gold-2); outline: none; box-shadow: 0 0 0 3px rgba(212,175,55,.2); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--a-gold); }
.adm-check { display: flex !important; align-items: center; gap: 8px; font-weight: 500 !important; grid-template-columns: none !important; }
.adm-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.adm-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.adm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 18px; border: 1px solid var(--a-ink); background: var(--a-ink); color: #fff; border-radius: 6px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.adm-btn:hover { background: #2A303D; }
.adm-btn--gold { background: var(--a-gold-2); border-color: var(--a-gold-2); color: #0B0D10; }
.adm-btn--gold:hover { background: #E3C35A; }
.adm-btn--ghost { background: #fff; color: var(--a-ink); border-color: #CDD2DD; }
.adm-btn--ghost:hover { background: #F4F5F8; }
.adm-btn--danger { background: #fff; color: var(--a-err); border-color: #F0C3BF; }
.adm-btn--danger:hover { background: #FBE2E0; }
.adm-btn--sm { min-height: 32px; padding: 0 10px; font-size: 12px; }
.adm-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.adm-filters input, .adm-filters select { width: auto; min-width: 160px; }
.adm-alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; border: 1px solid; }
.adm-alert--ok { background: #E9F7EF; border-color: #BFE6CF; color: #155C39; }
.adm-alert--err { background: #FDECEA; border-color: #F3C2BD; color: #8E241D; }
.adm-muted { color: var(--a-muted); }
.adm-pager { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.adm-pager a { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--a-line); border-radius: 6px; text-decoration: none; color: var(--a-ink); background: #fff; }
.adm-pager a.is-active { background: var(--a-ink); color: #fff; }
.adm-imgs { display: flex; gap: 10px; flex-wrap: wrap; }
.adm-imgs figure { margin: 0; width: 110px; border: 1px solid var(--a-line); border-radius: 8px; overflow: hidden; background: #fff; }
.adm-imgs img { width: 110px; height: 130px; object-fit: cover; display: block; }
.adm-imgs figcaption { padding: 6px 8px; font-size: 12px; }
.adm-swatch { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 1px solid #CDD2DD; vertical-align: middle; }
.adm-dl { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; margin: 0; }
.adm-dl dt { color: var(--a-muted); }
.adm-dl dd { margin: 0; }

/* Bars chart */
.adm-bars { display: flex; align-items: flex-end; gap: 4px; height: 180px; padding-top: 10px; border-bottom: 1px solid var(--a-line); }
.adm-bars div { flex: 1; background: var(--a-gold-2); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
.adm-bars div:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--a-ink); color: #fff; font-size: 11px; padding: 3px 6px; border-radius: 4px; white-space: nowrap; margin-bottom: 4px; }
.adm-bars-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--a-muted); margin-top: 6px; }
.adm-meter { height: 8px; background: #EEF0F5; border-radius: 4px; overflow: hidden; }
.adm-meter span { display: block; height: 100%; background: var(--a-gold-2); }

/* Auth / installer */
.adm-auth { background: var(--a-side); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.adm-auth__box { background: #fff; border-radius: 12px; padding: 32px; width: 100%; max-width: 420px; }
.adm-auth .adm-brand { padding: 0 0 18px; margin-bottom: 18px; border-bottom: 1px solid var(--a-line); color: var(--a-gold); }
