/* ==========================================================================
   U Track Warranty Services MVP Stylesheet
   Theme based on legacy CSS: black background, orange/gold accents, clean MVP UI
   File: /public/assets/css/utrack-mvp.css
   ========================================================================== */

:root {
  --ut-bg: #000000;
  --ut-bg-soft: #101010;
  --ut-panel: #161616;
  --ut-panel-2: #1f1f1f;
  --ut-border: #d0a667;
  --ut-border-soft: rgba(208, 166, 103, 0.35);
  --ut-text: #f6f1e8;
  --ut-muted: #c9bfae;
  --ut-orange: #ff8c00;
  --ut-orange-dark: #c66b00;
  --ut-gold: #d0a667;
  --ut-white: #ffffff;
  --ut-danger: #ff4d4d;
  --ut-success: #3fcf7f;
  --ut-warning: #ffd166;
  --ut-info: #66afe9;
  --ut-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  --ut-radius: 12px;
  --ut-radius-sm: 8px;
  --ut-max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top, #1d1306 0%, #000000 38%, #000000 100%);
  color: var(--ut-text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   Typography and links
   -------------------------------------------------------------------------- */

h1,
h2,
h3,
h4 {
  color: var(--ut-gold);
  line-height: 1.2;
  margin: 0 0 16px;
}

h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

h2 {
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 14px;
}

a {
  color: var(--ut-white);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover,
a:focus {
  color: var(--ut-orange);
}

small,
.muted {
  color: var(--ut-muted);
}

/*---------------------------------------------------------------------
   Authorization Layout
   -----------------------------------------------------------------*/
   
 .auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
    gap: 2rem;
    align-items: stretch;
    margin: 2rem 0;
}

.auth-form-card,
.auth-visual-card {
    min-width: 0;
}

.auth-visual-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
}

.auth-visual-card img {
    display: block;
    width: 100%;
    max-width: 420px;
    height: auto;
    margin: 0 auto 1.5rem;
}

.auth-benefits {
    margin: 1rem 0 0;
    padding-left: 1.25rem;
}

.auth-benefits li {
    margin-bottom: 0.6rem;
}

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

    .auth-visual-card {
        order: -1;
        padding: 1.25rem;
    }

    .auth-visual-card img {
        max-width: 280px;
    }
} 

 .auth-layout {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 2rem 1rem;
}

.auth-form-card {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

.auth-form-card form {
    width: 100%;
}

.auth-form-card input {
    width: 100%;
    box-sizing: border-box;
}

.auth-visual-card {
    margin-top: 2rem;
}

.auth-visual-card img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.container,
.ut-container {
  width: min(100% - 32px, var(--ut-max-width));
  margin: 0 auto;
}

main.container,
main.ut-container {
  padding: 28px 0 50px;
}

.page-shell {
  min-height: 100vh;
}

.card,
.panel,
.warranty-card,
.dashboard-card,
.dashboard-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.dashboard-card-link:hover,
.dashboard-card-link:focus {
    color: inherit;
    text-decoration: none;
    transform: translateY(-2px);
}

.dashboard-card-link:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

.dashboard-card-action {
    display: inline-block;
    margin-top: 0.5rem;
    font-weight: 600;
}

.dashboard-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dashboard-stat-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
}

.dashboard-stat-card h3 {
    margin-top: 0;
}

