/* Global Apple-like UI styling for the whole app */
:root {
  --bg: #f5f7fb;
  --card-bg: #ffffff;
  --text: #111111;
  --muted: #6b7280;
  --primary: #1677ff;
  --primary-600: #1a6ff0;
  --primary-700: #155ed5;
  --border: #e5e7eb;
  --shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
  --radius: 12px;
}

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: linear-gradient(180deg, #f7f9fc 0%, #f2f4f8 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

h1 {
  letter-spacing: 0.2px;
}

p.subtitle {
  color: var(--muted) !important;
}

/* Inputs */
input, select, textarea {
  border-radius: 10px !important;
  border: 1px solid var(--border) !important;
  background: #fff;
  transition: box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, .15);
}

/* Buttons */
button {
  border-radius: 10px !important;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-600) 100%) !important;
  box-shadow: 0 4px 10px rgba(22, 119, 255, .25);
  transition: transform .05s ease, box-shadow .2s ease, background .2s ease;
}
button:hover {
  filter: brightness(1.02);
}
button:active {
  transform: translateY(1px);
}
button.ghost {
  background: #fff !important;
  color: var(--primary) !important;
  border: 1px solid var(--primary) !important;
  box-shadow: none !important;
}
button.ghost:hover {
  background: rgba(22, 119, 255, 0.06) !important;
}

/* Tabs */
.tab {
  border-radius: 999px !important;
  border-color: var(--border) !important;
  color: #111;
  background: #fff;
}
.tab.active {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(22,119,255,.25);
}

/* Tables */
table {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
th {
  background: #fafafa !important;
}
tbody tr:nth-child(odd) td {
  background: #fafbff;
}
tbody tr:hover td {
  background: #eef5ff;
}
th, td {
  border-color: var(--border) !important;
}

/* Messages */
.message {
  background: #fbfbfd !important;
  border: 1px solid var(--border) !important;
  color: #374151;
}

/* Login Quote */
.login-quote {
  margin: 8px 0 18px;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
  padding: 0 4px;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  /* 卡片在手机上更贴合屏幕，减少空白 */
  body .container {
    max-width: 100%;
    margin: 12px 8px 20px;
    padding: 16px 12px 20px;
  }

  /* 表单行在小屏自动纵向排列，避免横向挤压 */
  .row {
    flex-direction: column;
    align-items: flex-start;
  }

  /* 表格在手机上可横向滚动，避免列被压缩到看不清 */
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  thead, tbody {
    display: table;
    width: 100%;
  }
  th, td {
    white-space: nowrap;
  }
}
