/* Shared components: consistent density, hierarchy and keyboard/touch interaction. */
.app-v2 .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 9px; font-size: 15px; font-weight: 650; line-height: 1.3; text-transform: none; letter-spacing: -.01em; box-shadow: none; transition: background .15s, border-color .15s, box-shadow .15s; }
.app-v2 .btn:hover { transform: none; }
.app-v2 .btn-primary { color: #172019; background: var(--teal); border: 1px solid var(--teal); }
.app-v2 .btn-primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); box-shadow: 0 3px 12px rgba(166,227,109,0.11); }
.app-v2 .btn-secondary { color: var(--ink); border: 1px solid var(--line); background: #172019; }
.app-v2 .btn-secondary:hover { background: #212e24; border-color: #44604b; }
.app-v2 .btn-danger { color: #e0858d; background: #3d1a1a; border: 1px solid #3d1a1d; }
.app-v2 .btn-sm { font-size: 14px; min-height: 40px; padding: 9px 12px; }
.app-v2 .btn-lg { font-size: 16px; min-height: 44px; padding: 11px 18px; }
.app-v2 :is(.form-input,.form-select,.form-textarea,.gear-search-input,.pack-search-input) { border: 1px solid #344a3a; border-radius: 9px; background: #18211a; color: var(--ink); min-height: 44px; font-size: 16px; padding: 10px 12px; box-shadow: none; }
.app-v2 :is(.form-input,.form-select,.form-textarea):focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(166,227,109,0.071); }
.app-v2 :is(input,textarea)::placeholder { color: #849a8a; }
.app-v2 .form-label { color: #cbd5cd; text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 650; margin-bottom: 7px; }
.app-v2 .form-group { margin-bottom: 18px; }
.app-v2 .form-hint { color: #9fb0a3; font-size: 14px; }
.app-v2 .form-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.app-v2 .form-actions { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 18px; gap: 10px; }
.app-v2 .card { background: #172019; border: 1px solid var(--line); border-radius: 16px; box-shadow: none; overflow: hidden; }
.app-v2 .card-header { padding: 18px 22px; background: #172019; border-bottom: 1px solid #243328; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.app-v2 .card-title { font-size: 18px; font-weight: 750; color: var(--ink); }
.app-v2 .card-body { padding: 22px; }
.app-v2 .form-card { max-width: 900px; margin: 0 auto; }
.app-v2 .table-container, .app-v2 .gear-table-container { border: 1px solid var(--line); border-radius: 14px; box-shadow: none; overflow-x: auto; background: #172019; }
.app-v2 :is(table,.table,.gear-table) { background: #172019; font-size: 15px; }
.app-v2 :is(table,.table,.gear-table) th { background: #111813; color: #a7b7ab; font-weight: 600; font-size: 13px; text-transform: none; letter-spacing: .02em; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.app-v2 :is(table,.table,.gear-table) td { padding: 14px 16px; border-bottom: 1px solid #212f25; color: #cdd6cf; vertical-align: middle; }
.app-v2 :is(table,.table,.gear-table) tbody tr:hover { background: #131a14; }
.app-v2 :is(.badge,.status-badge) { border-radius: 6px; font-weight: 600; font-size: 13px; letter-spacing: 0; text-transform: none; }
.app-v2 :is(.modal,.gear-mobile-edit-modal) { z-index: 1400; }
.app-v2 .modal-content { border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 80px rgba(243,240,232,0.44); max-height: calc(100dvh - 48px); }
.app-v2 .modal-header { padding: 20px 24px; background: #131b15; border-bottom: 1px solid var(--line); }
.app-v2 .modal-title { font-size: 20px; }
.app-v2 .modal-body { padding: 24px; }
.app-v2 :is(.modal-close,.gear-action-btn,.trip-modern-action-btn,.pack-modern-action-btn) { width: 40px; height: 40px; min-height: 40px; min-width: 40px; padding: 8px; border-radius: 8px; background: #111813; color: #aebdb2; border: 1px solid transparent; }
.app-v2 :is(.modal-close,.gear-action-btn,.trip-modern-action-btn,.pack-modern-action-btn):hover { background: #21341d; border-color: #354b3a; transform: none; }
.app-v2 :is(.empty-state,.trips-empty-state,.packs-empty-state) { padding: 44px 24px; border: 1px dashed #3a513f; border-radius: 16px; background: #131b15; }
.app-v2 :is(.empty-state-title,.trips-empty-title,.packs-empty-title) { font-size: 24px; }
.app-v2 :is(.empty-state-text,.trips-empty-text,.packs-empty-text) { font-size: 16px; color: #a3b4a7; }
.app-v2 .section { padding: 0; margin: 0 0 22px; overflow: visible; }
.app-v2 .section-header { margin-bottom: 14px; padding: 0; }
.app-v2 .section-title { font-size: 20px; letter-spacing: -.035em; }
.app-v2 .section-subtitle { font-size: 15px; color: #a3b4a7; }
.app-v2 .notification { border-radius: 12px; box-shadow: var(--shadow-lg); }
.app-v2 input[type="checkbox"] { accent-color: var(--teal); width: 18px; height: 18px; }
@media (max-width: 600px) {
  .app-v2 .form-row { grid-template-columns: minmax(0,1fr); gap: 0; }
  .app-v2 :is(.form-input,.form-select,.form-textarea,.gear-search-input,.pack-search-input) { font-size: 16px; }
  .app-v2 .card-header, .app-v2 .card-body, .app-v2 .modal-header, .app-v2 .modal-body { padding: 18px; }
  .app-v2 .modal-content { width: calc(100% - 24px); margin: 12px; max-height: calc(100dvh - 24px); }
  .app-v2 :is(.modal-close,.gear-action-btn,.trip-modern-action-btn,.pack-modern-action-btn) { min-height: 44px; min-width: 44px; }
  .app-v2 .form-actions { flex-wrap: wrap; }
}
/* Native dialogs are independent of the legacy modal implementation. */
.app-v2 dialog.app-dialog { width: min(540px,calc(100% - 32px)); max-width: 540px; max-height: 90dvh; overflow: auto; margin: auto; border: 0; border-radius: 18px; padding: 26px; background: #172019; color: var(--ink); box-shadow: 0 28px 90px rgba(243,240,232,0.552); }
.app-v2 dialog.app-dialog::backdrop { background: rgba(56,50,31,0.651); backdrop-filter: blur(3px); }
.app-v2 .app-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.app-v2 .app-dialog-heading h2 { margin: 0; font-size: 23px; letter-spacing: -.04em; }
.app-v2 .app-icon-button { width: 44px; min-width: 44px; height: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 10px; border: 1px solid #28382c; border-radius: 9px; background: #121914; color: #afbeb3; cursor: pointer; }
.app-v2 .app-icon-button:hover { background: #21341d; border-color: #384e3d; }
.app-v2 .app-form-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; }
.app-v2 .form-error:not(:empty) { display: block; color: #dd8891; background: #3d1a1c; border: 1px solid #3d1a20; border-radius: 8px; padding: 10px 12px; font-size: 14px; line-height: 1.5; margin: 12px 0; }
.app-v2 .form-error:empty { display: none; }
@media (max-width: 540px) { .app-v2 dialog.app-dialog { padding: 20px; max-height: 92dvh; } .app-v2 .app-form-row { grid-template-columns: minmax(0,1fr); gap: 0; } }
/* Toasts occupy their own layer: feedback never changes page geometry. */
.app-toast-region { position: fixed; z-index: 10000; right: 24px; bottom: 24px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.app-toast-region .notification { display: flex; align-items: center; gap: 16px; width: 100%; margin: 0; padding: 12px 14px 12px 18px; border: 1px solid #a6e36d; background: #101712; color: #d3dbd5; box-shadow: 0 8px 30px rgba(0,0,0,0.722); border-radius: 12px; font-size: 16px; line-height: 1.5; pointer-events: auto; }
.app-toast-region .notification-error { background: #3d1d1a; color: #e3828a; border-color: #3d1a1f; }
.app-toast-region .notification > span { flex: 1; }
.app-toast-dismiss { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; padding: 0; background: transparent; border: 0; border-radius: 8px; color: inherit; font-size: 24px; cursor: pointer; }
.app-toast-dismiss:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
@media(max-width:900px) { .app-toast-region { right: 16px; bottom: calc(82px + env(safe-area-inset-bottom)); } }

/* Shared SVG icons also appear on Gear, outside the pack preview pages. */
.app-v2 .pv-icon { display: inline-block; width: 24px; height: 24px; flex-shrink: 0; vertical-align: middle; }
.app-v2 [data-category-icon] { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.app-v2 [data-category-icon] .pv-icon { width: 18px; height: 18px; }
/* Gear actions have readable text, so they must not use square icon dimensions. */
.app-v2 .gear-action-btn { width: auto; min-width: 44px; min-height: 44px; height: auto; padding: 8px 12px; font-size: 14px; line-height: 1.4; white-space: nowrap; align-items: center; justify-content: center; }
.gear-item-svg{width:24px;height:24px;display:block;flex-shrink:0}.trip-gear-item-icon{display:inline-flex;flex:0 0 22px;width:22px;height:22px;color:#aebdb2}.trip-gear-item-icon svg{width:22px;height:22px}
.app-v2 :is(.gear-card-magazine-icon,.gear-list-item-icon,.gear-table-icon,[data-gear-icon])>svg{display:block;width:24px;height:24px;flex-shrink:0}
