/* ============================================
   APPS.CSS — Individual app/window content styles
   ============================================ */

/* ---- SHARED ---- */
.app-toolbar {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  background: #EAEAE5;
  border-bottom: 1px solid #D5D5D0;
  gap: 4px;
  flex-shrink: 0;
}

.app-toolbar__btn {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: #666;
  padding: 2px 8px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: #F5F5F0;
  cursor: pointer;
}

.app-toolbar__btn:hover {
  background: #E8E8E3;
}

.app-toolbar__btn--disabled {
  opacity: 0.4;
  pointer-events: none;
}

.app-toolbar__separator {
  width: 1px;
  height: 16px;
  background: #D0D0CB;
  margin: 0 4px;
}

.app-toolbar__breadcrumb {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: #888;
  margin-left: auto;
}

/* ---- TEXT EDITOR (home.mdx) ---- */
.app-editor {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #1e1e1e;
}

.app-editor__tabs {
  display: flex;
  background: #252526;
  border-bottom: 1px solid #1e1e1e;
  flex-shrink: 0;
}

.app-editor__tab {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: #999;
  padding: 6px 16px;
  background: #2d2d2d;
  border-right: 1px solid #1e1e1e;
  cursor: default;
  display: flex;
  align-items: center;
  gap: 6px;
}

.app-editor__tab--active {
  background: #1e1e1e;
  color: #fff;
  border-top: 2px solid #3DF2E5;
}

.app-editor__tab-icon {
  font-size: 12px;
}

.app-editor__content {
  display: flex;
  flex: 1;
  overflow: auto;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
}

.app-editor__gutter {
  padding: 12px 12px 12px 16px;
  text-align: right;
  color: #555;
  background: #1e1e1e;
  user-select: none;
  flex-shrink: 0;
  min-width: 40px;
}

.app-editor__gutter span {
  display: block;
}

