/* manoobjektas.lt – sign in, sign up, password and account pages (loads after site.css) */

.auth-body { min-height: 100vh; min-height: 100dvh; }
.auth-layout { display: grid; grid-template-columns: minmax(320px, 5fr) 7fr; min-height: 100vh; min-height: 100dvh; }

/* Dark brand panel */
.auth-side {
  background: var(--anthracite); color: #F7F7F4;
  padding: clamp(32px, 5vw, 64px);
  display: flex; flex-direction: column; gap: 28px;
}
.auth-side-logo { align-self: flex-start; }
.auth-side-logo img { height: 26px; width: auto; }
.auth-side-title {
  margin-top: auto;
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(2.75rem, 4.6vw, 4.5rem); line-height: 1.04;
  max-width: 8ch;
}
.auth-side-title::after { content: ""; display: block; width: 72px; height: 8px; margin-top: 24px; background: var(--yellow); }
.auth-side-list { margin-bottom: auto; }

/* Form column */
.auth-main {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: clamp(24px, 5vw, 64px) var(--gutter);
}
.auth-body-single .auth-main { min-height: 100vh; min-height: 100dvh; }
.auth-mobile-logo { display: none; margin-bottom: 28px; }
.auth-mobile-logo img { height: 36px; width: auto; }
.auth-logo-always { display: inline-flex; }

.auth-card {
  width: 100%; max-width: 440px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: 0 24px 48px -32px rgba(17, 17, 17, .3);
}

.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px; margin-bottom: 28px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
}
.auth-tabs button {
  min-height: 42px; border: 0; border-radius: 7px; background: transparent; cursor: pointer;
  font: 600 .9375rem/1 var(--font-body); color: var(--text-muted);
}
.auth-tabs button[aria-selected="true"] { background: var(--surface); color: var(--black); box-shadow: 0 1px 2px rgba(17, 17, 17, .12), inset 0 -3px 0 var(--yellow); }

.auth-title { font-size: 1.625rem; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; margin-bottom: 20px; }
.auth-lead { color: var(--text-muted); margin: -8px 0 20px; }

.button-block { width: 100%; }
.button:disabled { opacity: .65; cursor: progress; }

.auth-switch { margin-top: 22px; text-align: center; font-size: .9375rem; color: var(--text-muted); }

.auth-done { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 8px 0; }
.auth-done:focus { outline: none; }
.auth-done h2 { font-size: 1.375rem; }
.auth-done p { color: var(--text-muted); }
.auth-done strong { color: var(--black); word-break: break-all; }

/* Wide card (register, account) */
.auth-card-wide { max-width: 640px; }
.auth-layout-single { grid-template-columns: 1fr; }
.auth-layout-single .auth-main { min-height: 100vh; min-height: 100dvh; justify-content: flex-start; padding-top: clamp(32px, 8vh, 80px); }
.account-buttons { display: flex; gap: 8px; flex-wrap: wrap; }

/* Links under the card */
.auth-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 20px; margin-top: 28px; font-size: .875rem; color: var(--text-muted); }
.auth-footer a { color: var(--text-muted); text-decoration: none; }
.auth-footer a:hover { color: var(--black); text-decoration: underline; text-decoration-color: var(--yellow); text-underline-offset: 3px; }
.lang-small { display: inline-flex; }
.lang-small a { padding: 6px 8px; }

