/* Dashboard + account page */
.ad-body { margin: 0; background: #f4f1ec; color: #1c1411; font-family: "Inter", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.ad-body *, .ad-body *::before, .ad-body *::after { box-sizing: border-box; }
.ad-gate { min-height: 100vh; display: grid; place-items: center; padding: 1.2rem; }
.ad-gate-card { background: #fff; border-radius: 20px; padding: 2.2rem 1.8rem; max-width: 440px; text-align: center; box-shadow: 0 24px 60px -34px rgba(0,0,0,.45); }
.ad-gate-card img { width: 56px; height: 56px; border-radius: 50%; background: #1c1411; }
.ad-gate-card h1 { font-size: 1.7rem; margin: .8rem 0 .4rem; }
.ad-gate-card p { color: #6b5646; line-height: 1.6; margin: 0 0 1.2rem; }
.ad-gate-actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }
.ad-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 1.4rem; background: #1c1411; color: #fff; position: sticky; top: 0; z-index: 20; }
.ad-brand { display: inline-flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; font-weight: 700; }
.ad-brand img { width: 36px; height: 36px; border-radius: 50%; }
.ad-brand em { font-style: normal; color: #ff8a3d; font-weight: 600; }
.ad-top-r { display: flex; align-items: center; gap: .8rem; }
.ad-user { font-size: .85rem; color: #e4cfb0; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-demo { background: #f88f22; color: #1c1411; font-weight: 800; font-size: .72rem; letter-spacing: .08em; padding: .3rem .6rem; border-radius: 999px; }
.ad-main { max-width: 1240px; margin: 0 auto; padding: 1.4rem 1.2rem 4rem; }
.ad-bar { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; }
.ad-bar-l, .ad-bar-r { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.ad-sel { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: #6b5646; }
.ad-sel select { font: 600 .9rem "Inter", sans-serif; padding: .55rem .7rem; border-radius: 10px; border: 1.5px solid #ebd8bd; background: #fff; min-height: 44px; }
.ad-btn { display: inline-flex; align-items: center; gap: .5rem; font: 600 .88rem "Inter", sans-serif; padding: .6rem 1rem; min-height: 44px; border-radius: 10px; border: 1.5px solid #1c1411; background: #fff; color: #1c1411; cursor: pointer; text-decoration: none; transition: background .2s, color .2s, opacity .2s; }
.ad-btn:hover:not(:disabled) { background: #1c1411; color: #fff; }
.ad-btn:disabled { opacity: .4; cursor: not-allowed; }
.ad-btn.ad-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.ad-btn.ad-ghost:hover { background: #fff; color: #1c1411; }
.ad-btn.ad-sm { min-height: 38px; padding: .4rem .8rem; font-size: .82rem; }
.ad-btn.ad-danger { border-color: #c0341d; color: #c0341d; }
.ad-btn.ad-danger:hover:not(:disabled) { background: #c0341d; color: #fff; }
.ad-btn:focus-visible, .ad-icon:focus-visible, .ad-sel select:focus-visible { outline: 3px solid #ea6113; outline-offset: 2px; }
.ad-note { min-height: 1.4em; margin: .8rem 0 .2rem; font-size: .9rem; color: #6b5646; } .ad-note.err { color: #c0341d; }
.ad-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: .9rem; margin: .6rem 0 1.1rem; }
.ad-kpi { background: #fff; border-radius: 16px; padding: 1.1rem 1.2rem; }
.ad-kpi p { margin: 0; font-size: .78rem; color: #7a6554; font-weight: 600; letter-spacing: .02em; }
.ad-kpi b { display: block; font-size: 2rem; letter-spacing: -.03em; margin: .25rem 0; }
.ad-kpi span { font-size: .78rem; color: #a08a76; }
.ad-card { background: #fff; border-radius: 16px; padding: 1.2rem 1.3rem; min-width: 0; }
.ad-wide { margin-bottom: 1.1rem; }
.ad-card-h { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: .9rem; }
.ad-card-h h2 { margin: 0; font-size: 1.02rem; letter-spacing: -.01em; }
.ad-card-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.ad-legend { display: flex; gap: 1rem; font-size: .8rem; color: #6b5646; }
.ad-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .4rem; background: #ea6113; }
.ad-legend .lg-v::before { background: #1c1411; }
.ad-chart svg { width: 100%; height: 240px; display: block; }
.ad-chart .gl { stroke: #ffecd0; stroke-width: 1; } .ad-chart .gt { fill: #a08a76; font-size: 11px; font-family: "Inter", sans-serif; }
.ad-chart .area { fill: rgba(234, 97, 19,.12); } .ad-chart .l-pv { fill: none; stroke: #ea6113; stroke-width: 2.5; vector-effect: non-scaling-stroke; } .ad-chart .l-v { fill: none; stroke: #1c1411; stroke-width: 2; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.ad-chart .hit { fill: transparent; } .ad-chart .hit:hover { fill: rgba(234, 97, 19,.5); }
.ad-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin-bottom: 1.1rem; }
.ad-bar-row { display: grid; grid-template-columns: 1fr auto; gap: .2rem .8rem; align-items: center; margin-bottom: .75rem; font-size: .88rem; }
.ad-bar-row .ad-bar-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-bar-row i { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: linear-gradient(90deg, #ea6113, #f88f22); display: block; }
.ad-empty { color: #a08a76; font-size: .9rem; margin: .4rem 0; }
.ad-table-wrap { overflow-x: auto; }
.ad-table { width: 100%; border-collapse: collapse; font-size: .85rem; min-width: 720px; }
.ad-table th { text-align: left; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #a08a76; padding: .5rem .6rem; border-bottom: 1.5px solid #ffecd0; }
.ad-table td { padding: .55rem .6rem; border-bottom: 1px solid #fff4e3; vertical-align: middle; }
.ad-table .nw { white-space: nowrap; } .ad-path { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-chip { display: inline-block; font-size: .74rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; background: #eee9e2; }
.ad-chip.t-cta { background: #ffe3d1; color: #a63a00; } .ad-chip.t-pv { background: #e7efe9; color: #25613b; }
.ad-icon { width: 36px; height: 36px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; color: #6b5646; } .ad-icon:hover { background: #fff4e3; color: #c0341d; }
.ad-foot { font-size: .82rem; color: #a08a76; margin: .8rem 0 0; } .ad-p { color: #6b5646; margin: 0 0 1rem; line-height: 1.6; }
.ad-history { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; font-size: .85rem; color: #6b5646; }
.ad-toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); background: #1c1411; color: #fff; padding: .7rem .9rem .7rem 1.1rem; border-radius: 12px; display: flex; gap: 1rem; align-items: center; z-index: 60; box-shadow: 0 12px 30px -12px rgba(0,0,0,.6); }
.ad-toast button { background: #f88f22; border: 0; color: #1c1411; font-weight: 700; padding: .45rem .8rem; border-radius: 8px; cursor: pointer; min-height: 36px; }
@media (max-width: 1000px) { .ad-kpis { grid-template-columns: repeat(2, 1fr); } .ad-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .ad-grid { grid-template-columns: 1fr; } .ad-top { padding: .7rem 1rem; } .ad-user { display: none; } .ad-brand span { font-size: .9rem; } .ad-kpi b { font-size: 1.6rem; } .ad-main { padding: 1rem .8rem 3rem; } .ad-bar-r { width: 100%; } }

/* account page */
.au-main { min-height: 100vh; display: flex; justify-content: center; align-items: flex-start; padding: 8rem 1.2rem 4rem; }
.au-card { background: #fff; border-radius: 22px; padding: 2.2rem 2rem; width: 100%; max-width: 460px; box-shadow: 0 30px 60px -38px rgba(0,0,0,.5); }
.au-card h1 { font: 800 clamp(1.8rem, 5vw, 2.3rem)/1.1 "Inter", sans-serif; letter-spacing: -.03em; text-transform: none; color: #1c1411; margin: .6rem 0 .4rem; }
.au-sub { color: #6b5646; margin-bottom: 1.4rem; line-height: 1.5; }
.au-tabs { display: grid; grid-template-columns: 1fr 1fr; background: #fff4e3; border-radius: 12px; padding: 4px; margin-bottom: 1.3rem; }
.au-tabs button { border: 0; background: transparent; font: 600 .95rem "Inter", sans-serif; padding: .7rem; border-radius: 9px; cursor: pointer; min-height: 44px; color: #6b5646; }
.au-tabs button[aria-selected="true"] { background: #fff; color: #1c1411; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.au-f { display: block; font: 600 .85rem "Inter", sans-serif; color: #3b352f; margin-bottom: 1rem; }
.au-f input { display: block; width: 100%; margin-top: .4rem; padding: .85rem .95rem; border: 1.5px solid #ebd8bd; border-radius: 12px; font: 400 1rem "Inter", sans-serif; background: #fff; min-height: 48px; }
.au-f input:focus { outline: 3px solid rgba(234, 97, 19,.35); border-color: #ea6113; }
.au-msg { min-height: 1.4em; font-size: .9rem; margin: 0 0 .8rem; color: #6b5646; } .au-msg.err { color: #c0341d; } .au-msg.ok { color: #1a7f37; }
.au-submit { width: 100%; justify-content: center; border: 0; cursor: pointer; font-size: 1rem; }
.au-submit:disabled { opacity: .5; cursor: not-allowed; }
.au-link { display: block; margin: 1rem auto 0; background: none; border: 0; color: #6b5646; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: 500 .9rem "Inter", sans-serif; min-height: 44px; }
.au-note { margin-top: 1.2rem; padding: .9rem 1rem; background: #fff6e0; border-radius: 12px; color: #5a4a1a; font-size: .9rem; line-height: 1.55; }
.au-note code { background: rgba(0,0,0,.06); padding: .1rem .35rem; border-radius: 5px; }
.au-actions { display: flex; flex-direction: column; gap: .4rem; }
[hidden] { display: none !important; }

/* ---- tabs + projects manager ---- */
.ad-tabs { display: flex; gap: .4rem; max-width: 1180px; margin: 0 auto; padding: 1rem 1rem 0; }
.ad-tabs button { font: 600 .95rem "Inter", sans-serif; min-height: 44px; padding: .6rem 1.2rem; border: 0; border-bottom: 3px solid transparent; background: none; color: inherit; cursor: pointer; opacity: .65; }
.ad-tabs button[aria-selected="true"] { opacity: 1; border-bottom-color: #ea6113; }
.ad-primary { background: #ea6113 !important; color: #fff !important; border-color: #ea6113 !important; }
.pj-list { list-style: none; margin: 1rem 0 3rem; padding: 0; display: grid; gap: .6rem; }
.pj-row { display: flex; align-items: center; gap: .9rem; padding: .6rem .8rem; border: 1px solid rgba(128,128,128,.3); border-radius: 12px; background: rgba(128,128,128,.06); }
.pj-row.off { opacity: .55; }
.pj-th { flex: none; width: 64px; height: 44px; border-radius: 8px; overflow: hidden; background: #1d1d1d; color: #888; display: grid; place-items: center; }
.pj-th img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.pj-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pj-tx strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-tx em { font-style: normal; font-size: .8rem; opacity: .7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-act { display: flex; gap: .15rem; flex: none; }
.pj-act .ad-icon:disabled { opacity: .25; cursor: default; }
.pj-dlg { width: min(520px, calc(100vw - 2rem)); border: 0; border-radius: 16px; padding: 1.4rem; background: #fff; color: #1c1411; }
.pj-dlg::backdrop { background: rgba(0,0,0,.6); }
.pj-dlg h2 { margin: 0 0 1rem; font-size: 1.2rem; }
.pj-dlg label { display: block; font: 600 .85rem "Inter", sans-serif; margin-bottom: .8rem; }
.pj-dlg label[hidden] { display: none; }
.pj-dlg input:not([type=file]), .pj-dlg select { display: block; width: 100%; margin-top: .3rem; padding: .65rem .75rem; min-height: 44px; font: 400 1rem "Inter", sans-serif; border: 1.5px solid #ccc; border-radius: 10px; background: #fff; color: #1c1411; box-sizing: border-box; }
.pj-dlg input[type=file] { display: block; margin-top: .3rem; font-size: .9rem; max-width: 100%; }
.pj-dlg-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: .6rem; }
.pj-dlg .ad-ghost { color: #1c1411; border-color: #ccc; }
@media (max-width: 640px) { .pj-act .ad-icon { width: 38px; } .pj-th { width: 52px; } }
.pj-list { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 640px) { .pj-row { flex-wrap: wrap; } .pj-tx { flex: 1 1 calc(100% - 80px); } .pj-act { width: 100%; justify-content: space-between; } }
