/* shell.css — Quota bar, user chip, page shell, steps and tabs */
/* User */
.user { display: flex; align-items: center; gap: .55rem; min-width: 0; color: var(--muted); font-size: .85rem; }
.user strong { color: var(--ink); font-weight: 600; }
.user a { display: inline-flex; align-items: center; min-height: 38px; padding: .45rem .85rem;
          border: 1px solid var(--line-strong); border-radius: var(--r-xs);
          color: var(--ink); font-weight: 600; transition: all .15s; }
.user a:hover { border-color: var(--teal); background: var(--teal-soft);
                color: var(--teal-dark); text-decoration: none; }

/* Container */
.container { width: min(1180px, 100%); margin: 0 auto; padding: 2.4rem 1.5rem 3rem; }

/* Page intro.
 * The h1 here is a working-area label, not a landing-page hero: the brand in
 * the topbar already names the product and the tabs sit right underneath, so a
 * 3.5rem headline pushed the first control below the fold for no gain. */
.page-intro { display: flex; align-items: flex-end; justify-content: space-between;
               gap: 2rem; margin-bottom: 1rem; }
.page-intro h1 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: .2rem; }
.page-intro .lead { font-size: .92rem; line-height: 1.5; }

/* Steps */
.steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
          gap: .5rem; max-width: 760px; margin: 0 0 1.4rem; padding: 0; list-style: none; }
.steps::before { position: absolute; top: 17px; right: 9%; left: 9%; height: 2px;
                  background: var(--line); content: ""; }
/* The editor page has three real stages (no separate "review" view); the
   result page keeps four because it still has "ดาวน์โหลด" ahead of the user. */
.steps--three { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 620px; }
.steps--three::before { right: 16.6%; left: 16.6%; }
.step { position: relative; z-index: 1; display: flex; align-items: center; gap: .55rem;
          min-width: 0; color: var(--muted); font-weight: 500; }
.step span { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center;
              border: 2px solid var(--line); border-radius: 50%; background: var(--paper);
              font-family: Sora, sans-serif; font-size: .82rem; font-weight: 700;
              transition: all .25s; }
.step em { overflow: hidden; font-style: normal; font-size: .82rem;
            font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.step.active { color: var(--teal-dark); font-weight: 600; }
.step.active span { border-color: var(--teal); background: var(--teal); color: white;
                     box-shadow: 0 0 0 5px var(--teal-soft); }
.step.complete span { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-dark); }

/* Tabs */
.tabs { position: relative; display: flex; width: min(820px, 100%);
          border: 1px solid var(--line); border-bottom: 0;
          border-radius: var(--r) var(--r) 0 0; background: #f0f1ed; overflow: hidden; }
.tab { position: relative; flex: 1; min-width: 0; padding: 1rem 1.1rem .95rem; border: 0;
        background: transparent; color: var(--muted); text-align: left;
        transition: background .2s, color .2s; }
.tab:hover { background: rgba(255,255,255,.6); }
.tab.active { background: var(--paper); color: var(--ink); }
.tab-kicker { display: block; color: var(--teal); font-family: Sora, sans-serif;
              font-size: .65rem; font-weight: 800; letter-spacing: .08em;
              text-transform: uppercase; }
.tab strong { display: block; overflow: hidden; font-size: .95rem;
               text-overflow: ellipsis; white-space: nowrap; }
.tab small { display: block; overflow: hidden; margin-top: .15rem;
              font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.tab.active::after { content: ""; position: absolute; bottom: -1px; left: 0; right: 0; height: 3px;
                      background: var(--grad-button); border-radius: 3px 3px 0 0; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.tab-panel[hidden] { display: none !important; }
