@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  font-family: "IBM Plex Sans Arabic", "Manrope", sans-serif;
  color: #172b2a;
  background: #f4f7f5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #172b2a;
  --muted: #788783;
  --line: #e8eeea;
  --green: #217c68;
  --green-dark: #145c4e;
  --soft-green: #eaf5f0;
  --white: #fff;
  --shadow: 0 14px 42px rgba(27, 61, 51, 0.055);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 5;
  display: flex;
  flex-direction: column;
  width: 258px;
  padding: 28px 18px 20px;
  color: #d8e8e1;
  background: #102a2a;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 34px; color: #fff; font-size: 16px; font-weight: 700; }
.brand small { display: block; margin-top: 2px; color: #8ca9a0; font-size: 11px; font-weight: 400; }
.brand-icon { display: grid; width: 41px; height: 41px; place-items: center; border-radius: 14px; background: #267c68; color: #fff; font-size: 20px; }
.side-nav { display: grid; gap: 6px; }
.nav-link { display: flex; align-items: center; gap: 13px; min-height: 45px; padding: 0 13px; border-radius: 11px; color: #a8c0b7; font-size: 13px; transition: .18s ease; }
.nav-link > span { width: 20px; color: #86a59a; font-size: 17px; text-align: center; }
.nav-link:hover, .nav-link.active { color: #fff; background: #1a4140; }
.nav-link.active > span { color: #80d2ae; }
.sidebar-foot { display: flex; align-items: center; gap: 9px; margin-top: auto; padding: 16px 11px 2px; color: #91aba1; font-size: 10px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #70d2a4; box-shadow: 0 0 0 4px #244944; }

.main-area { width: min(100% - 258px, 1530px); min-height: 100vh; margin-right: 258px; padding: 40px clamp(24px, 4.2vw, 66px) 22px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.topbar h1 { margin: 4px 0 0; font-size: clamp(25px, 3vw, 33px); letter-spacing: -.7px; }
.topbar-description { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.eyebrow { color: var(--green); font-size: 10px; font-weight: 700; letter-spacing: .7px; }
.local-badge { flex: 0 0 auto; padding: 8px 12px; border: 1px solid #dfe9e3; border-radius: 99px; background: #fff; color: #668077; font-size: 10px; }
.language-switch { display: inline-flex; flex: 0 0 auto; gap: 3px; padding: 4px; border: 1px solid #dfe9e3; border-radius: 99px; background: #fff; }
.language-switch button { min-width: 38px; padding: 6px 8px; border: 0; border-radius: 99px; background: transparent; color: #74847d; font-size: 10px; font-weight: 700; }
.language-switch button[aria-pressed="true"] { background: #e9f4ee; color: var(--green-dark); }
.language-switch button:focus-visible { outline: 2px solid #398b70; outline-offset: 2px; }
.content-stack { display: grid; gap: 22px; }
.section-block { margin-top: 34px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 17px; }
.section-heading h2 { margin: 4px 0 0; font-size: 21px; }
.muted, .helper-text { color: var(--muted); font-size: 11px; }
.page-footer { display: flex; justify-content: space-between; gap: 15px; margin-top: 40px; padding: 19px 2px 0; border-top: 1px solid var(--line); color: #96a49e; font-size: 10px; }

.welcome-panel { position: relative; display: flex; min-height: 284px; overflow: hidden; align-items: center; justify-content: space-between; padding: 38px clamp(26px, 4vw, 55px); border-radius: 24px; background: linear-gradient(115deg, #183e3b 0%, #205b4e 57%, #31836a 100%); color: #fff; }
.welcome-copy { position: relative; z-index: 1; max-width: 510px; }
.eyebrow.light { color: #9fe0c4; }
.welcome-copy h2 { margin: 12px 0 10px; font-size: clamp(27px, 3.5vw, 39px); line-height: 1.45; }
.welcome-copy p { max-width: 440px; margin: 0 0 21px; color: #c8ded5; font-size: 13px; line-height: 1.9; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 42px; padding: 0 17px; border: 0; border-radius: 10px; font-size: 12px; font-weight: 700; transition: .18s ease; }
.button:hover { transform: translateY(-1px); }
.button-light { background: #fff; color: #1b5a4b; }
.button-primary { background: var(--green); color: #fff; }
.button-primary:hover { background: var(--green-dark); }
.button-quiet { border: 1px solid var(--line); background: #fff; color: #64756f; }
.welcome-art { position: absolute; inset: 0 auto 0 2%; width: 40%; opacity: .95; }
.art-ring { position: absolute; top: -70px; left: 15%; width: 340px; height: 340px; border: 1px solid #ffffff30; border-radius: 50%; box-shadow: 0 0 0 34px #ffffff0c, 0 0 0 68px #ffffff08; }
.art-card { position: absolute; top: 61px; left: 20%; display: flex; width: 174px; height: 164px; flex-direction: column; justify-content: space-between; padding: 18px; border: 1px solid #ffffff40; border-radius: 17px; background: #ffffff1d; box-shadow: 0 20px 50px #0a292044; backdrop-filter: blur(12px); transform: rotate(-7deg); }
.art-card span { color: #d2eadf; font-size: 10px; }
.art-card strong { font-size: 20px; line-height: 1.35; }
.art-card i { position: absolute; bottom: 18px; left: 18px; color: #a8e7c8; font-size: 19px; font-style: normal; }
.art-dot { position: absolute; width: 13px; height: 13px; border-radius: 50%; background: #9ce1bd; box-shadow: 0 0 30px #b5f7d9; }
.dot-a { top: 42px; left: 57%; }.dot-b { bottom: 48px; left: 12%; width: 8px; height: 8px; }
html[dir="ltr"] .welcome-art { inset: 0 2% 0 auto; }
html[dir="ltr"] .welcome-copy { max-width: 54%; }

.app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.app-card { position: relative; display: flex; min-height: 207px; flex-direction: column; align-items: flex-start; padding: 21px; border: 1px solid #e9efeb; border-radius: 16px; background: #fff; box-shadow: 0 5px 20px #153d3010; transition: .2s ease; }
.app-card:hover { border-color: #c9dfd3; box-shadow: var(--shadow); transform: translateY(-3px); }
.app-icon { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 12px; font-size: 20px; }
.icon-green { background: #e8f5ee; color: #298162; }.icon-blue { background: #eaf2fc; color: #4b7db0; }.icon-violet { background: #f1edfb; color: #755db1; }.icon-orange { background: #fff2e4; color: #bf7c34; }.icon-pink { background: #fcecf1; color: #bd6780; }
.card-kicker { margin-top: 15px; color: #94a29d; font-size: 9px; }
.app-card h3 { margin: 3px 0 5px; font-size: 15px; }
.app-card p { margin: 0 0 15px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.card-link { display: flex; width: 100%; justify-content: space-between; margin-top: auto; color: var(--green); font-size: 10px; font-weight: 700; }

.panel { padding: 22px; border: 1px solid #e9efeb; border-radius: 16px; background: #fff; box-shadow: 0 5px 20px #153d3008; }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.panel-header h2, .panel h2 { margin: 0; font-size: 16px; }
.panel-header p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.stat-card { min-height: 112px; padding: 17px; border: 1px solid #e9efeb; border-radius: 14px; background: #fff; }
.stat-label { display: block; color: var(--muted); font-size: 10px; }
.stat-value { display: block; margin-top: 11px; color: var(--ink); font-size: 23px; font-weight: 700; letter-spacing: -.5px; }
.stat-note { display: block; margin-top: 4px; color: #93a39c; font-size: 9px; }
.two-column { display: grid; grid-template-columns: minmax(240px, .75fr) minmax(0, 1.45fr); align-items: start; gap: 18px; }
.form-grid { display: grid; gap: 12px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.field { display: grid; gap: 6px; }
.field label { color: #5e7069; font-size: 10px; font-weight: 600; }
.field input, .field select, .field textarea, .search-input { width: 100%; min-width: 0; padding: 10px 11px; border: 1px solid #e1e9e4; border-radius: 9px; outline: 0; background: #fff; color: var(--ink); font-size: 11px; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus, .field textarea:focus, .search-input:focus { border-color: #75b59b; box-shadow: 0 0 0 3px #e8f5ed; }
.field textarea { min-height: 75px; resize: vertical; }
.field .button { width: 100%; margin-top: 3px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: right; white-space: nowrap; }
.data-table th { padding: 10px 9px; border-bottom: 1px solid var(--line); color: #96a29d; font-size: 9px; font-weight: 600; }
.data-table td { padding: 13px 9px; border-bottom: 1px solid #f0f3f1; color: #52625c; font-size: 10px; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.item-title { color: var(--ink); font-size: 11px; font-weight: 700; }
.subtext { display: block; margin-top: 3px; color: #9aa7a1; font-size: 9px; }
.pill { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 99px; background: #edf6f0; color: #418269; font-size: 9px; }
.pill.warning { background: #fff4e5; color: #af7935; }.pill.danger { background: #fff0ed; color: #ba6958; }.pill.neutral { background: #f0f3f1; color: #73817a; }
.icon-button { display: inline-grid; width: 29px; height: 29px; place-items: center; border: 1px solid #e9efeb; border-radius: 8px; background: #fff; color: #8b9993; }
.icon-button:hover { border-color: #f0d7d3; background: #fff5f3; color: #be6d5b; }
.empty-row { padding: 25px!important; color: #9aa7a1!important; text-align: center; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.toolbar .search-input { max-width: 230px; }
.filters { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-button { padding: 7px 11px; border: 1px solid #e5ece7; border-radius: 99px; background: #fff; color: #76857e; font-size: 10px; }
.filter-button.active { border-color: #cde4d6; background: #edf7f1; color: var(--green); }
.task-list, .booking-list, .expense-list { display: grid; gap: 9px; }
.task-row, .booking-row, .expense-row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 11px 12px; border: 1px solid #edf1ee; border-radius: 11px; background: #fff; }
.task-check { flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--green); }
.task-main, .booking-main, .expense-main { flex: 1; min-width: 0; }
.task-main strong, .booking-main strong, .expense-main strong { display: block; overflow: hidden; color: #263a34; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.task-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 5px; color: #92a099; font-size: 9px; }
.task-row.completed strong { color: #9ca9a2; text-decoration: line-through; }
.priority-dot { display: inline-block; width: 7px; height: 7px; margin-left: 4px; border-radius: 50%; background: #8db6a1; }.priority-dot.high { background: #d77f69; }.priority-dot.medium { background: #d5a84d; }
.progress-track { width: 100%; height: 7px; overflow: hidden; border-radius: 99px; background: #edf2ee; }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #398b70, #75c39c); }
.category-bars { display: grid; gap: 15px; }
.category-bar-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 7px; color: #66766f; font-size: 10px; }
.category-bar-head strong { color: #31453e; }
.month-label { color: var(--muted); font-size: 10px; }
.amount { color: var(--ink); font-weight: 700; }
.toast { position: fixed; z-index: 20; right: 50%; bottom: 25px; max-width: calc(100% - 30px); padding: 12px 18px; border-radius: 10px; background: #173b34; box-shadow: 0 12px 40px #102a2a30; color: #fff; font-size: 11px; opacity: 0; pointer-events: none; transform: translate(50%, 10px); transition: .22s ease; }
.toast.visible { opacity: 1; transform: translate(50%, 0); }

[dir="ltr"] .sidebar { inset: 0 auto 0 0; }
[dir="ltr"] .main-area { margin-right: 0; margin-left: 258px; }

@media (max-width: 1050px) {
  .sidebar { width: 220px; }
  .main-area { width: calc(100% - 220px); margin-right: 220px; padding-inline: 25px; }
  [dir="ltr"] .main-area { margin-right: 0; margin-left: 220px; }
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .sidebar { position: static; width: auto; padding: 13px 16px; }
  .brand { padding: 0 2px 12px; }
  .brand-icon { width: 35px; height: 35px; }
  .side-nav { display: flex; gap: 5px; overflow-x: auto; padding: 2px 0 5px; }
  .nav-link { flex: 0 0 auto; min-height: 37px; gap: 7px; padding: 0 10px; font-size: 10px; }
  .nav-link > span { width: 15px; font-size: 14px; }
  .sidebar-foot { display: none; }
  .main-area { width: 100%; min-height: auto; margin: 0; padding: 26px 18px 18px; }
  [dir="ltr"] .main-area { margin: 0; }
  .topbar { align-items: flex-start; margin-bottom: 24px; }
  .topbar h1 { font-size: 25px; }
  .local-badge { padding: 7px 9px; font-size: 9px; }
  .language-switch { gap: 0; padding: 3px; }
  .language-switch button { min-width: 31px; padding-inline: 5px; font-size: 9px; }
  .welcome-panel { min-height: 310px; align-items: flex-start; padding: 28px 24px; }
  .welcome-copy { max-width: 100%; }
  html[dir="ltr"] .welcome-copy { max-width: 100%; }
  .welcome-copy h2 { font-size: 28px; }
  .welcome-copy p { max-width: 390px; font-size: 11px; }
  .welcome-art { inset: auto 0 0 auto; width: 47%; height: 130px; opacity: .45; }
  html[dir="ltr"] .welcome-panel { flex-direction: column; }
  html[dir="ltr"] .welcome-art { position: relative; inset: auto; align-self: stretch; width: 100%; flex: 0 0 130px; }
  html[dir="ltr"] .welcome-art .art-card { right: 18%; left: auto; }
  .art-ring { top: 0; left: -15%; width: 230px; height: 230px; }
  .art-card { top: 7px; left: 18%; width: 112px; height: 100px; padding: 11px; }
  .art-card strong { font-size: 14px; }.art-card span { font-size: 8px; }.art-card i { bottom: 9px; left: 10px; font-size: 13px; }
  .section-block { margin-top: 27px; }
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .app-card { min-height: 205px; padding: 15px; }
  .app-card p { font-size: 10px; }
  .two-column { grid-template-columns: 1fr; }
}
@media (max-width: 450px) {
  .main-area { padding-inline: 13px; }
  .topbar { gap: 8px; }
  .topbar h1 { font-size: 22px; }
  .local-badge { font-size: 8px; }
  .app-grid { grid-template-columns: 1fr; }
  .app-card { min-height: 185px; }
  .stats-grid { gap: 8px; }
  .stat-card { min-height: 100px; padding: 13px; }
  .stat-value { font-size: 20px; }
  .panel { padding: 16px; }
  .form-row { grid-template-columns: 1fr; }
  .toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar .search-input { max-width: none; }
  .welcome-panel { min-height: 330px; padding-inline: 19px; }
  .page-footer { flex-direction: column; gap: 5px; }
}
