/* CSS Reset & Variable Tokens */
:root {
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-light: #ecfdf5;
  --primary-border: #a7f3d0;
  
  --bg-main: #f4f6f8;
  --card-bg: #ffffff;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.app-header {
  background: linear-gradient(135deg, #064e3b 0%, #047857 50%, #059669 100%);
  color: white;
  padding: 20px 0;
  box-shadow: var(--shadow-md);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-icon {
  font-size: 38px;
  background: rgba(255, 255, 255, 0.15);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  backdrop-filter: blur(5px);
}

.logo-area h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 13px;
  color: #a7f3d0;
  margin-top: 2px;
  font-weight: 400;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-header-home,
.btn-header-alerts {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-header-home:hover,
.btn-header-alerts:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.badge-count {
  background: #ef4444;
  color: white;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* Main Layout */
.main-content {
  padding: 30px 20px 60px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  margin-bottom: 24px;
}

/* Form Sections */
.form-section {
  margin-bottom: 12px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.title-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.title-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-num {
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.section-title h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
}

.divider {
  border: 0;
  height: 1px;
  background: var(--border-color);
  margin: 18px 0;
}

/* Collapsible Section Styles */
.collapsible-header {
  cursor: pointer;
  user-select: none;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  margin: -8px -12px;
  transition: background-color 0.2s ease;
}

.collapsible-header:hover {
  background-color: #f1f5f9;
}

.collapse-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-main);
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.chevron-icon {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform 0.3s ease;
  display: inline-block;
}

.collapsible-header.open .chevron-icon {
  transform: rotate(180deg);
}

.collapsible-content {
  overflow: hidden;
  transition: all 0.3s ease;
}

.collapsible-content.collapsed {
  display: none;
}

.pt-10 {
  padding-top: 14px;
}

/* Grid Layouts */
.grid-form {
  display: grid;
  gap: 18px;
}

.grid-form.col-4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid-form.col-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-form.col-2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.badge-cache {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.mt-4 { margin-top: 4px; }
.mt-10 { margin-top: 10px; }
.mt-15 { margin-top: 15px; }
.mt-25 { margin-top: 25px; }

/* Toggle under check-in date */
.toggle-under-date {
  margin-top: 14px;
  display: flex;
  align-items: center;
}

/* Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.input-hint {
  font-size: 11px;
  font-weight: 500;
  color: #059669;
  margin-left: 4px;
}

.date-notice-toast {
  margin-top: 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fadeInNotice 0.25s ease-out;
  word-break: keep-all;
}

.date-notice-toast.hidden {
  display: none;
}

@keyframes fadeInNotice {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

select, input[type="text"], input[type="date"], input[type="number"], button {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

select, input[type="text"], input[type="date"], input[type="number"] {
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-main);
  background-color: #fff;
  transition: all 0.2s ease;
  font-family: inherit;
  box-sizing: border-box;
}

select {
  background-image: url("data:image/svg+xml;utf8,<svg fill='%236b7280' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
}

input[type="date"] {
  min-height: 44px;
  line-height: 1.3;
}

select:focus, input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Number Input Wrap */
.number-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 44px;
  background: white;
}

.number-input-wrap input {
  border: none;
  text-align: center;
  width: 100%;
  font-weight: 700;
}

.number-input-wrap input:focus {
  box-shadow: none;
}

.btn-num {
  width: 44px;
  height: 100%;
  border: none;
  background: var(--bg-main);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s;
}

.btn-num:hover {
  background: var(--border-color);
}

.unit {
  padding-right: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Nights Display */
.nights-display {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-md);
  color: var(--primary-hover);
  font-weight: 700;
  font-size: 14px;
}

/* Checkbox Chips */
.checkbox-group {
  display: flex;
  gap: 8px;
}

.chip-checkbox input {
  display: none;
}

.chip-checkbox .chip {
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: white;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.chip-checkbox input:checked + .chip {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-hover);
  font-weight: 700;
}

/* Segmented Control */
.segmented-control {
  display: flex;
  background: var(--bg-main);
  padding: 4px;
  border-radius: var(--radius-md);
  height: 44px;
}

.segmented-control label {
  flex: 1;
  text-align: center;
  margin: 0;
}

.segmented-control input {
  display: none;
}

.segmented-control span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.segmented-control input:checked + span {
  background: white;
  color: var(--text-main);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

/* Toggle Switch */
.toggle-switch-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.switch input { display: none; }

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .3s;
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
}

input:checked + .slider {
  background-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

.toggle-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

/* Amenities Grid */
.amenities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.amenity-chip input { display: none; }

.amenity-chip .box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: white;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.amenity-chip input:checked + .box {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-hover);
  font-weight: 700;
}

/* Buttons */
.form-actions {
  display: flex;
  justify-content: flex-end;
}

.btn-primary {
  height: 52px;
  padding: 0 32px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Results Header */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
}

.results-summary {
  display: flex;
  align-items: center;
  gap: 12px;
}

.results-summary h3 {
  font-size: 18px;
  font-weight: 800;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}

.badge-info {
  background: var(--primary-light);
  color: var(--primary-hover);
}

.badge-success {
  background: #dcfce7;
  color: #15803d;
}

.badge-danger {
  background: #fee2e2;
  color: #b91c1c;
}

/* Loading Spinner */
.loading-state {
  text-align: center;
  padding: 60px 20px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 18px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-sub {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-light);
}

/* Error & Empty States */
.error-box {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--danger-bg);
  border-color: #fca5a5;
  color: #991b1b;
}

.error-icon { font-size: 24px; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-icon { font-size: 48px; display: block; margin-bottom: 12px; }
.empty-sub { font-size: 13px; color: var(--text-light); }

.hidden { display: none !important; }

/* Results Grid & Cards */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 20px;
}

.forest-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.forest-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-img-wrap {
  position: relative;
  height: 190px;
  overflow: hidden;
  background: #e2e8f0;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-status-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.status-available {
  background: #10b981;
  color: white;
}

.status-unavailable {
  background: #6b7280;
  color: white;
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.card-room-count {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-hover);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-tags {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.info-item {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 6px;
}

.info-title {
  font-weight: 700;
  color: var(--text-main);
  min-width: 55px;
}

.card-address {
  font-size: 12px;
  color: var(--text-light);
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
}

.card-footer {
  padding: 14px 20px;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-alert-reg {
  font-size: 13px;
  font-weight: 700;
  color: #d97706;
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-alert-reg:hover {
  background: #fde68a;
  color: #b45309;
}

.btn-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-hover);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-link:hover {
  text-decoration: underline;
}

/* Modal Styles */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-card {
  background: white;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalIn 0.25s ease-out;
}

.modal-card.wide {
  max-width: 650px;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 24px;
  padding-right: 50px;
  border-bottom: 1px solid var(--border-color);
  background: #f8fafc;
}

.modal-header-content {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
}

.btn-close-modal {
  position: absolute;
  top: 16px;
  right: 18px;
  border: none;
  background: none;
  font-size: 24px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: color 0.2s ease;
}

.btn-close-modal:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
}

.modal-subtext {
  font-size: 13px;
  color: var(--text-muted);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background: #f8fafc;
}

.btn-secondary {
  height: 40px;
  padding: 0 18px;
  background: white;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--bg-main);
  color: var(--text-main);
}

.btn-primary-sm {
  height: 40px;
  padding: 0 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
}

.btn-primary-sm:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.target-info-box {
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  padding: 14px 18px;
  border-radius: var(--radius-md);
}

.target-name {
  font-weight: 800;
  font-size: 16px;
  color: var(--primary-hover);
}

.target-date {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ntfy Specific Styles */
.ntfy-topic-box {
  background: #f0fdf4;
  border: 1px solid var(--primary-border);
  padding: 16px;
  border-radius: var(--radius-md);
}

.ntfy-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 14px;
  color: #065f46;
}

.server-badge {
  font-size: 11px;
  font-weight: 600;
  background: #047857;
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
}

.topic-url-input-group {
  display: flex;
  gap: 8px;
}

.topic-input {
  flex: 1;
  min-width: 0;
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
  color: #047857;
  background: white;
}

.topic-input.topic-highlight {
  background: #ecfdf5;
  border: 1px solid #34d399;
  color: #065f46;
}

.ntfy-field-row {
  display: flex;
  gap: 8px;
}

.ntfy-field-row + .ntfy-field-row {
  margin-top: 8px;
}

.ntfy-field-label {
  flex-shrink: 0;
  width: 62px;
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #065f46;
}

.btn-copy {
  padding: 0 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.btn-copy:hover {
  background: var(--primary-hover);
}

.ntfy-url-row {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.btn-topic-link,
.btn-test-push {
  -webkit-flex: 1;
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
  transition: all 0.2s ease;
}

.btn-test-push {
  background: #ffffff;
  color: #b45309;
  border: 1px solid #fde68a;
  box-shadow: 0 1px 2px rgba(245, 158, 11, 0.08);
}

.btn-test-push:hover {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
  transform: translateY(-1px);
}

.btn-topic-link {
  background: #ffffff;
  color: #047857;
  border: 1px solid #a7f3d0;
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.08);
}

.btn-topic-link:hover {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #065f46;
  transform: translateY(-1px);
}

.test-result-row {
  margin-top: 6px;
}

.ntfy-link {
  color: var(--primary-hover);
  font-weight: 700;
  text-decoration: none;
  word-break: break-all;
}

.ntfy-link:hover {
  text-decoration: underline;
}

.test-result-text {
  font-size: 12px;
  font-weight: 600;
}

.ntfy-guide-box {
  background: var(--bg-main);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.ntfy-guide-box h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.guide-steps {
  font-size: 12px;
  color: var(--text-muted);
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.guide-steps code {
  background: white;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  font-family: monospace;
  color: #047857;
}

/* My Alerts Drawer & List Toolbar */
.drawer-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-cron-sample {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-cron-sample:hover {
  background: #d1fae5;
}

.status-summary-tag {
  font-size: 13px;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid #a7f3d0;
}

.btn-clear-all {
  background: white;
  border: 1px solid var(--border-color);
  color: #ef4444;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-clear-all:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

.my-alerts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 380px;
  overflow-y: auto;
}

.alert-item-card {
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: white;
  gap: 10px;
  box-sizing: border-box;
}

.alert-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
}

.alert-item-header-text {
  flex: 1;
  min-width: 0;
}

.alert-item-header-text .title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
}

.alert-item-header-text .sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.btn-delete-alert-sm {
  padding: 4px 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  line-height: 1;
  transition: all 0.2s ease;
}

.btn-delete-alert-sm:hover {
  background: #fee2e2;
  border-color: #f87171;
  color: #b91c1c;
}

.alert-item-bottom {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding-top: 6px;
  border-top: 1px dashed #f1f5f9;
}

.btn-test-item,
.btn-topic-link-action {
  -webkit-flex: 1;
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
  transition: all 0.2s ease;
}

.btn-test-item {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #d97706;
}

.btn-test-item:hover {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #b45309;
}

.btn-topic-link-action {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}

.btn-topic-link-action:hover {
  background: #d1fae5;
  border-color: #6ee7b7;
  color: #065f46;
  transform: translateY(-1px);
}

/* Mobile App Bar in My Alerts Header (Centered, Color version icons) */
.ntfy-mobile-app-bar {
  display: none;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-align-items: center;
  align-items: center;
  margin-top: 12px;
  padding: 4px 0 0;
  background: transparent;
  border: none;
  width: 100%;
}

.app-bar-buttons {
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  flex-wrap: wrap;
}

.btn-app-badge {
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-sizing: border-box;
  line-height: 1;
  -webkit-appearance: none;
  appearance: none;
}

.btn-playstore-color {
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #d1d5db;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-playstore-color:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  transform: translateY(-1px);
}

.btn-appstore-color {
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #d1d5db;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-appstore-color:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  transform: translateY(-1px);
}

.app-badge-icon {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  max-width: 16px;
  max-height: 16px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  -webkit-flex-shrink: 0;
}

/* Footer */
.app-footer {
  text-align: center;
  padding: 24px 0;
  font-size: 13px;
  color: var(--text-light);
  border-top: 1px solid var(--border-color);
  background: white;
}

/* ==========================================================================
   Responsive (Mobile) — tuned against iPhone 13 mini (375 x 812)
   ========================================================================== */
@media (max-width: 680px) {
  .container {
    padding: 0 12px;
  }

  /* Header */
  .app-header {
    padding: 12px 0;
  }

  .header-container {
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
  }

  .logo-area {
    gap: 8px;
    min-width: 0;
    flex: 1;
  }

  .logo-icon {
    font-size: 22px;
    padding: 6px 8px;
  }

  .logo-area h1 {
    font-size: 15px;
    letter-spacing: -0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
  }

  .subtitle {
    font-size: 11px;
    margin-top: 1px;
  }

  .header-actions {
    gap: 6px;
    flex-shrink: 0;
  }

  .btn-header-home .btn-text,
  .btn-header-alerts .btn-text {
    display: none;
  }

  .btn-header-home,
  .btn-header-alerts {
    padding: 8px 10px;
    gap: 4px;
    font-size: 13px;
    border-radius: 18px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .badge-count {
    font-size: 11px;
    padding: 2px 6px;
  }

  /* Main layout */
  .main-content {
    padding: 16px 10px 40px;
  }

  .card {
    padding: 14px;
  }

  .grid-form.col-3,
  .grid-form.col-2 {
    grid-template-columns: 1fr;
  }

  .checkbox-group {
    flex-wrap: wrap;
    gap: 6px;
  }

  .section-title {
    flex-wrap: wrap;
    row-gap: 6px;
  }

  .results-header {
    padding: 14px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .results-grid {
    grid-template-columns: 1fr;
  }

  /* Modals - iPhone 13 mini overflow & alignment fix */
  .modal-backdrop {
    padding: 10px;
    align-items: center;
    justify-content: center;
  }

  .modal-card,
  .modal-card.wide {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    border-radius: var(--radius-md);
  }

  .modal-header {
    padding: 14px 16px;
    flex-shrink: 0;
  }

  .modal-header h3 {
    font-size: 15px;
    line-height: 1.35;
    word-break: keep-all;
    min-width: 0;
  }

  .modal-subtext {
    font-size: 12px;
    line-height: 1.35;
  }

  .ntfy-mobile-app-bar {
    display: flex;
  }

  .modal-body {
    padding: 14px 16px;
    overflow-y: auto;
    flex: 1;
    word-break: keep-all;
    overflow-wrap: break-word;
  }

  .modal-footer {
    padding: 12px 16px;
    flex-shrink: 0;
    gap: 8px;
  }

  .modal-footer .btn-secondary,
  .modal-footer .btn-primary-sm {
    flex: 1;
    height: 38px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .target-info-box {
    padding: 10px 12px;
  }

  .target-name {
    font-size: 15px;
  }

  .target-date {
    font-size: 12px;
  }

  .ntfy-topic-box {
    padding: 12px;
  }

  .ntfy-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
  }

  .ntfy-field-row {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
  }

  .ntfy-field-label {
    width: 56px;
    font-size: 11px;
    flex-shrink: 0;
  }

  .topic-input {
    flex: 1;
    min-width: 0;
    font-size: 11px;
    padding: 6px 8px;
    height: 34px;
    box-sizing: border-box;
  }

  .btn-copy {
    padding: 0 10px;
    height: 34px;
    font-size: 11px;
    flex-shrink: 0;
  }

  .ntfy-guide-box {
    padding: 10px 12px;
  }

  .ntfy-guide-box h4 {
    font-size: 13px;
  }

  .guide-steps {
    font-size: 11px;
    padding-left: 14px;
    gap: 4px;
  }

  .ntfy-url-row {
    display: -webkit-flex;
    display: flex;
    gap: 6px;
    width: 100%;
  }

  .btn-topic-link,
  .btn-test-push {
    -webkit-flex: 1;
    flex: 1;
    min-width: 0;
    height: 38px;
    font-size: 12px;
  }

  .test-result-text {
    font-size: 11px;
    text-align: center;
  }

  /* My Alerts Drawer & List */
  .drawer-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .status-summary-tag {
    text-align: center;
    font-size: 11px;
    padding: 6px 8px;
    width: 100%;
    box-sizing: border-box;
  }

  .toolbar-actions {
    display: flex;
    width: 100%;
    gap: 6px;
  }

  .btn-cron-sample,
  .btn-clear-all {
    flex: 1;
    text-align: center;
    justify-content: center;
    font-size: 11px;
    padding: 8px 4px;
  }

  .my-alerts-list {
    max-height: 280px;
    gap: 10px;
  }

  .alert-item-card {
    padding: 12px;
    gap: 8px;
  }

  .alert-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
  }

  .alert-item-header-text .title {
    font-size: 14px;
  }

  .alert-item-header-text .sub {
    font-size: 11px;
  }

  .alert-item-bottom {
    display: -webkit-flex;
    display: flex;
    gap: 6px;
    width: 100%;
  }

  .btn-test-item,
  .btn-topic-link-action {
    -webkit-flex: 1;
    flex: 1;
    min-width: 0;
    height: 34px;
    font-size: 11px;
    padding: 0 6px;
  }

  /* Footer */
  .app-footer p {
    padding: 0 12px;
    font-size: 11px;
    word-break: keep-all;
  }
}
