:root {
  --nos-bg: #fff;
  --nos-text: #111;
  --nos-muted: #777;
  --nos-line: #ececec;
  --nos-soft: #f8f8f8;
  --nos-blue: #2f6bff;
  --nos-blue-soft: #f2f5ff;
  --nos-danger: #d93030;
  --nos-radius: 14px;
}

#nomkamo-os-root {
  min-height: 100vh;
  background: var(--nos-bg);
  color: var(--nos-text);
  font-family: Arial, sans-serif;
  font-size: 13px;
  line-height: 1.35;
}

#nomkamo-os-root * {
  box-sizing: border-box;
}

.nos-login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 0.9fr;
}

.nos-login-hero {
  padding: 42px 46px;
  border-right: 1px solid var(--nos-line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.nos-brand {
  font-size: 12px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.nos-login-title {
  margin: 60px 0 18px;
  font-size: clamp(42px, 7vw, 92px);
  line-height: 0.9;
  letter-spacing: -0.075em;
}

.nos-login-subtitle,
.nos-small,
.nos-subtitle,
.nos-empty,
.nos-version {
  color: var(--nos-muted);
}

.nos-login-subtitle {
  max-width: 560px;
  font-size: 14px;
}

.nos-login-card-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.nos-card {
  width: 100%;
  max-width: 360px;
  padding: 24px;
  border: 1px solid var(--nos-line);
  border-radius: var(--nos-radius);
}

.nos-card h2 {
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.nos-card p {
  margin: 0 0 18px;
  color: var(--nos-muted);
  font-size: 13px;
}

.nos-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px 1fr;
}

.nos-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  border-right: 1px solid var(--nos-line);
  background: #fff;
  overflow: auto;
}

.nos-logo {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.nos-version {
  margin-bottom: 24px;
  font-size: 11px;
}

.nos-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nos-menu button {
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  font-size: 12px;
  cursor: pointer;
}

.nos-menu button:hover {
  background: var(--nos-soft);
}

.nos-menu button.active {
  background: #111;
  color: #fff;
}

.nos-sidebar-bottom {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--nos-line);
}

.nos-main {
  min-width: 0;
  padding: 24px;
}

.nos-topbar {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.nos-title {
  margin: 0;
  font-size: clamp(34px, 4.5vw, 64px);
  line-height: 0.92;
  letter-spacing: -0.075em;
}

.nos-subtitle {
  margin-top: 9px;
  font-size: 12px;
}

.nos-pill {
  padding: 8px 11px;
  border: 1px solid var(--nos-line);
  border-radius: 999px;
  color: var(--nos-muted);
  font-size: 11px;
  white-space: nowrap;
}

.nos-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.nos-stat,
.nos-panel {
  border: 1px solid var(--nos-line);
  border-radius: var(--nos-radius);
  background: #fff;
}

.nos-stat {
  min-height: 96px;
  padding: 15px;
}

.nos-stat-label {
  margin-bottom: 14px;
  color: var(--nos-muted);
  font-size: 11px;
}

.nos-stat-value {
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.07em;
}

.nos-panel {
  overflow: hidden;
}

.nos-panel + .nos-panel {
  margin-top: 14px;
}

.nos-panel-head {
  padding: 13px 15px;
  border-bottom: 1px solid var(--nos-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nos-panel-title {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.04em;
}

.nos-empty {
  padding: 18px 15px;
  font-size: 12px;
}

.nos-table-wrap {
  overflow: auto;
}

.nos-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.nos-table th,
.nos-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--nos-line);
  text-align: left;
  vertical-align: top;
}

.nos-table th {
  background: #fafafa;
  color: var(--nos-muted);
  font-size: 10px;
  font-weight: normal;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nos-table tr:last-child td {
  border-bottom: 0;
}

.nos-status {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--nos-soft);
  font-size: 10px;
  white-space: nowrap;
}

.nos-status.published,
.nos-status.active {
  background: var(--nos-blue-soft);
  color: var(--nos-blue);
}

.nos-actions,
.nos-row-actions,
.nos-form-footer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.nos-button {
  height: 36px;
  padding: 0 13px;
  border: 1px solid #111;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}

.nos-button:hover {
  transform: translateY(-1px);
}

.nos-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.nos-button-secondary {
  background: #fff;
  color: #111;
  border-color: var(--nos-line);
}

.nos-button-blue {
  background: var(--nos-blue);
  border-color: var(--nos-blue);
}

.nos-link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #111;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.nos-link-button.danger {
  color: var(--nos-danger);
}

.nos-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 15px;
}

.nos-field {
  margin: 0;
}

.nos-field.wide {
  grid-column: span 2;
}

.nos-field.full,
.nos-checkbox-line.full,
.nos-form-footer {
  grid-column: 1 / -1;
}

.nos-label {
  display: block;
  margin-bottom: 6px;
  color: var(--nos-muted);
  font-size: 11px;
}

.nos-input,
.nos-select,
.nos-textarea {
  width: 100%;
  border: 1px solid var(--nos-line);
  border-radius: 10px;
  background: #fff;
  font-family: Arial, sans-serif;
  font-size: 12px;
  outline: none;
}

.nos-input,
.nos-select {
  height: 36px;
  padding: 0 12px;
}

.nos-textarea {
  min-height: 76px;
  padding: 10px 12px;
  resize: vertical;
}

.nos-input:focus,
.nos-select:focus,
.nos-textarea:focus {
  border-color: var(--nos-blue);
  box-shadow: 0 0 0 3px var(--nos-blue-soft);
}

.nos-checkbox-line {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.nos-error {
  display: none;
  color: var(--nos-danger);
  font-size: 12px;
}

.nos-success {
  color: var(--nos-blue);
  font-size: 12px;
}

@media (max-width: 980px) {
  .nos-login,
  .nos-app {
    grid-template-columns: 1fr;
  }

  .nos-login-hero,
  .nos-sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--nos-line);
  }

  .nos-grid,
  .nos-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nos-topbar {
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .nos-main {
    padding: 16px;
  }

  .nos-grid,
  .nos-form-grid {
    grid-template-columns: 1fr;
  }

  .nos-field.wide,
  .nos-field.full,
  .nos-checkbox-line.full,
  .nos-form-footer {
    grid-column: 1;
  }
}