.dashboard-stat-card .stat-number {
    margin-bottom: 0;
}
.form-card {
  background: linear-gradient(180deg, var(--ut-panel) 0%, #0f0f0f 100%);
  border: 1px solid var(--ut-border-soft);
  border-radius: var(--ut-radius);
  box-shadow: var(--ut-shadow);
  padding: 22px;
}

.card + .card,
.panel + .panel,
.warranty-card + .warranty-card {
  margin-top: 18px;
}

/* --------------------------------------------------------------------------
   Header and navigation
   -------------------------------------------------------------------------- */

.site-header {
  background: rgba(0, 0, 0, 0.92);
  border-bottom: 2px solid var(--ut-border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header-inner {
  width: min(100% - 32px, var(--ut-max-width));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
}

.brand,
.logo {
  color: var(--ut-gold);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-decoration: none;
}

.brand span,
.logo span {
  color: var(--ut-orange);
}

.nav,
.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.nav a,
.site-nav a {
  color: var(--ut-white);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 12px;
}

.nav a:hover,
.site-nav a:hover,
.nav a.active,
.site-nav a.active {
  color: var(--ut-orange);
  border-color: var(--ut-border-soft);
  background: rgba(255, 140, 0, 0.08);
}

/* --------------------------------------------------------------------------
   Dashboard
   -------------------------------------------------------------------------- */
.dashboard-card {
    background: transparent;
    border: 1px solid #dcdfe4;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    padding: 1.5rem;
}

.dashboard-hero {
  display: grid;
  gap: 18px;
  grid-template-columns: 1.5fr 1fr;
  margin-bottom: 22px;
}


.stats-grid,
.dashboard-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 20px 0;
}

.stat-card {
  background: var(--ut-panel);
  border: 1px solid var(--ut-border-soft);
  border-radius: var(--ut-radius);
  padding: 18px;
}

.stat-card .stat-value {
  color: var(--ut-orange);
  display: block;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-card .stat-label {
  color: var(--ut-muted);
  font-size: 0.95rem;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn,
button,
input[type="submit"],
input[type="button"] {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--ut-border);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--ut-orange), var(--ut-orange-dark));
  color: #111111;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  color: #000000;
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(255, 140, 0, 0.18);
}

.btn.secondary,
.btn-outline {
  background: transparent;
  color: var(--ut-gold);
}

.btn.secondary:hover,
.btn-outline:hover {
  color: var(--ut-orange);
  background: rgba(255, 140, 0, 0.08);
}

.btn.danger {
  background: var(--ut-danger);
  border-color: var(--ut-danger);
  color: #ffffff;
}

.btn.small {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

form {
  margin: 0;
}

.form-card {
  max-width: 820px;
  margin: 0 auto;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-group,
.field {
  margin-bottom: 16px;
}

label {
  display: block;
  color: var(--ut-gold);
  font-weight: 700;
  margin-bottom: 7px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="file"],
select,
textarea {
  width: 100%;
  min-height: 42px;
  background: #ffffff;
  border: 2px solid var(--ut-border);
  border-radius: var(--ut-radius-sm);
  color: #000000;
  font: inherit;
  padding: 9px 10px;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--ut-info);
  box-shadow: 0 0 0 4px rgba(102, 175, 233, 0.18);
  outline: none;
}

.form-help {
  color: var(--ut-muted);
  font-size: 0.9rem;
  margin-top: 5px;
}

.warranty-months {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 16px;
  border: 1px dashed var(--ut-border-soft);
  border-radius: var(--ut-radius);
  background: rgba(208, 166, 103, 0.05);
  margin-bottom: 16px;
}

.inline-action-form {
    display: inline-block;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Tables and warranty list
   -------------------------------------------------------------------------- */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--ut-border-soft);
  border-radius: var(--ut-radius);
  background: var(--ut-panel);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 850px;
}

th,
td {
  border-bottom: 1px solid rgba(208, 166, 103, 0.18);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #0c0c0c;
  color: var(--ut-gold);
  font-weight: 700;
}

tr:hover td {
  background: rgba(255, 140, 0, 0.04);
}

.actions,
.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.warranty-status {
    display: inline-block;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-active {
    background: #e8f5e9;
    color: #1b5e20;
}

.status-warning {
    background: #fff3cd;
    color: #664d03;
}

.status-expired {
    background: #f8d7da;
    color: #842029;
}

.status-neutral {
    background: #e9ecef;
    color: #495057;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-small {
    padding: 0.4rem 0.7rem;
    font-size: 0.9rem;
}

.receipt-links a {
  display: inline-block;
  margin: 0 0 5px;
}

.receipt-delete-form {
    display: inline-block;
    margin-top: 0.5rem;
}

.receipt-preview-card {
    min-height: 12rem;
    overflow: hidden;
}

.receipt-image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 80vh;
    margin: 0 auto;
    object-fit: contain;
    background: transparent;
    border: 0;
}

.receipt-frame {
    display: block;
    width: 100%;
    min-height: 80vh;
    background: transparent;
    border: 0;
}

@media print {
    header,
    nav,
    footer,
    .site-header,
    .site-nav,
    .site-footer,
    .dashboard-actions,
    .dashboard-card:first-of-type {
        display: none !important;
    }

    html,
    body,
    .container {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: none !important;
        background: #ffffff !important;
    }

    .receipt-preview-card {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    .receipt-image {
        display: block !important;
        width: auto !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: 95vh !important;
        margin: 0 auto !important;
    }

    .receipt-frame {
        display: block !important;
        width: 100% !important;
        height: 95vh !important;
        border: 0 !important;
    }

    @page {
        margin: 10mm;
    }
}

/* --------------------------------------------------------------------------
   Alerts, badges, statuses
   -------------------------------------------------------------------------- */

.alert {
  border-radius: var(--ut-radius-sm);
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--ut-border-soft);
}

.alert-success {
  color: #062b18;
  background: var(--ut-success);
  border-color: var(--ut-success);
}

.alert-danger,
.alert-error {
  color: #ffffff;
  background: #7a1111;
  border-color: var(--ut-danger);
}

.alert-warning {
  color: #1d1600;
  background: var(--ut-warning);
  border-color: var(--ut-warning);
}

.badge,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.82rem;
  font-weight: 700;
}

