/* Money OS - main page */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  overflow: hidden;
  background: #16845b;
  color: #222;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

/* Desktop */

.desktop {
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1b9b6b, #08784f);
}

/* Desktop icons */

.app {
  position: absolute;
  width: 75px;
  text-align: center;
  user-select: none;
  cursor: default;
  padding: 5px;
  border-radius: 6px;
}

.app:hover {
  background: rgba(255, 255, 255, 0.15);
}

.app-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
}

.app-name {
  color: white;
  font-size: 13px;
  text-shadow: 1px 1px 3px #333;
  white-space: nowrap;
}

/* App windows */

.app-window {
  position: absolute;
  width: 430px;
  min-height: 180px;
  left: 50%;
  top: 100px;
  display: none;
  background: #f5f5f5;
  border: 1px solid #777;
  border-radius: 8px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.app-window.open {
  display: block;
}

.window-header {
  height: 42px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #eeeeee;
  border-bottom: 1px solid #ccc;
  cursor: move;
  user-select: none;
}

.window-title {
  font-weight: bold;
  font-size: 14px;
}

.window-controls {
  display: flex;
  gap: 5px;
}

.window-control {
  width: 30px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
}

.window-control:hover {
  background: #ddd;
}

.window-control.close:hover {
  background: #e85c5c;
  color: white;
}

.window-content {
  padding: 18px;
  max-height: 70vh;
  overflow-y: auto;
}

.window-content h2 {
  margin-top: 0;
}

.window-content h3 {
  margin-bottom: 7px;
}

/* Text boxes and selects */

input,
select,
textarea {
  width: 100%;
  padding: 9px 10px;
  margin: 5px 0;
  border: 1px solid #bbb;
  border-radius: 5px;
  background: white;
  color: #222;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #16845b;
}

textarea {
  min-height: 170px;
  resize: vertical;
}

/* Normal buttons */

.window-content button {
  border: 0;
  padding: 9px 13px;
  margin: 5px 3px 5px 0;
  border-radius: 5px;
  background: #16845b;
  color: white;
}

.window-content button:hover {
  background: #116b49;
}

.balance {
  margin: 10px 0 20px;
  font-size: 32px;
  font-weight: bold;
}

/* Money boxes */

.money-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 10px 0 20px;
}

.money-box {
  padding: 12px;
  background: #e9f5ef;
  border: 1px solid #c6dfd2;
  border-radius: 7px;
  text-align: center;
}

.money-box p {
  margin: 7px 0 0;
  font-size: 18px;
  font-weight: bold;
}

/* Transactions */

.transaction {
  padding: 9px 5px;
  border-bottom: 1px solid #ddd;
  font-size: 14px;
}

.transaction:last-child {
  border-bottom: 0;
}

/* Progress bars */

.progress {
  width: 100%;
  height: 14px;
  margin: 12px 0;
  background: #ddd;
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar {
  width: 0;
  height: 100%;
  background: #16845b;
  border-radius: 10px;
  transition: width 0.3s;
}

/* Statistics */

.stat-card {
  margin: 10px 0;
  padding: 12px;
  background: #eeeeee;
  border-radius: 7px;
}

.stat-card p {
  margin: 0 0 5px;
}

.stat-number {
  font-size: 23px;
  font-weight: bold;
}

.chart {
  height: 170px;
  margin-top: 20px;
  padding: 10px;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 20px;
  background: #eeeeee;
  border-radius: 7px;
}

.bar {
  width: 55px;
  min-height: 4px;
  background: #16845b;
  border-radius: 5px 5px 0 0;
}

/* Calendar */

.calendar {
  text-align: center;
}

.calendar-date {
  margin: 15px auto;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #16845b;
  color: white;
  border-radius: 10px;
  font-size: 48px;
  font-weight: bold;
}

.calendar h2 {
  margin: 8px 0;
}

/* Profile */

.profile {
  text-align: center;
}

.profile-icon {
  font-size: 65px;
  margin-bottom: 8px;
}

.profile-name {
  font-size: 22px;
  font-weight: bold;
}

/* Start menu */

.start-menu {
  position: absolute;
  left: 10px;
  bottom: 72px;
  width: 390px;
  max-height: 560px;
  padding: 18px;
  display: none;
  background: rgba(245, 245, 245, 0.97);
  border: 1px solid #aaa;
  border-radius: 10px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.3);
  z-index: 1000;
}

.start-menu.open {
  display: block;
}

.start-title {
  margin-bottom: 15px;
  font-size: 20px;
  font-weight: bold;
}

.start-search {
  margin: 0 0 15px;
}

.start-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
}

.start-app {
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 6px;
  cursor: pointer;
}

.start-app:hover {
  background: #ddd;
}

.start-app-icon {
  font-size: 25px;
}

/* Taskbar */

.taskbar {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 62px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(25, 25, 25, 0.94);
  box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.25);
  z-index: 2000;
}

.start-button {
  width: 48px;
  height: 46px;
  border: 0;
  border-radius: 7px;
  background: #333;
  color: white;
  font-size: 29px;
}

.start-button:hover {
  background: #444;
}

.taskbar-search {
  width: 180px;
  height: 42px;
  margin: 0;
  border: 0;
  border-radius: 7px;
  background: #444;
  color: white;
}

.taskbar-search::placeholder {
  color: #ddd;
}

.taskbar-apps {
  display: flex;
  gap: 5px;
}

.taskbar-app {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-size: 24px;
}

.taskbar-app:hover {
  background: #444;
}

.taskbar-spacer {
  flex: 1;
}

.system-tray {
  height: 48px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
}

.system-icons {
  font-size: 15px;
}

.clock-area {
  min-width: 75px;
  text-align: right;
  font-size: 12px;
}

#clock {
  font-size: 14px;
  font-weight: bold;
}

/* Notifications */

.notification {
  position: absolute;
  right: 20px;
  bottom: 80px;
  max-width: 300px;
  padding: 12px 16px;
  display: none;
  background: #222;
  color: white;
  border-radius: 7px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  z-index: 5000;
}

/* Lock screen */

.lock-screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #16845b, #075b3b);
  color: white;
  z-index: 10000;
}

.lock-screen h2 {
  margin: 5px 0;
}

.lock-screen input {
  width: 240px;
  text-align: center;
}

.lock-screen button {
  padding: 9px 25px;
  border: 0;
  border-radius: 5px;
  background: white;
  color: #16845b;
  font-weight: bold;
}

.lock-screen button:hover {
  background: #eee;
}


/* Dark mode */

body.dark {
  background: #111;
  color: #eee;
}

body.dark .app-window {
  background: #242424;
  color: #eee;
  border-color: #555;
}

body.dark .window-header {
  background: #303030;
  border-color: #555;
}

body.dark .window-control:hover {
  background: #444;
}

body.dark input,
body.dark select,
body.dark textarea {
  background: #333;
  color: white;
  border-color: #555;
}

body.dark .money-box,
body.dark .stat-card,
body.dark .chart {
  background: #303030;
  border-color: #4a4a4a;
}

body.dark .transaction {
  border-color: #444;
}

body.dark .start-menu {
  background: #242424;
  color: white;
  border-color: #555;
}

body.dark .start-app:hover {
  background: #3a3a3a;
}

body.dark .progress {
  background: #444;
}
