@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,700&display=swap');

:root {
  --ink: #082b63;
  --ink-2: #4d6785;
  --cream: #eef9fa;
  --paper: #ffffff;
  --line: #cce6e9;
  --yellow: #f6a51a;
  --yellow-2: #ffd15c;
  --red: #b63e4d;
  --green: #65bd2e;
  --terracotta: #0ba9aa;
  --shadow: 0 20px 60px rgba(8, 43, 99, .14);
  --radius: 22px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--cream); color: var(--ink); font-family: 'DM Sans', system-ui, sans-serif; }
body::before { content: ''; position: fixed; inset: 0; pointer-events: none; opacity: .24; background-image: radial-gradient(#a74722 0.55px, transparent 0.55px); background-size: 10px 10px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; position: relative; }
.login-art { background: linear-gradient(145deg, #06275b 0%, #087f91 100%); color: var(--paper); padding: clamp(40px, 7vw, 96px); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; position: relative; }
.login-art::after { content: ''; position: absolute; width: 440px; height: 440px; border: 2px solid rgba(248,173,24,.58); border-radius: 48% 52% 59% 41%; right: -170px; bottom: -90px; transform: rotate(18deg); box-shadow: 0 0 0 48px rgba(248,173,24,.07), 0 0 0 96px rgba(248,173,24,.035); }
.brand { display: flex; gap: 12px; align-items: center; font-weight: 700; letter-spacing: -.02em; position: relative; z-index: 1; }
.brand-logo { width: 280px; height: 104px; max-width: 100%; border-radius: 14px; object-fit: contain; background: #fff; border: 2px solid rgba(255,255,255,.72); box-shadow: 0 6px 18px rgba(8,43,99,.18); }
.login-art .brand-logo { width: 430px; height: 154px; }
.sidebar .brand-logo { width: 205px; height: 76px; }
.company-logo-frame { width: 205px; height: 92px; display: grid; place-items: center; overflow: hidden; border-radius: 12px; background: transparent; }
.company-logo-frame .brand-logo, .company-logo-frame img { width: 100%; height: 100%; padding: 8px; border: 0; border-radius: 0; box-shadow: none; background: transparent; object-fit: contain; transform: translate(var(--logo-x, 0), var(--logo-y, 0)) scale(var(--logo-scale, 1)); }
.company-brand { align-items: center; flex-direction: column; text-align: center; gap: 10px; }
.company-brand .company-logo-frame { display: grid !important; }
.company-brand-text { display: grid !important; gap: 3px; color: #fff; line-height: 1.15; }
.company-brand-text small { color: #b7d4dd; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.brand > span { display: none; }
.hero-copy { max-width: 560px; position: relative; z-index: 1; }
.eyebrow { text-transform: uppercase; font-weight: 700; font-size: 12px; letter-spacing: .16em; color: var(--yellow); }
h1, h2, h3, p { margin-top: 0; }
.hero-copy h1 { font-family: 'Fraunces', Georgia, serif; font-size: clamp(44px, 6vw, 78px); line-height: .98; letter-spacing: -.045em; margin: 16px 0 22px; }
.hero-copy p { color: #cbd8d2; font-size: 18px; line-height: 1.6; max-width: 450px; }
.login-panel { display: grid; place-items: center; padding: 32px; position: relative; }
.login-card { width: min(430px, 100%); background: var(--paper); border: 1px solid rgba(23,63,53,.08); border-radius: 28px; padding: clamp(28px, 5vw, 48px); box-shadow: var(--shadow); }
.login-card h2 { font-family: 'Fraunces', serif; font-size: 35px; margin-bottom: 8px; }
.muted { color: var(--ink-2); }
.field { display: grid; gap: 8px; margin-top: 20px; }
.field label { font-size: 13px; font-weight: 700; }
input, select { width: 100%; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 13px; padding: 13px 14px; outline: none; transition: border .2s, box-shadow .2s; }
input:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(44,107,89,.13); }
input[name="companySlug"], input[name="slug"] { text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.btn { border: 0; border-radius: 13px; padding: 12px 17px; font-weight: 700; background: var(--ink); color: white; transition: transform .15s, opacity .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }
.btn-primary { background: var(--yellow); color: var(--ink); }
.btn-danger { background: #f9e7e3; color: var(--red); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-small { padding: 8px 11px; font-size: 13px; }
.login-card .btn { width: 100%; margin-top: 25px; padding: 15px; }
.demo-note { font-size: 12px; line-height: 1.5; margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink-2); }

.employee-shell { min-height: 100vh; background: radial-gradient(circle at 50% 48%, #0b8e99 0%, #075271 46%, #06275b 100%); color: white; display: grid; grid-template-rows: auto 1fr auto; padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom)); overflow: hidden; position: relative; }
.employee-shell::before, .employee-shell::after { content: ''; position: absolute; border: 1px solid rgba(242,186,56,.26); border-radius: 50%; width: 460px; height: 460px; pointer-events: none; }
.employee-shell::before { left: -330px; top: -160px; }
.employee-shell::after { right: -330px; bottom: -140px; }
.employee-head { display: grid; place-items: center; max-width: 880px; width: 100%; margin: auto; z-index: 1; }
.employee-head .brand { color: white; }
.employee-logo-wrap { display: grid; place-items: center; width: 100%; }
.employee-logo-frame { width: min(330px, 78vw); height: 126px; border-radius: 18px; }
.link-button { border: 0; background: none; color: #b8cbc4; font-weight: 600; padding: 10px; }
.clock-zone { display: grid; place-items: center; align-content: center; text-align: center; z-index: 1; }
.employee-date { color: #b8cbc4; font-size: 16px; text-transform: capitalize; margin-bottom: 5px; }
.employee-time { font-family: 'DM Sans', system-ui, sans-serif; font-size: clamp(64px, 14vw, 122px); font-weight: 700; letter-spacing: -.055em; line-height: 1; font-variant-numeric: tabular-nums; }
.punch-button { width: min(270px, 65vw); aspect-ratio: 1; border-radius: 50%; border: 12px solid rgba(255,255,255,.18); outline: 2px solid rgba(246,165,26,.72); background: radial-gradient(circle at 35% 28%, #fff2b4 0%, #ffd15c 36%, #f6a51a 72%, #d57709 100%); color: #082b63; font-size: 19px; font-weight: 800; margin-top: 38px; box-shadow: 0 25px 70px rgba(0,0,0,.3), inset 0 -10px 0 rgba(121,55,0,.15); transition: transform .18s, box-shadow .18s; }
.punch-button:hover { transform: scale(1.02); box-shadow: 0 28px 80px rgba(0,0,0,.35), inset 0 -8px 0 rgba(0,0,0,.06); }
.punch-button:active { transform: scale(.98); }
.punch-button:disabled { opacity: .65; cursor: wait; }
.employee-status { height: 25px; margin-top: 23px; color: #d4e1dc; font-size: 14px; }
.employee-last-punch { display: grid; gap: 4px; min-width: min(310px, 80vw); margin-top: 10px; padding: 12px 20px; border: 1px solid rgba(248,173,24,.24); border-radius: 14px; background: rgba(35,16,10,.26); }
.employee-last-punch span { color: #f6d89a; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.employee-last-punch strong { color: #fff; font-size: 17px; }
.employee-foot { display: grid; justify-items: center; gap: 6px; text-align: center; font-size: 12px; color: #8ea89f; z-index: 1; }
.employee-name { color: #fff; font-size: 14px; font-weight: 700; }
.employee-logout { color: #fff; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 9px 22px; background: rgba(255,255,255,.08); }
.employee-smartponto { opacity: .7; }

.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 252px 1fr; position: relative; }
.sidebar { background: linear-gradient(180deg, #06275b 0%, #075f78 100%); color: white; padding: 28px 20px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar nav { display: grid; gap: 7px; margin-top: 32px; overflow-y: auto; }
.nav-btn { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border: 0; border-radius: 12px; color: #bbcec7; background: transparent; text-align: left; font-weight: 600; }
.nav-btn:hover, .nav-btn.active { background: rgba(255,255,255,.09); color: white; }
.nav-btn.active { box-shadow: inset 3px 0 var(--yellow); }
.sidebar-bottom { margin-top: auto; }
.powered-by { display: flex; align-items: center; gap: 7px; margin: 12px 10px; color: #9fc2cb; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.powered-by img { width: 105px; height: 34px; padding: 3px; border-radius: 6px; object-fit: contain; background: #fff; }
.branding-form { max-width: 760px; }
.branding-preview { display: grid; place-items: center; min-height: 170px; margin-bottom: 18px; border-radius: 18px; background: linear-gradient(135deg,#eaf4f6,#dbe9ed); }
.preview-frame { width: 300px; height: 130px; }
.preview-frame img { width: 100%; height: 100%; padding: 12px; object-fit: contain; transform: translate(var(--logo-x, 0), var(--logo-y, 0)) scale(var(--logo-scale, 1)); }
.admin-main { padding: 38px clamp(24px, 5vw, 70px) 70px; min-width: 0; }
.page-head { display: flex; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 30px; }
.page-head h1 { font-family: 'Fraunces', serif; font-size: clamp(34px, 5vw, 52px); letter-spacing: -.04em; margin-bottom: 6px; }
.page-head p { color: var(--ink-2); margin-bottom: 0; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.stats.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--paper); border: 1px solid rgba(23,63,53,.1); border-radius: var(--radius); padding: 23px; box-shadow: 0 7px 30px rgba(23,63,53,.055); }
.stat-label { color: var(--ink-2); font-size: 13px; font-weight: 600; }
.stat-value { font-family: 'Fraunces', serif; font-size: 46px; margin-top: 13px; }
.section-card { margin-top: 20px; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 20px; }
.section-title h2 { font-family: 'Fraunces', serif; font-size: 25px; margin-bottom: 0; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.toolbar .field { margin: 0; min-width: 170px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { color: var(--ink-2); text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding: 11px 12px; border-bottom: 1px solid var(--line); }
td { padding: 15px 12px; border-bottom: 1px solid #ebe5d9; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.badge { display: inline-flex; border-radius: 100px; padding: 5px 9px; font-size: 11px; font-weight: 700; background: #e5f0ec; color: var(--green); }
.badge.off { background: #eeeae2; color: #756f64; }
.badge.warning { background: #fff0c7; color: #8c4b00; }
.pending-card { border: 2px solid #ef9f24; background: #fffaf0; }
.pending-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.incomplete-row td { background: rgba(248,173,24,.08); }
.balance-positive { color: var(--green); font-weight: 700; }
.balance-negative { color: var(--red); font-weight: 700; }
.empty { text-align: center; color: var(--ink-2); padding: 38px 10px; }
.action-row { display: flex; gap: 7px; }
.company-cell { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.company-logo { width: 54px; height: 42px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 9px; object-fit: contain; background: #fff; }
.company-logo.placeholder { display: grid; place-items: center; color: var(--ink-2); }

.modal-backdrop { position: fixed; inset: 0; background: rgba(15,37,31,.6); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; z-index: 20; }
.modal { width: min(610px, 100%); max-height: 92vh; overflow-y: auto; background: var(--paper); border-radius: 24px; padding: 28px; box-shadow: var(--shadow); }
.modal h2 { font-family: 'Fraunces', serif; font-size: 29px; }
.shift-modal { width: min(980px, 100%); }
.shift-week-grid { display: grid; gap: 12px; margin-top: 18px; }
.shift-day-row { display: grid; grid-template-columns: 150px 120px 105px 120px 120px 120px; gap: 10px; align-items: end; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.shift-day-row .field { margin: 0; }
.shift-day-enabled, .shift-break-check { margin: 0 0 12px; }
.shift-day-row.disabled { opacity: .52; background: #f5f1e8; }
.punch-confirmation { max-width: 460px; padding: 42px 34px 34px; text-align: center; border: 3px solid var(--yellow); }
.punch-confirmation .confirmation-icon { width: 78px; height: 78px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 50%; background: var(--yellow); color: var(--ink); font-size: 42px; font-weight: 800; box-shadow: 0 10px 25px rgba(185,76,34,.22); }
.punch-confirmation h2 { margin-bottom: 10px; font-size: clamp(36px, 7vw, 48px); line-height: 1.05; }
.punch-confirmation p { margin-bottom: 28px; color: var(--ink-2); font-size: 18px; }
.punch-confirmation .btn { width: 100%; padding: 16px; font-size: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 15px; }
.form-grid .full { grid-column: 1 / -1; }
.logo-preview { width: 150px; height: 82px; margin-top: 4px; border: 1px solid var(--line); border-radius: 12px; object-fit: contain; background: #fff; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 25px; }
.checkline { display: flex; gap: 10px; align-items: center; margin-top: 20px; }
.checkline input { width: auto; }
.password-visibility { margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.weekdays { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.day-check input { display: none; }
.day-check span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: white; font-size: 12px; font-weight: 700; cursor: pointer; }
.day-check input:checked + span { background: var(--ink); color: white; border-color: var(--ink); }
.toast { position: fixed; right: 22px; bottom: 22px; max-width: min(390px, calc(100vw - 44px)); padding: 14px 18px; border-radius: 13px; background: var(--ink); color: white; box-shadow: var(--shadow); z-index: 50; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .24s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: var(--red); }

.signup-page { min-height: 100vh; position: relative; overflow: hidden; background: #eaf6f7; }
.signup-page::before { content: ''; position: fixed; inset: 0; pointer-events: none; opacity: .12; background-image: radial-gradient(#0b7183 .7px, transparent .7px); background-size: 12px 12px; }
.signup-hero { position: relative; z-index: 1; width: min(1120px, calc(100% - 88px)); margin: 0 auto; padding: 36px 0 56px; color: white; background: linear-gradient(135deg, #06275b 0%, #075f78 100%); box-shadow: 0 0 0 100vmax #075f78; clip-path: inset(0 -100vmax 0 -100vmax); }
.signup-top { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: clamp(34px, 6vw, 70px); }
.signup-top .brand-logo { width: 300px; height: 112px; box-sizing: border-box; padding: 12px 18px; }
.signup-login { border-color: rgba(255,255,255,.3); color: white; background: rgba(255,255,255,.08); }
.signup-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .72fr); align-items: center; gap: clamp(26px, 5vw, 70px); }
.signup-copy h1 { max-width: 610px; margin: 16px 0 20px; font-family: 'Fraunces', Georgia, serif; font-size: clamp(44px, 5.5vw, 76px); line-height: .98; letter-spacing: -.045em; }
.signup-copy p { max-width: 590px; color: #f2ffff; font-size: clamp(17px, 2vw, 21px); font-weight: 600; line-height: 1.55; text-shadow: 0 1px 1px rgba(0,0,0,.16); }
.signup-price { display: flex; align-items: baseline; gap: 8px; width: fit-content; margin: 28px 0 14px; padding: 16px 22px; border-radius: 22px; background: var(--yellow); color: var(--ink); box-shadow: 0 18px 50px rgba(0,0,0,.22); }
.signup-price span { font-weight: 900; font-size: 25px; }
.signup-price strong { font-family: 'Fraunces', Georgia, serif; font-size: clamp(58px, 8vw, 92px); line-height: .78; letter-spacing: -.05em; }
.signup-price em { max-width: 116px; font-style: normal; font-weight: 800; line-height: 1.05; }
.signup-deadline { margin: 0 0 18px; color: #fff !important; }
.signup-bullets { display: flex; flex-wrap: wrap; gap: 10px; }
.signup-bullets span { padding: 9px 12px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: rgba(255,255,255,.09); font-weight: 800; color: #fff; }
.signup-card { background: var(--paper); color: var(--ink); border: 1px solid rgba(23,63,53,.12); border-radius: 30px; padding: clamp(24px, 4vw, 36px); box-shadow: 0 28px 80px rgba(2,18,42,.32); }
.signup-card h2 { margin: 8px 0 6px; font-family: 'Fraunces', Georgia, serif; font-size: clamp(30px, 4vw, 42px); letter-spacing: -.04em; }
.signup-card .field { margin-top: 14px; }
.signup-card .btn-primary { width: 100%; margin-top: 20px; padding: 15px; }
.signup-whatsapp { display: block; margin-top: 14px; color: var(--ink); font-weight: 800; text-align: center; text-decoration: none; }
.form-grid.compact { grid-template-columns: .72fr 1fr; gap: 0 12px; }
.signup-features { position: relative; z-index: 1; width: min(1180px, calc(100% - 40px)); margin: 0 auto 50px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.signup-features article { min-height: 136px; display: grid; align-content: start; gap: 8px; padding: 22px; border-radius: 24px; background: #fff; border: 1px solid rgba(23,63,53,.09); box-shadow: 0 10px 35px rgba(23,63,53,.08); }
.signup-features strong { color: var(--ink); font-size: 17px; }
.signup-features span { color: var(--ink-2); line-height: 1.45; }
.signup-success { display: grid; justify-items: center; gap: 13px; text-align: center; padding: 16px 0; }
.signup-success .confirmation-icon { width: 74px; height: 74px; display: grid; place-items: center; border-radius: 50%; background: var(--yellow); color: var(--ink); font-size: 42px; font-weight: 900; }
.signup-success .btn { width: 100%; }

@media (max-width: 820px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-art { min-height: 280px; padding: 30px; }
  .login-art .hero-copy h1 { font-size: 43px; }
  .login-art .hero-copy p { display: none; }
  .login-panel { padding: 22px; margin-top: -30px; }
  .admin-shell { display: block; }
  .sidebar { height: auto; position: static; padding: 18px; }
  .sidebar nav { display: flex; overflow-x: auto; margin-top: 18px; padding-bottom: 4px; }
  .nav-btn { white-space: nowrap; }
  .sidebar .brand { padding-right: 82px; }
  .sidebar-bottom { display: block; position: absolute; top: 24px; right: 16px; margin: 0; }
  .sidebar-bottom .nav-btn { padding: 9px 13px; color: white; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); }
  .company-sidebar { padding: 24px 18px 18px; text-align: center; }
  .company-sidebar .brand { padding-right: 0; width: 100%; justify-content: center; }
  .company-sidebar .company-brand { gap: 12px; }
  .company-sidebar .company-logo-frame { width: min(310px, 78vw); height: 104px; border-radius: 16px; }
  .company-sidebar .company-logo-frame .brand-logo, .company-sidebar .company-logo-frame img { transform: translate(var(--logo-x, 0), var(--logo-y, 0)) scale(var(--logo-scale, 1)); padding: 6px; object-fit: contain; }
  .company-sidebar .company-brand-text strong { font-size: 20px; }
  .company-sidebar .company-brand-text small { font-size: 12px; }
  .company-sidebar .sidebar-bottom { position: static; display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; }
  .company-sidebar .powered-by { margin: 0; }
  .company-sidebar .powered-by img { width: 128px; height: 46px; }
  .company-sidebar .sidebar-bottom .nav-btn { padding: 10px 18px; border-radius: 14px; }
  .admin-main { padding: 28px 17px 50px; }
  .stats { grid-template-columns: 1fr; }
  .stats.four { grid-template-columns: 1fr; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .shift-day-row { grid-template-columns: 1fr 1fr; }
  .shift-day-enabled { grid-column: 1 / -1; }
  .signup-hero { padding-bottom: 34px; }
  .signup-hero { width: min(100% - 56px, 720px); padding-top: 22px; }
  .signup-top { align-items: flex-start; margin-bottom: 28px; }
  .signup-top .brand-logo { width: 218px; height: 84px; padding: 9px 12px; }
  .signup-login { padding: 10px 12px; font-size: 13px; white-space: nowrap; }
  .signup-grid { grid-template-columns: 1fr; gap: 22px; }
  .signup-copy h1 { font-size: 44px; }
  .signup-copy p { font-size: 17px; }
  .signup-price { width: 100%; justify-content: center; }
  .signup-price strong { font-size: 64px; }
  .signup-card { border-radius: 24px; }
  .form-grid.compact { grid-template-columns: 1fr; }
  .signup-features { width: min(100% - 56px, 720px); grid-template-columns: 1fr; margin-bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