.badge-active,
.status-active {
  background: rgba(63, 207, 127, 0.16);
  color: var(--ut-success);
  border: 1px solid rgba(63, 207, 127, 0.35);
}

.badge-expired,
.status-expired {
  background: rgba(255, 77, 77, 0.16);
  color: var(--ut-danger);
  border: 1px solid rgba(255, 77, 77, 0.35);
}

.badge-expiring,
.status-expiring {
  background: rgba(255, 209, 102, 0.16);
  color: var(--ut-warning);
  border: 1px solid rgba(255, 209, 102, 0.35);
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */

.pagination {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
}

.pagination a,
.pagination span {
  min-width: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ut-border-soft);
  border-radius: 999px;
  color: var(--ut-white);
  text-decoration: none;
  padding: 6px 10px;
}

.pagination a:hover,
.pagination .active {
  background: var(--ut-orange);
  color: #000000;
  border-color: var(--ut-orange);
}

.pagination .disabled {
  color: #777777;
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   Auth pages
   -------------------------------------------------------------------------- */

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.auth-card {
  width: min(100%, 460px);
  background: linear-gradient(180deg, var(--ut-panel) 0%, #0b0b0b 100%);
  border: 2px ridge var(--ut-border);
  border-radius: var(--ut-radius);
  box-shadow: var(--ut-shadow);
  padding: 28px;
}

.auth-card h1,
.auth-card h2 {
  text-align: center;
}

.auth-card .btn,
.auth-card button,
.auth-card input[type="submit"] {
  width: 100%;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--ut-border-soft);
  color: var(--ut-muted);
  padding: 24px 0;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.full-width {
  width: 100%;
}

.hidden {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
    .dashboard-hero {
        grid-template-columns: 1fr;
    }

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

  .site-header-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .form-grid,
  .warranty-months,
  .dashboard-hero,
  .stats-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .card,
  .panel,
  .warranty-card,
  .dashboard-card,
  .form-card,
  .auth-card {
    padding: 18px;
  }

  .nav,
  .site-nav,
  .quick-actions,
  .actions,
  .table-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .nav a,
  .site-nav a,
  .btn {
    width: 100%;
    justify-content: center;
  }
}
.hero-section {
    padding: 80px 20px;
    text-align: center;
}

.hero-text {
    max-width: 800px;
    margin: auto;
    font-size: 18px;
}

.hero-buttons {
    margin-top: 30px;
}

.features-section {
    padding: 50px 20px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
    gap: 20px;
}

.feature-card {
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.cta-section {
    padding: 60px 20px;
    text-align: center;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
    gap: 25px;
}

.pricing-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
}

.price {
    font-size: 30px;
    margin: 20px 0;
}

.featured {
    transform: scale(1.05);
}

.contact-card {
    margin: 30px 0;
    padding: 25px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.contact-form-container {
    margin-top: 40px;
}

.contact-form-container textarea {
    resize: vertical;
}

/* Phase 3 Public Website Additions */
.site-nav{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:24px;padding:16px 24px
  }
  
.nav-brand a{font-weight:700;
  text-decoration:none
  }
  
.nav-links{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:16px;
  list-style:none;
  margin:0;padding:0
  }
  
.hero-section{  
  padding:80px 20px;
  text-align:center
  }
  
.hero-text{
  max-width:780px;
  margin:0 auto;
  font-size:1.125rem
  }
.hero-buttons{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:14px;margin-top:28px
  }
.feature-grid,.pricing-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:22px;margin-top:28px
  }
.feature-card,.pricing-card,.contact-card,.faq-item{
  padding:24px;
  border:1px solid #ddd;
  border-radius:10px
  }

.price{font-size:1.8rem;
  font-weight:700
  }

.featured{
    transform:scale(1.03)
    }

.cta-section{
  padding:60px 20px;
  text-align:center
  }

.legal-page{
max-width:900px
}

.btn-small{
padding:8px 12px
}

.admin-action-btn {
    width: 140px;
    padding: 8px 12px;
    font-size: 12px;
    text-align: center;
    margin-bottom: 3px;
    display: inline-block;
}

.status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-active {
    background: #d8f5df;
    color: #146c2e;
}

.status-free {
    background: #eef1f5;
    color: #444;
}

.status-cancelled {
    background: #ffe0e0;
    color: #9b1c1c;
}

.status-past_due,
.status-unpaid {
    background: #fff3cd;
    color: #856404;
}

.status-trialing {
    background: #dbeafe;
    color: #1d4ed8;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffe69c;
    padding: 12px;
    margin: 15px 0;
    border-radius: 6px;
}

.alert-success {
    background: #d8f5df;
    color: #146c2e;
    border: 1px solid #b7ebc0;
    padding: 12px;
    margin: 15px 0;
    border-radius: 6px;
}

.alert-info {
    background: #e8f1ff;
    color: #174ea6;
    border: 1px solid #bcd3ff;
    padding: 12px;
    margin: 12px 0;
    border-radius: 6px;
}

.notification.unread {
    background: transparent;
    border: 1px solid rgba(30,136,229,.35);
}

.attachment-badge {
    display: inline-block;
    margin-top: 5px;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    background: #eef6ff;
    color: #0b5394;
    border: 1px solid #b6d7ff;
}

.warranty-hero-image {
    width: 100%;
    max-width: 900px;
    margin: 2rem auto;
}

.warranty-hero-image img,
.feature-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
}

.warranty-product-image-cell {
    width: 112px;
    min-width: 112px;
    text-align: center;
    vertical-align: middle;
}

.warranty-product-image {
    display: block;
    width: 96px;
    height: 96px;
    margin: 0 auto;
    object-fit: contain;
    border-radius: 8px;
}

.warranty-no-image {
    display: inline-block;
    font-size: 0.85rem;
    opacity: 0.65;
}

.feature-layout {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.feature-content,
.feature-image {
    flex: 1 1 320px;
    min-width: 0;
}

.feature-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
}

.feature-card {
    overflow: hidden;
}

.feature-card-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.home-hero {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.home-hero-content,
.home-hero-image {
    flex: 1 1 360px;
    min-width: 0;
}

.home-hero-image {
    max-width: 620px;
}

.home-hero-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
}

/* Dashboard responsive improvements */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.dashboard-card {
    min-width: 0;
}

.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.dashboard-actions form {
    margin: 0;
}

.dashboard-actions .btn,
.dashboard-actions button {
    margin: 0;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.warranty-table {
    width: 100%;
    border-collapse: collapse;
}

.warranty-table th,
.warranty-table td {
    vertical-align: middle;
}

.table-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.inline-action-form {
    display: inline-flex;
    margin: 0;
}

progress {
    display: block;
    width: 100%;
    max-width: 500px;
}

@media (max-width: 768px) {
    .home-hero {
        flex-direction: column;
    }

    .home-hero-image {
        max-width: 100%;
    }
}

.feature-card-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {

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

    .dashboard-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-actions .btn,
    .dashboard-actions button,
    .dashboard-actions form {
        width: 100%;
    }

    .dashboard-actions form button {
        width: 100%;
    }

    .table-actions {
        min-width: 150px;
    }

    .table-actions .btn,
    .table-actions button {
        width: 100%;
        text-align: center;
    }

    .warranty-table th,
    .warranty-table td {
        padding: 0.65rem;
    }
}

/* Blog */

.blog-featured-image {
    width: 100%;
    margin: 1.5rem auto;
    text-align: center;
}

.blog-featured-image img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.blog-content {
    max-width: 100%;
}

.blog-content img {
    max-width: 100%;
    height: auto;
}

.blog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 2rem 0;
}

/* Blogs */

.blogs-featured-image {
    width: 100%;
    margin: 1.5rem auto;
    text-align: center;
}

.blogs-featured-image img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.blogs-content {
    max-width: 100%;
}

.blogs-content img {
    max-width: 100%;
    height: auto;
}

.blogs-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 2rem 0;
}

