/* my.emap.bg — клиентско приложение (цветовете на Е-МАП) */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root { --teal: #007878; --teal-d: #005f5f; --teal-l: #e6f2f2; --line: #d9e8e8; --ink: #1f2a2a; --muted: #6b7b7b; --red: #c0392b; --bg: #f3f8f8; }
body { font-family: 'Segoe UI', -apple-system, Arial, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.45; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--teal); }
.wrap { width: 100%; max-width: 920px; margin: 0 auto; padding: 0 16px; }
main.wrap { flex: 1; padding-top: 22px; padding-bottom: 30px; }
h1 { font-size: 1.45rem; color: var(--teal-d); margin-bottom: 4px; }
h2 { font-size: 1.02rem; color: var(--teal-d); margin-bottom: 10px; }
h3 { font-size: .9rem; color: var(--teal-d); margin: 16px 0 8px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.strong { font-weight: 600; margin-bottom: 10px; }

/* шапка */
.hd { background: var(--teal); color: #fff; }
.hd-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand img { height: 40px; border-radius: 8px; }
.brand span { display: flex; flex-direction: column; line-height: 1.15; }
.brand small { opacity: .8; font-size: .78rem; }
.who { display: flex; align-items: center; gap: 12px; font-size: .85rem; }
.who a { color: #fff; opacity: .9; text-decoration: none; border: 1px solid rgba(255,255,255,.5); border-radius: 16px; padding: 4px 12px; }
.who a:hover { background: rgba(255,255,255,.15); }
.who-mail { opacity: .85; }

/* бутони и форми */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 20px; border-radius: 9px; font-weight: 700; font-size: .95rem; text-decoration: none; border: none; cursor: pointer; font-family: inherit; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-d); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.wide { width: 100%; margin-top: 18px; }
label { display: block; font-size: .82rem; font-weight: 700; color: #4a5a5a; margin: 14px 0 5px; }
input, select, textarea { width: 100%; padding: 11px 12px; border: 1.5px solid #c8dede; border-radius: 8px; font-size: 1rem; font-family: inherit; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,120,120,.12); }
::placeholder { color: #a9b4b4; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.flash { padding: 11px 14px; border-radius: 8px; margin-bottom: 14px; font-size: .92rem; }
.flash.ok { background: #d1fae5; color: #065f46; }
.flash.err { background: #fde2e1; color: #7f1d1d; }

/* вход */
.auth { max-width: 440px; margin: 30px auto; background: #fff; border-radius: 14px; padding: 30px 26px; box-shadow: 0 6px 24px rgba(0,80,80,.08); text-align: center; }
.auth .lead { margin: 8px 0 18px; }
.auth-form { text-align: left; margin-bottom: 16px; }
.auth-form .btn { width: 100%; margin-top: 14px; }
.big-ico { font-size: 2.4rem; color: var(--teal); }

/* начало */
.hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.note-due { background: #fff4f2; border: 1px solid #f5c6c0; color: #7f1d1d; padding: 10px 14px; border-radius: 9px; margin-bottom: 16px; }
.sec { margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; }
.sec .cnt, .cnt { background: var(--teal-l); color: var(--teal); border-radius: 10px; padding: 1px 9px; font-size: .78rem; }
.list { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.ocard { display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; text-decoration: none; color: inherit; transition: box-shadow .15s, border-color .15s; }
a.ocard:hover { border-color: var(--teal); box-shadow: 0 4px 16px rgba(0,120,120,.10); }
.ocard-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.onum { font-weight: 800; color: var(--teal-d); }
.otype { font-weight: 600; }
.oobj { color: var(--muted); font-size: .88rem; margin-top: 2px; }
.ometa { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .8rem; color: var(--muted); margin-top: 8px; }
.ometa .due { color: var(--red); font-weight: 700; }
.empty { background: #fff; border: 1px dashed var(--line); border-radius: 12px; padding: 22px; text-align: center; color: var(--muted); }
.older { margin-top: 22px; }
.older summary { cursor: pointer; font-weight: 700; color: var(--teal-d); margin-bottom: 10px; }

/* статуси */
.pill { display: inline-block; border-radius: 14px; padding: 3px 11px; font-size: .76rem; font-weight: 700; white-space: nowrap; background: #eef2f2; color: #555; }
.pill.big { font-size: .9rem; padding: 6px 14px; }
.pill.p1 { background: #e0ecff; color: #1e4fa3; }
.pill.p2 { background: #fff3cd; color: #856404; }
.pill.p3 { background: #d1fae5; color: #065f46; }
.pill.p4 { background: var(--teal-l); color: var(--teal); }
.pill.p0 { background: #f1f1f1; color: #999; }

/* поръчка */
.back { margin-bottom: 10px; font-size: .9rem; }
.back a { text-decoration: none; }
.ohead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); margin: 6px 0 16px; position: relative; }
.steps li { text-align: center; position: relative; font-size: .8rem; color: var(--muted); }
.steps li::before { content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.steps li:first-child::before { display: none; }
.steps li.done::before, .steps li.cur::before { background: var(--teal); }
.steps .dot { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 2px solid var(--line); font-weight: 800; color: var(--muted); }
.steps li.done .dot { background: var(--teal); border-color: var(--teal); color: #fff; }
.steps li.cur .dot { border-color: var(--teal); color: var(--teal); box-shadow: 0 0 0 4px rgba(0,120,120,.12); }
.steps li.cur .lbl { color: var(--teal-d); font-weight: 700; }
.steps .lbl { display: block; margin-top: 5px; }
.note { background: #fff; border-left: 4px solid var(--teal); border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; }
.note.ok { background: #ecfdf5; border-color: #10b981; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .9rem; }
.dl dt { color: var(--muted); }
.docs { display: flex; flex-direction: column; gap: 8px; }
.doc { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; text-decoration: none; font-weight: 600; }
.doc:hover { border-color: var(--teal); background: var(--teal-l); }
.doc small { color: var(--muted); font-weight: 400; }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th { text-align: left; font-size: .78rem; color: var(--muted); border-bottom: 1px solid var(--line); padding: 6px 4px; }
.tbl td { padding: 8px 4px; border-bottom: 1px solid #eef4f4; }
.tbl .n { text-align: right; white-space: nowrap; }
.tbl tfoot td { border-bottom: none; padding-top: 6px; }
.tbl tfoot tr.due td { color: var(--red); }
.pays { list-style: none; }
.pays li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #eef4f4; font-size: .9rem; }
.form textarea { resize: vertical; }

.ft { display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); padding-top: 14px; padding-bottom: 20px; border-top: 1px solid var(--line); }
.ft a { color: var(--muted); }

@media (max-width: 640px) {
  .grid2, .row2 { grid-template-columns: 1fr; }
  .who-mail { display: none; }
  h1 { font-size: 1.25rem; }
  .hero .btn { width: 100%; }
  .steps .lbl { font-size: .72rem; }
}
