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

:root {
  --ink: #12243a;
  --muted: #6c7b8d;
  --cream: #f5f5f0;
  --surface: #ffffff;
  --line: #e6e8e5;
  --navy: #102c48;
  --navy-soft: #e9f0f4;
  --teal: #0d796f;
  --teal-soft: #dff4ef;
  --coral: #e36a53;
  --gold: #e8a84a;
  --shadow: 0 12px 32px rgba(18, 36, 58, .08);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: 'DM Sans', Arial, sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 26px 16px 18px; background: var(--navy); color: #eaf1f4; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 28px; color: #fff; font-size: 20px; font-weight: 700; letter-spacing: -.4px; }
.brand-mark { width: 30px; height: 30px; border-radius: 10px 10px 10px 3px; background: #b8e3d7; color: var(--navy); display: grid; place-items: center; font-family: Georgia, serif; font-weight: 700; }
.workspace-chip { margin: 0 5px 23px; padding: 11px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; display: flex; align-items: center; gap: 10px; font-size: 12px; }
.workspace-chip .mini-logo, .avatar { display: grid; place-items: center; font-weight: 700; background: #ffcf88; color: #643919; border-radius: 50%; }
.mini-logo { width: 27px; height: 27px; font-size: 11px; }
.muted-light { color: #a7b6c4; font-size: 11px; display: block; margin-top: 2px; }
.nav-label { color: #91a6b8; padding: 0 12px; margin: 10px 0 6px; font-size: 10px; font-weight: 700; letter-spacing: .13em; }
.nav-item { width: 100%; border: 0; background: transparent; color: #c7d2dc; display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 9px; text-align: left; margin: 2px 0; font-size: 14px; }
.nav-item:hover, .nav-item.active { background: rgba(201, 239, 228, .13); color: #fff; }
.nav-icon { width: 19px; text-align: center; color: #b6ddcf; font-size: 17px; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid rgba(255,255,255,.12); padding: 17px 7px 0; }
.profile-row { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; background: #d4e7e3; color: var(--teal); font-size: 12px; }
.profile-row strong { display: block; color: #fff; font-size: 13px; }
.profile-row small { color: #a7b6c4; font-size: 11px; }
.main { min-width: 0; }
.topbar { height: 80px; padding: 0 clamp(24px, 4vw, 58px); display: flex; align-items: center; justify-content: space-between; background: rgba(245,245,240,.88); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 3; backdrop-filter: blur(14px); }
.breadcrumb { font-size: 13px; color: var(--muted); }
.breadcrumb b { color: var(--ink); font-weight: 600; }
.top-actions { display: flex; gap: 12px; align-items: center; }
.icon-button { border: 1px solid var(--line); width: 38px; height: 38px; border-radius: 11px; background: #fff; color: var(--ink); font-size: 16px; }
.mobile-menu { display: none; }
.page { padding: 34px clamp(24px, 4vw, 58px) 56px; max-width: 1520px; margin: 0 auto; }
.eyebrow { color: var(--teal); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 8px; }
h1 { margin: 0; font-family: 'Playfair Display', Georgia, serif; font-size: clamp(31px, 3.4vw, 46px); line-height: 1.05; letter-spacing: -1.5px; }
.intro { color: var(--muted); margin: 10px 0 0; font-size: 15px; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 29px; }
.primary-button, .secondary-button, .danger-button { border: 0; border-radius: 10px; min-height: 42px; padding: 0 16px; font-weight: 700; font-size: 13px; transition: transform .15s, box-shadow .15s; }
.primary-button { background: var(--teal); color: #fff; box-shadow: 0 5px 12px rgba(13,121,111,.22); }
.primary-button:hover { transform: translateY(-1px); }
.secondary-button { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.danger-button { background: #fff2ee; color: #b64b3d; border: 1px solid #ffd9d2; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr); gap: 22px; }
.stack { display: grid; gap: 22px; align-content: start; }
.card { background: var(--surface); border: 1px solid rgba(211,216,211,.7); border-radius: 16px; box-shadow: var(--shadow); }
.card-pad { padding: 24px; }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 19px; }
.section-title { margin: 0; font-size: 16px; letter-spacing: -.2px; }
.subtle-action { border: 0; color: var(--teal); background: transparent; font-weight: 700; font-size: 12px; }
.profile-card { overflow: hidden; }
.profile-cover { height: 88px; background: linear-gradient(125deg, #c7e6df, #edf3d9 56%, #f9e7be); }
.profile-content { padding: 0 25px 23px; display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 18px; }
.large-avatar { margin-top: -38px; width: 84px; height: 84px; border: 5px solid #fff; font-size: 23px; }
.employee-name { padding-bottom: 3px; }
.employee-name h2 { margin: 0; font-size: 21px; letter-spacing: -.5px; }
.employee-name p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; }
.badge.green { background: var(--teal-soft); color: #087165; }
.badge.gold { background: #fff1d9; color: #a86610; }
.badge.gray { background: #eef1f3; color: #647283; }
.badge.red { background: #fff0ed; color: #be4f41; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.info-item { padding: 16px 20px; border-right: 1px solid var(--line); }
.info-item:last-child { border-right: 0; }
.info-item span { color: var(--muted); font-size: 11px; display: block; margin-bottom: 5px; }
.info-item b { font-size: 13px; }
.balance-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.balance-box { border-radius: 12px; padding: 15px; min-height: 110px; background: #f7f8f7; }
.balance-box.accent { background: var(--navy); color: #fff; }
.balance-box small { display: block; color: var(--muted); font-size: 11px; }
.balance-box.accent small { color: #b6cbd6; }
.balance-box b { display: block; margin: 13px 0 2px; font-family: 'Playfair Display', Georgia, serif; font-size: 29px; line-height: 1; }
.balance-box span { font-size: 11px; }
.request-list { display: grid; gap: 12px; }
.request-item { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.request-item:last-child { border-bottom: 0; }
.request-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: #eef7f4; color: var(--teal); }
.request-item strong { font-size: 13px; display: block; }
.request-item small { color: var(--muted); font-size: 11px; display: block; margin-top: 3px; }
.request-item .badge { justify-self: end; }
.notice { border-radius: 14px; padding: 19px; background: #fff8e9; border: 1px solid #f7e4b8; }
.notice strong { font-size: 13px; display: block; margin-bottom: 5px; }
.notice p { margin: 0; color: #775e31; font-size: 12px; line-height: 1.55; }
.calendar-mini { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.calendar-mini span { color: var(--muted); font-size: 10px; padding: 5px 0; }
.calendar-mini b { min-height: 29px; padding-top: 7px; font-size: 11px; font-weight: 500; border-radius: 8px; }
.calendar-mini .holiday { color: #a86610; background: #fff0d6; }
.calendar-mini .today { color: #fff; background: var(--teal); }
.two-columns { display: grid; grid-template-columns: minmax(290px, .83fr) minmax(0, 1.17fr); gap: 22px; align-items: start; }
.form-card { padding: 24px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #dce1df; background: #fbfcfb; color: var(--ink); border-radius: 9px; padding: 10px 11px; outline: none; font-size: 13px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13,121,111,.11); }
.field textarea { min-height: 86px; resize: vertical; }
.calculation { margin: 18px 0; background: var(--navy-soft); padding: 13px; border-radius: 10px; color: #38526a; font-size: 12px; line-height: 1.5; }
.calculation b { color: var(--navy); }
.empty { padding: 33px 15px; text-align: center; color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 630px; }
th { color: var(--muted); text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; padding: 0 14px 11px; }
td { border-top: 1px solid var(--line); padding: 14px; vertical-align: middle; font-size: 12px; }
.person-cell { display: flex; align-items: center; gap: 9px; }
.small-avatar { width: 30px; height: 30px; font-size: 10px; }
.action-link { border: 0; background: none; color: var(--teal); font-size: 12px; font-weight: 700; padding: 3px; }
.admin-hero { padding: 29px; color: #fff; background: radial-gradient(circle at 78% 5%, rgba(117,215,192,.22), transparent 30%), var(--navy); border-radius: 17px; position: relative; overflow: hidden; }
.admin-hero:after { content: ''; position: absolute; width: 190px; height: 190px; border-radius: 50%; border: 38px solid rgba(255,255,255,.06); right: -55px; bottom: -105px; }
.admin-hero h1 { font-size: clamp(28px, 3.5vw, 42px); max-width: 540px; }
.admin-hero p { max-width: 600px; color: #c2d2dc; font-size: 14px; line-height: 1.55; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-top: 24px; }
.admin-stat { padding: 13px; border: 1px solid rgba(255,255,255,.14); border-radius: 11px; background: rgba(255,255,255,.06); }
.admin-stat b { display: block; font-family: 'Playfair Display', Georgia, serif; font-size: 25px; }
.admin-stat span { color: #c2d2dc; font-size: 11px; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(290px, .75fr); gap: 22px; margin-top: 22px; }
.approval-card { padding: 21px; }
.approval-card + .approval-card { border-top: 1px solid var(--line); }
.approval-top { display: flex; justify-content: space-between; gap: 10px; }
.approval-card h3 { margin: 2px 0 4px; font-size: 15px; }
.approval-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.approval-meta { display: flex; gap: 13px; margin: 13px 0; color: #4c5f71; font-size: 11px; flex-wrap: wrap; }
.email-preview { padding: 17px; background: #f5f8fa; border: 1px dashed #cddae0; border-radius: 11px; }
.email-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; margin-bottom: 12px; }
.email-subject { font-weight: 700; font-size: 12px; margin-bottom: 7px; }
.email-preview p { margin: 0; color: #50667a; font-size: 11px; line-height: 1.5; }
.email-button { display: inline-block; margin-top: 10px; padding: 7px 9px; background: var(--teal); border-radius: 6px; color: #fff; font-size: 10px; font-weight: 700; }
.module-list { display: grid; gap: 10px; }
.module-item { padding: 13px; border: 1px solid var(--line); border-radius: 11px; display: flex; align-items: center; gap: 10px; }
.module-glyph { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; background: var(--navy-soft); color: var(--navy); }
.module-item strong { display: block; font-size: 12px; }
.module-item small { color: var(--muted); font-size: 10px; }
.switch { width: 36px; height: 21px; border-radius: 99px; border: 0; background: #d1d9d8; position: relative; margin-left: auto; }
.switch:after { content: ''; width: 15px; height: 15px; background: #fff; border-radius: 50%; position: absolute; top: 3px; left: 3px; transition: .2s; }
.switch.on { background: var(--teal); }
.switch.on:after { left: 18px; }
.holiday-list { display: grid; gap: 8px; max-height: 330px; overflow: auto; }
.holiday-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.holiday-row:last-child { border-bottom: 0; }
.holiday-row small { color: var(--muted); }
.toast { position: fixed; z-index: 10; bottom: 26px; right: 26px; background: var(--navy); color: white; box-shadow: 0 10px 28px rgba(0,0,0,.18); padding: 13px 15px; border-radius: 11px; font-size: 13px; transform: translateY(110px); opacity: 0; transition: .25s; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { background: #b64b3d; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 1.05fr) minmax(350px, .95fr); background: #fff; }
.login-panel { color: #fff; background: radial-gradient(circle at 80% 12%, rgba(138, 223, 196, .25), transparent 25%), radial-gradient(circle at 24% 88%, rgba(255, 206, 132, .16), transparent 29%), var(--navy); padding: clamp(35px, 8vw, 112px); display: flex; justify-content: center; flex-direction: column; }
.login-brand { padding: 0; margin-bottom: auto; }
.login-panel h1 { font-size: clamp(42px, 5vw, 64px); max-width: 580px; letter-spacing: -2px; }
.login-panel h1 em { color: #b8e3d7; font-weight: 600; }
.login-panel > p:not(.eyebrow) { color: #c6d5dc; font-size: 16px; line-height: 1.6; max-width: 500px; margin: 20px 0 32px; }
.login-highlights { display: flex; gap: 12px; flex-wrap: wrap; }
.login-highlights span { font-size: 12px; padding: 8px 11px; border: 1px solid rgba(255,255,255,.17); background: rgba(255,255,255,.07); border-radius: 99px; color: #d5e5e7; }
.login-form-wrap { display: grid; place-items: center; padding: 34px; background: #fbfcfa; }
.login-form { width: min(390px, 100%); }
.login-form h2 { font-family: 'Playfair Display', Georgia, serif; margin: 0; font-size: 38px; letter-spacing: -1px; }
.login-form .field { margin-top: 18px; }
.login-submit { width: 100%; margin-top: 24px; min-height: 48px; }
.demo-note { margin: 22px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; padding: 13px; background: #f0f4f2; border-radius: 9px; }
.demo-note b { color: var(--ink); }
.demo-note span { color: var(--teal); font-weight: 700; }
.company-logo { width: 28px; height: 28px; object-fit: contain; border-radius: 8px; background: #fff; }
.management-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr); gap: 22px; align-items: start; }
.company-management { grid-template-columns: minmax(0, 1.22fr) minmax(330px, .78fr); }
.company-list { display: grid; gap: 11px; }
.company-card { border: 1px solid var(--line); border-radius: 13px; padding: 15px; background: #fbfcfb; }
.company-card-head { display: flex; gap: 11px; align-items: center; }
.company-card h3 { margin: 0; font-size: 14px; }
.company-card p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.company-letter, .logo-preview { width: 39px; height: 39px; border-radius: 11px; background: var(--navy-soft); color: var(--navy); display: grid; place-items: center; font-weight: 700; object-fit: contain; }
.logo-preview { background: #fff; border: 1px solid var(--line); }
.company-meta { display: grid; gap: 3px; margin: 13px 0 0 50px; color: var(--muted); font-size: 11px; }
.company-meta b { display: block; color: var(--ink); font-size: 11px; }
.file-label { display: inline-flex; align-items: center; }
.form-help { display: block; color: var(--muted); font-size: 10px; margin-top: -2px; }
select[multiple] { min-height: 130px; }

@media (max-width: 1020px) {
  .app-shell { grid-template-columns: 76px 1fr; }
  .sidebar { padding: 20px 10px; align-items: center; }
  .brand { padding: 0 0 28px; font-size: 0; }
  .brand-mark { width: 34px; height: 34px; }
  .workspace-chip { display: none; }
  .nav-label { display: none; }
  .nav-item { justify-content: center; padding: 12px; font-size: 0; }
  .nav-icon { font-size: 18px; }
  .profile-row { justify-content: center; }
  .profile-row div { display: none; }
  .sidebar-bottom { padding: 15px 0 0; width: 100%; }
  .dashboard-grid, .two-columns, .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .app-shell { display: block; }
  .sidebar { display: none; position: fixed; z-index: 9; width: 240px; align-items: stretch; }
  .sidebar.open { display: flex; }
  .sidebar.open .brand { font-size: 20px; }
  .sidebar.open .workspace-chip { display: flex; }
  .sidebar.open .nav-label { display: block; }
  .sidebar.open .nav-item { justify-content: flex-start; font-size: 14px; }
  .sidebar.open .profile-row { justify-content: flex-start; }
  .sidebar.open .profile-row div { display: block; }
  .mobile-menu { display: inline-grid; place-items: center; }
  .topbar { height: 66px; padding: 0 18px; }
  .breadcrumb { font-size: 11px; }
  .page { padding: 26px 18px 42px; }
  .page-heading { display: block; }
  .page-heading .button-row { margin-top: 17px; }
  .profile-content { grid-template-columns: auto 1fr; }
  .profile-content > .badge { display: none; }
  .info-grid { grid-template-columns: 1fr; }
  .info-item { border-right: 0; border-bottom: 1px solid var(--line); }
  .info-item:last-child { border-bottom: 0; }
  .balance-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .toast { left: 18px; right: 18px; bottom: 18px; }
  .login-page { grid-template-columns: 1fr; }
  .login-panel { min-height: 410px; padding: 32px 25px; }
  .login-panel h1 { font-size: 42px; }
  .login-form-wrap { padding: 38px 24px; }
  .management-grid, .company-management { grid-template-columns: 1fr; }
}