/* Smartphone receipt capture */

.receipt-capture-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 0.75rem 0;
}

.receipt-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.receipt-preview {
    margin-top: 1rem;
    text-align: center;
}

.receipt-preview img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 600px;
    height: auto;
    margin: 0 auto 0.75rem;
    object-fit: contain;
    border-radius: 6px;
}

/* Receipt camera preview */

.receipt-preview {
    width: 100%;
    margin-top: 1rem;
    text-align: center;
}

.receipt-preview[hidden] {
    display: none;
}

.receipt-preview img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 600px;
    height: auto;
    margin: 0 auto 0.75rem;
    object-fit: contain;
}

/* Mobile layout safeguards */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
video,
canvas,
svg {
    max-width: 100%;
    height: auto;
}

.ut-container,
.container,
.page-shell,
.form-card,
.dashboard-card {
    width: 100%;
    max-width: 100%;
}

input,
select,
textarea,
button {
    max-width: 100%;
}

table {
    max-width: 100%;
}

@media (max-width: 768px) {

    .ut-container,
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .form-grid,
    .warranty-months {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .quick-actions,
    .dashboard-actions,
    .receipt-capture-actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .quick-actions .btn,
    .dashboard-actions .btn,
    .receipt-capture-actions .btn,
    .quick-actions button,
    .dashboard-actions button {
        width: 100%;
    }

    .warranty-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .warranty-table th,
    .warranty-table td {
    white-space: normal;
     }
}

/* Warranty table action controls */

.warranty-row-actions,
.receipt-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
}