.app-editor__code {
  padding: 12px 16px;
  flex: 1;
  color: #d4d4d4;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Syntax highlighting classes */
.syn-comment { color: #6A9955; }
.syn-keyword { color: #C586C0; }
.syn-string { color: #CE9178; }
.syn-heading { color: #569CD6; font-weight: bold; }
.syn-tag { color: #808080; }
.syn-accent { color: #3DF2E5; }
.syn-number { color: #B5CEA8; }
.syn-variable { color: #9CDCFE; }
.syn-bold { color: #D4D4D4; font-weight: bold; }

.app-editor__cursor {
  display: inline-block;
  width: 2px;
  height: 16px;
  background: #d4d4d4;
  animation: blink-cursor 1s step-end infinite;
  vertical-align: text-bottom;
}

/* ---- FOLDER (Services) ---- */
.app-folder {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.app-folder__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 4px;
  padding: 12px;
  flex: 1;
}

.app-folder__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 4px;
  border-radius: 6px;
  cursor: default;
  user-select: none;
  transition: background-color 0.1s ease;
}

.app-folder__item:hover {
  background: rgba(61, 242, 229, 0.08);
}

.app-folder__item-icon {
  font-size: 40px;
  margin-bottom: 8px;
}

.app-folder__item-name {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: #1A1A1A;
  text-align: center;
  word-break: break-all;
}

.app-folder__status {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: #888;
  padding: 4px 12px;
  border-top: 1px solid #D5D5D0;
  background: #EAEAE5;
  flex-shrink: 0;
}

/* ---- SPREADSHEET (Pricing) ---- */
.app-spreadsheet {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.app-spreadsheet__formula-bar {
  display: flex;
  align-items: center;
  padding: 2px 8px;
  background: #F5F5F0;
  border-bottom: 1px solid #D5D5D0;
  flex-shrink: 0;
}

.app-spreadsheet__cell-ref {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: #1A1A1A;
  background: #fff;
  border: 1px solid #ccc;
  padding: 2px 8px;
  width: 60px;
  margin-right: 8px;
}

.app-spreadsheet__formula {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: #1A1A1A;
  flex: 1;
}

.app-spreadsheet__grid {
  flex: 1;
  overflow: auto;
}

.app-spreadsheet__table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
}

.app-spreadsheet__table th {
  background: #EAEAE5;
  border: 1px solid #D5D5D0;
  padding: 4px 8px;
  font-weight: normal;
  color: #666;
  position: sticky;
  top: 0;
  z-index: 1;
}

.app-spreadsheet__table td {
  border: 1px solid #D5D5D0;
  padding: 6px 8px;
  color: #1A1A1A;
  background: #fff;
  vertical-align: top;
}

.app-spreadsheet__table .row-header {
  background: #EAEAE5;
  color: #666;
  font-weight: normal;
  width: 30px;
  text-align: center;
}

.app-spreadsheet__table .col-popular {
  background: rgba(255, 215, 0, 0.08);
}

.spreadsheet__badge {
  display: inline-block;
  background: #FFD700;
  color: #1A1A1A;
  font-size: 8px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 4px;
}

.spreadsheet__price {
  font-family: 'Archivo Black', sans-serif;
  font-size: 16px;
  color: #1A1A1A;
}

.spreadsheet__check {
  color: #3DF2E5;
  font-weight: bold;
}

.spreadsheet__cross {
  color: #ccc;
}

.spreadsheet__bespoke {
  text-align: center;
  font-style: italic;
  color: #888;
  padding: 12px 8px;
}

/* ---- DOCUMENT VIEWER (Customers/Testimonials) ---- */
.app-document {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.app-document__content {
  flex: 1;
  padding: 24px 32px;
  overflow: auto;
  background: #FFFDF7;
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: #1A1A1A;
}

.app-document__content h2 {
  font-family: 'Archivo Black', sans-serif;
  font-size: 18px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.app-document__trusted {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.app-document__trusted-item {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: #888;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 8px 16px;
  border: 1px solid #E0E0E0;
  border-radius: 4px;
}

.app-document__quote {
  border-left: 3px solid #3DF2E5;
  padding: 16px 24px;
  margin: 24px 0;
  background: rgba(61, 242, 229, 0.04);
  border-radius: 0 6px 6px 0;
}

.app-document__quote p {
  font-size: 15px;
  font-style: italic;
  margin-bottom: 12px;
  color: #333;
}

.app-document__quote-name {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.app-document__quote-role {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: #999;
}

/* ---- HELP VIEWER (Docs) ---- */
.app-helpviewer {
  display: flex;
  height: 100%;
}

.app-helpviewer__sidebar {
  width: 200px;
  background: #F0F0EC;
  border-right: 1px solid #D5D5D0;
  overflow-y: auto;
  flex-shrink: 0;
}

.app-helpviewer__section-title {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 12px 4px;
}

.app-helpviewer__nav-item {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: #555;
  padding: 6px 12px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.1s ease;
}

.app-helpviewer__nav-item:hover {
  background: rgba(61, 242, 229, 0.08);
  color: #1A1A1A;
}

.app-helpviewer__nav-item--active {
  border-left-color: #3DF2E5;
  color: #1A1A1A;
  background: rgba(61, 242, 229, 0.06);
}

.app-helpviewer__content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  font-family: 'Inter', sans-serif;
  color: #1A1A1A;
  line-height: 1.6;
}

.app-helpviewer__content h2 {
  font-family: 'Archivo Black', sans-serif;
  font-size: 18px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.app-helpviewer__content h3 {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: #3DF2E5;
  margin: 20px 0 8px;
}

.app-helpviewer__content p {
  margin-bottom: 12px;
  font-size: 13px;
}

/* ---- INFO WINDOW (Why Nuvix) ---- */
.app-info {
  padding: 24px;
  overflow: auto;
  height: 100%;
}

.app-info__header {
  font-family: 'Archivo Black', sans-serif;
  font-size: 20px;
  color: #1A1A1A;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.app-info__label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 24px;
}

.app-info__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.app-info__card {
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #E8E8E3;
}

.app-info__card-number {
  font-family: 'Archivo Black', sans-serif;
  font-size: 28px;
  color: #3DF2E5;
  margin-bottom: 8px;
}

.app-info__card-title {
  font-family: 'Archivo Black', sans-serif;
  font-size: 13px;
  color: #1A1A1A;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.app-info__card-desc {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #555;
  line-height: 1.5;
}

/* ---- COLUMNS LAYOUT (SME / Charities) ---- */
.app-columns {
  padding: 24px;
  overflow: auto;
  height: 100%;
}

.app-columns__header {
  font-family: 'Archivo Black', sans-serif;
  font-size: 20px;
  color: #1A1A1A;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.app-columns__intro {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #666;
  margin-bottom: 24px;
  line-height: 1.5;
}

.app-columns__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

.app-columns__col-title {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: #3DF2E5;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.app-columns__col-item {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #1A1A1A;
  line-height: 1.5;
  margin-bottom: 8px;
  padding-left: 12px;
  border-left: 2px solid #E8E8E3;
}

.app-columns__col-text {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #555;
  line-height: 1.5;
  font-style: italic;
}

/* ---- CONTACT FORM (Email Compose) ---- */
.app-contact {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.app-contact__fields {
  padding: 8px 12px;
  background: #F5F5F0;
  border-bottom: 1px solid #D5D5D0;
  flex-shrink: 0;
}

.app-contact__field {
  display: flex;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid #E8E8E3;
}

.app-contact__field:last-child {
  border-bottom: none;
}

.app-contact__field-label {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: #888;
  width: 80px;
  flex-shrink: 0;
}

.app-contact__field-input {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #1A1A1A;
  border: none;
  background: transparent;
  flex: 1;
  padding: 4px 0;
  outline: none;
}

.app-contact__field-input::placeholder {
  color: #ccc;
}

.app-contact__body-area {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.app-contact__textarea {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #1A1A1A;
  border: none;
  background: #fff;
  flex: 1;
  padding: 16px;
  outline: none;
  resize: none;
  line-height: 1.6;
}

.app-contact__textarea::placeholder {
  color: #ccc;
}

.app-contact__actions {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: #EAEAE5;
  border-top: 1px solid #D5D5D0;
  gap: 8px;
  flex-shrink: 0;
}

.app-contact__send-btn {
  background: #3DF2E5;
  color: #1A1A1A;
  border: none;
  border-radius: 4px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 20px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.app-contact__send-btn:hover {
  opacity: 0.85;
}

.app-contact__send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.app-contact__status {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: #888;
}

.app-contact__status--success {
  color: #27C93F;
}

.app-contact__status--error {
  color: #FF5F57;
}

.app-contact__error {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: #FF5F57;
  padding: 0 12px 4px;
}

/* ---- TRASH (Easter Egg) ---- */
.app-trash__item:hover {
  background: rgba(255, 68, 68, 0.08);
}

.app-trash__toast {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: #2A2A2A;
  color: #fff;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  padding: 10px 20px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 20000;
  animation: toast-in 0.3s ease, toast-out 0.3s ease 2.5s forwards;
  max-width: 400px;
  text-align: center;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to { opacity: 0; transform: translateX(-50%) translateY(10px); }
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .app-info__grid {
    grid-template-columns: 1fr;
  }

  .app-columns__grid {
    grid-template-columns: 1fr;
  }

  .app-helpviewer {
    flex-direction: column;
  }

  .app-helpviewer__sidebar {
    width: 100%;
    height: auto;
    max-height: 120px;
    border-right: none;
    border-bottom: 1px solid #D5D5D0;
  }

  .app-document__content {
    padding: 16px;
  }

  .app-folder__grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .app-spreadsheet__table {
    font-size: 10px;
  }

  .spreadsheet__price {
    font-size: 13px;
  }
}

/* ---- BROWSER (Blog) ---- */
.app-browser {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
}

.app-browser__toolbar {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  background: #F0F0EC;
  border-bottom: 1px solid #D5D5D0;
  gap: 8px;
  flex-shrink: 0;
}

.app-browser__nav {
  display: flex;
  gap: 2px;
}

.app-browser__nav-btn {
  font-size: 14px;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-browser__nav-btn:hover {
  background: #E0E0DB;
}

.app-browser__nav-btn--disabled {
  opacity: 0.3;
  pointer-events: none;
}

.app-browser__url-bar {
  flex: 1;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #D5D5D0;
  border-radius: 16px;
  padding: 4px 12px;
  gap: 6px;
}

.app-browser__url-lock {
  font-size: 11px;
}

.app-browser__url-text {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-browser__content {
  flex: 1;
  overflow-y: auto;
  background: #F5F5F0;
}

.app-browser__loading {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: #888;
  padding: 40px;
  text-align: center;
}

.app-browser__error {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: #FF5F57;
  padding: 40px;
  text-align: center;
}

/* Blog list page inside browser */
.app-browser__page {
  padding: 32px 24px;
  max-width: 700px;
  margin: 0 auto;
}

.app-browser__page--article {
  padding: 0;
  max-width: 100%;
}

.app-browser__page--article .blog-article {
  max-width: 680px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  font-family: 'Inter', sans-serif;
  line-height: 1.7;
  color: #1A1A1A;
}

.app-browser__page--article .blog-article__tag {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: #3DF2E5;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.app-browser__page--article .blog-article h1 {
  font-family: 'Archivo Black', sans-serif;
  font-size: 24px;
  line-height: 1.2;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.app-browser__page--article .blog-article__meta {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: #888;
  margin-bottom: 24px;
}

.app-browser__page--article .blog-article__tldr {
  background: rgba(61, 242, 229, 0.06);
  border-left: 3px solid #3DF2E5;
  padding: 14px 18px;
  margin-bottom: 24px;
  border-radius: 0 6px 6px 0;
  font-size: 13px;
  color: #444;
}

.app-browser__page--article .blog-article h2 {
  font-family: 'Archivo Black', sans-serif;
  font-size: 17px;
  margin: 32px 0 12px;
  text-transform: uppercase;
}

.app-browser__page--article .blog-article h3 {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: #1A1A1A;
  margin: 24px 0 8px;
}

.app-browser__page--article .blog-article p {
  font-size: 14px;
  margin-bottom: 14px;
  color: #333;
}

.app-browser__page--article .blog-article ul,
.app-browser__page--article .blog-article ol {
  padding-left: 20px;
  margin-bottom: 14px;
}

.app-browser__page--article .blog-article li {
  font-size: 14px;
  margin-bottom: 6px;
  color: #333;
}

.app-browser__page--article .blog-article .formula {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  background: #1A1A1A;
  color: #3DF2E5;
  padding: 14px 18px;
  border-radius: 6px;
  margin: 14px 0;
  text-align: center;
}

.app-browser__page--article .blog-article__cta {
  background: #1A1A1A;
  padding: 20px;
  border-radius: 8px;
  margin-top: 32px;
  font-size: 13px;
  color: #999;
  font-style: italic;
}

.app-browser__page--article .blog-article__cta a {
  color: #3DF2E5;
  text-decoration: none;
}

.app-browser__page-header {
  margin-bottom: 32px;
}

.app-browser__page-header h1 {
  font-family: 'Archivo Black', sans-serif;
  font-size: 28px;
  color: #1A1A1A;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.app-browser__page-header p {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: #888;
}

.app-browser__posts {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.app-browser__post-card {
  background: #fff;
  border: 1px solid #E8E8E3;
  border-radius: 8px;
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.app-browser__post-card:hover {
  border-color: #3DF2E5;
  box-shadow: 0 2px 8px rgba(61, 242, 229, 0.1);
}

.app-browser__post-tag {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  color: #3DF2E5;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.app-browser__post-title {
  font-family: 'Archivo Black', sans-serif;
  font-size: 16px;
  color: #1A1A1A;
  text-transform: uppercase;
  margin-bottom: 8px;
  line-height: 1.3;
}

.app-browser__post-desc {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #555;
  line-height: 1.5;
  margin-bottom: 8px;
}

.app-browser__post-meta {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: #999;
}