/* Register: plan picker */
.auth-form fieldset { display: grid; gap: 14px; }
.auth-form legend { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.0625rem; margin-bottom: 12px; }
.step-badge { width: 28px; height: 28px; display: grid; place-items: center; background: var(--black); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1rem; border-radius: 6px; }
.period-small { margin: 0 0 4px; }
.period-small span { min-height: 36px; padding: 0 14px; font-size: .875rem; }
.plan-pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plan-option { position: relative; cursor: pointer; }
.plan-option input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.plan-option-body { position: relative; display: grid; gap: 8px; height: 100%; padding: 18px 16px 16px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--bg); transition: border-color .15s ease, background-color .15s ease; }
.plan-option:hover .plan-option-body { border-color: #BDBDB8; }
.plan-option input:checked + .plan-option-body { border-color: var(--black); background: var(--surface); }
.plan-option input:focus-visible + .plan-option-body { outline: 3px solid var(--yellow); outline-offset: 2px; }
.plan-option .plan-flag { top: -12px; left: 14px; }
.plan-option-name { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.25rem; letter-spacing: .01em; }
.plan-option-price { display: flex; align-items: baseline; gap: 6px; }
.plan-option-price b { font-family: var(--font-display); font-weight: 800; font-size: 1.875rem; line-height: 1; }
.plan-option-price small { color: var(--text-muted); font-weight: 600; }
.plan-option .checks { gap: 6px; font-size: .875rem; }
.plan-option .checks-dark li { color: var(--text-muted); grid-template-columns: 18px 1fr; gap: 8px; }
.plan-option .checks-dark li::before { width: 18px; height: 18px; background-size: 13px; }
.plan-option-check { display: none; align-items: center; gap: 6px; margin-top: 4px; font-size: .8125rem; font-weight: 600; color: var(--black); }
.plan-option-check .icon { width: 16px; height: 16px; stroke-width: 3; color: var(--ok); }
.plan-option input:checked + .plan-option-body .plan-option-check { display: inline-flex; }
.plan-pick-link { font-size: .875rem; justify-self: start; }
.pricing[data-period="yearly"] .price-m, .pricing[data-period="monthly"] .price-y { display: none; }
.account-fields { padding-top: 8px; border-top: 1px solid var(--line); margin-top: 6px; }
.field-check .check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; cursor: pointer; font-size: .9375rem; }
.field-check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--black); cursor: pointer; }
.field-check a { font-weight: 600; text-decoration-color: var(--yellow); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.auth-note-center { text-align: center; margin-top: 4px; }

/* Contractor app (dashboard, object, calendar) */
.auth-card-app { max-width: 1040px; }
.app-nav { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 20px; }
.app-nav a { padding: 10px 14px; font-weight: 600; font-size: .9375rem; color: var(--text-muted); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.app-nav a[aria-current="page"] { color: var(--black); border-color: var(--yellow); }
.app-hero { display: grid; gap: 14px; margin-bottom: 20px; }
.app-limit { display: flex; align-items: center; gap: 12px; font-size: .9375rem; color: var(--text-muted); }
.meter { flex: 0 0 160px; height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--black); transition: width .2s ease; }
.meter-full i { background: var(--no); }
.app-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.app-actions .button:disabled { opacity: .5; cursor: not-allowed; }
.app-stats { margin-bottom: 24px; }
.object-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 16px; }
.object-card { display: grid; gap: 8px; padding: 16px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: inherit; transition: border-color .15s ease; }
.object-card:hover { border-color: var(--black); }
.object-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.object-card small { color: var(--text-muted); }
.object-card .progress { margin: 2px 0; }
.object-card-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.object-card-facts span { display: grid; }
.object-card-facts small { font-size: .6875rem; color: var(--text-muted); }
.object-card-facts b { font-size: .875rem; }
.app-dialog { width: min(100% - 32px, 620px); margin: auto; padding: 0; border: 0; border-radius: var(--radius); background: var(--surface); box-shadow: 0 32px 64px -24px rgba(17, 17, 17, .5); }
.app-dialog::backdrop { background: rgba(17, 17, 17, .55); }
.app-dialog form { padding: clamp(20px, 4vw, 28px); gap: 14px; max-height: calc(100vh - 64px); overflow: auto; }
.app-dialog-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field select { width: 100%; min-height: 48px; padding: 0 12px; border: 1.5px solid #CFCFCA; border-radius: var(--radius-sm); background: var(--surface); font: 400 1rem var(--font-body); }
.object-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 14px; }
.object-head .auth-title { margin-bottom: 4px; }
.totals { margin-bottom: 16px; }
.totals dd.ok { color: var(--ok-text); }
.app-section { margin-top: 24px; display: grid; gap: 10px; }
.works-table td { padding: 6px 6px; }
.cell { width: 100%; min-width: 90px; min-height: 34px; padding: 4px 8px; border: 1px solid transparent; border-radius: 4px; background: transparent; font: inherit; font-size: .875rem; }
.cell:hover { border-color: #CFCFCA; background: #fff; }
.cell:focus { outline: none; border-color: var(--black); background: #fff; box-shadow: 0 0 0 3px rgba(255, 196, 0, .4); }
.cell-num { max-width: 110px; text-align: right; }
.cell-unit { max-width: 90px; }
.admin-table td.num { text-align: right; white-space: nowrap; }
.icon-btn { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--text-muted); font-size: 1.125rem; line-height: 1; cursor: pointer; }
.icon-btn:hover { color: var(--no); border-color: var(--no); }
.pay-form { display: grid; grid-template-columns: 130px 150px 130px 1fr auto; gap: 8px; align-items: center; }
.pay-form input, .pay-form select { min-height: 40px; padding: 0 10px; border: 1.5px solid #CFCFCA; border-radius: var(--radius-sm); font: inherit; font-size: .9375rem; background: #fff; }
.notes { width: 100%; padding: 12px 14px; border: 1.5px solid #CFCFCA; border-radius: var(--radius-sm); font: inherit; line-height: 1.5; resize: vertical; }
.danger { color: var(--no); border-color: var(--no); }
.danger:hover { background: var(--no); color: #fff; }
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cal-head strong { flex: 1; text-align: center; font-size: 1.125rem; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: .75rem; font-weight: 600; color: var(--text-muted); padding: 4px 0; }
.cal-cell { position: relative; min-height: 56px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); font: inherit; text-align: left; padding: 6px; cursor: pointer; }
.cal-cell span { font-size: .875rem; font-weight: 600; }
.cal-cell i { position: absolute; right: 6px; bottom: 6px; min-width: 20px; height: 20px; border-radius: 999px; background: var(--yellow); color: var(--black); font-style: normal; font-size: .75rem; font-weight: 600; display: grid; place-items: center; padding: 0 5px; }
.cal-empty { background: transparent; border-color: transparent; cursor: default; }
.cal-today span { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; }
.cal-selected { border-color: var(--black); background: #fff; }
.cal-has { border-color: #CFCFCA; }
.cal-list { list-style: none; display: grid; gap: 8px; }
.cal-list a { display: grid; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: inherit; }
.cal-list small { color: var(--text-muted); }
@media (max-width: 640px) {
  .field-grid, .pay-form { grid-template-columns: 1fr; }
  .object-card-facts { grid-template-columns: repeat(2, 1fr); }
  .cal-cell { min-height: 44px; }
}

/* Client link (contractor side) and public estimate page */
.share-box { background: var(--bg); border: 1px solid var(--line); border-left: 4px solid var(--yellow); border-radius: var(--radius); padding: 18px; }
.share-link { display: flex; gap: 8px; }
.share-link input { flex: 1; min-height: 40px; padding: 0 10px; border: 1.5px solid #CFCFCA; border-radius: var(--radius-sm); font: inherit; font-size: .9375rem; background: #fff; }
.share-history-title { font-size: 1rem; font-weight: 600; margin-top: 8px; }
.share-history { list-style: none; display: grid; gap: 8px; }
.share-history li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; font-size: .9375rem; }
.share-history small { display: block; color: var(--text-muted); }
.share-history p { margin-top: 6px; white-space: pre-wrap; }
.share-card { max-width: 760px; }
.share-from { font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.share-table td.num { text-align: right; white-space: nowrap; }
.share-approve { margin-top: 8px; }
.share-comment { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.share-powered { margin-top: 20px; font-size: .875rem; color: var(--text-muted); }
.share-powered a { color: var(--text-muted); }

/* Subscription section on the account page */
.billing { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.billing-title { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.5rem; line-height: 1; }
.billing-lead { color: var(--text-muted); }
.billing-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 0; }
.billing-facts div { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.billing-facts dt { font-size: .75rem; color: var(--text-muted); }
.billing-facts dd { margin: 2px 0 0; font-weight: 600; }
.billing-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.billing-secure { text-align: center; }
.success-spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--yellow); border-radius: 50%; animation: spin .9s linear infinite; margin: 8px auto 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Account page */
.account-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 18px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.account-email-line { font-weight: 600; }
.account-plan { font-size: .9375rem; color: var(--text-muted); margin-top: 2px; }
.account-trial { display: inline-block; margin-left: 8px; }
.auth-card .empty { padding: 24px; }
[data-page="account"]:not(.is-ready) .auth-card { visibility: hidden; }
.empty {
  display: grid; justify-items: start; gap: 12px;
  max-width: 560px; padding: clamp(24px, 4vw, 40px);
  border: 2px dashed #CFCFCA; border-radius: var(--radius); background: var(--surface);
}
.empty h2 { font-size: 1.375rem; }
.empty p { color: var(--text-muted); }

@media (max-width: 899px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-mobile-logo { display: inline-flex; }
  .auth-main { justify-content: flex-start; padding-top: 32px; }
}
@media (max-width: 560px) {
  .plan-pick-grid { grid-template-columns: 1fr; }
  .account-top { flex-direction: column; }
}