.warranty-row-actions form,
.receipt-actions form {
    margin: 0;
}

.warranty-table .admin-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    padding: 0.4rem 0.65rem;
    font-size: 0.85rem;
    line-height: 1.2;
    white-space: nowrap;
}

.warranty-row-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 85px;
}

.warranty-row-actions .warranty-delete-form {
    margin: 0;
}

.warranty-row-actions .admin-action-btn {
    width: 100%;
    margin: 0;
    padding: 5px 8px;
    font-size: 0.78rem;
}

.receipt-replace-form {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 100%;
}

.receipt-replace-form input[type="file"] {
    width: 100%;
    max-width: 100%;
    font-size: 0.8rem;
}

@media (max-width: 768px) {

    .warranty-table th,
    .warranty-table td {
        padding: 0.45rem;
        vertical-align: top;
    }

    .warranty-table .admin-action-btn {
        padding: 0.35rem 0.5rem;
        font-size: 0.78rem;
    }

    .warranty-row-actions,
    .receipt-actions {
        min-width: 90px;
        max-width: 130px;
    }

    .receipt-replace-form input[type="file"] {
        font-size: 0.72rem;
    }
}

/* Keep warranty receipt controls inside their table cell */

.receipt-actions {
    width: 100%;
    max-width: 180px;
}

.receipt-actions p,
.receipt-actions form {
    margin: 0 0 0.4rem;
}

.receipt-replace-form {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 100%;
    max-width: 100%;
}

.receipt-replace-form input[type="file"] {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    font-size: 0.75rem;
}

.receipt-replace-form .admin-action-btn,
.receipt-actions .admin-action-btn {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0.35rem 0.5rem;
    font-size: 0.78rem;
}

@media (max-width: 768px) {

    .warranty-table {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .warranty-table td {
        vertical-align: top;
    }

    .receipt-actions {
        min-width: 120px;
        max-width: 150px;
    }

    .receipt-replace-form input[type="file"] {
        font-size: 0.7rem;
    }
}

/* Warranty table receipt controls */

.warranty-table .receipt-actions {
  width: 150px;
  max-width: 150px;
}

.warranty-table .receipt-replace-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.warranty-table .receipt-replace-form input[type="file"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 5px 6px;
  font-size: 0.72rem;
}

.warranty-table .receipt-actions .admin-action-btn {
  width: 100%;
  max-width: 100%;
  padding: 5px 8px;
  font-size: 0.78rem;
}

.warranty-table .receipt-actions p {
  margin: 0 0 6px;
}

@media (max-width: 768px) {
  .warranty-table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .warranty-table th,
  .warranty-table td {
    vertical-align: top;
  }
}

.blog-cta {
    margin: 2.5rem 0 1.5rem;
    padding: 1.5rem;
    border: 1px solid var(--ut-border-soft);
    border-radius: var(--ut-radius);
    text-align: center;
    background: rgba(208, 166, 103, 0.05);
}

.blog-cta h2 {
    margin-top: 0;
}

.blog-cta p {
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

.blog-cta .btn {
    display: inline-block;
    margin-top: 0.5rem;
}
/* Admin Manage Members - compact action controls */

.warranty-table .member-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    width: auto;
    min-width: 165px;
}

.warranty-table .member-actions form {
    margin: 0;
    padding: 0;
    width: auto;
}

.warranty-table .member-action-btn {
    display: inline-block;
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 5px 9px;
    font-size: 0.76rem;
    line-height: 1.2;
    white-space: nowrap;
}

.warranty-table .member-inline-action {
    display: flex;
    align-items: center;
    gap: 5px;
    width: auto;
}

.warranty-table .member-password-input {
    width: 115px;
    max-width: 115px;
    min-width: 0;
    box-sizing: border-box;
    padding: 5px 6px;
    font-size: 0.76rem;
}

.warranty-table .member-plan-select {
    width: 95px;
    max-width: 95px;
    min-width: 0;
    box-sizing: border-box;
    padding: 5px 6px;
    font-size: 0.76rem;
}

.warranty-table td:last-child {
    vertical-align: top;
}

@media (max-width: 768px) {
    .warranty-table .member-actions {
        min-width: 155px;
    }

    .warranty-table .member-password-input {
        width: 105px;
        max-width: 105px;
    }

    .warranty-table .member-plan-select {
        width: 90px;
        max-width: 90px;
    }
}

/* Admin member email composer */

.admin-member-email-form {
    width: 100%;
    max-width: 700px;
}

.admin-member-email-form .form-group {
    margin-bottom: 18px;
}

.admin-member-email-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.admin-member-email-form .form-control {
    width: 100%;
    max-width: 700px;
    box-sizing: border-box;
}

.admin-member-email-form input[readonly] {
    opacity: 0.85;
    cursor: default;
}

.admin-member-email-message {
    min-height: 240px;
    resize: vertical;
}

.admin-member-email-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.admin-member-email-actions .btn {
    width: auto;
    min-width: 0;
}

@media (max-width: 768px) {
    .admin-member-email-form {
        max-width: 100%;
    }

    .admin-member-email-actions {
        flex-wrap: wrap;
    }
}
