/* ========================================================================
    11/12/2025 - Updating app.eInsightsAI.com to einsightsai.com website 
    
    🎨 eInsightsAI Global Theme (Unified with Website + IT Tracker UI)
    Author: Tracy Hassman • Version: 2025.11

    Updated custom.css — Unified Theme + Your Existing Overrides

    This merges:
      Your brand variables
      The uploaded IT Maintenance Tracker UI theme
      Your existing login, tier badges, password toggle, etc.
  ======================================================================== */  

/* ==========================================================================
   🧭 eInsightsAI Custom Overrides
   Focus: page-specific and component-level styles
   Author: Tracy Hassman
   Version: 2025.11
   ========================================================================== */

/* ==========================================================================
   🧩 Layout & Containers
   ========================================================================== */

/* --------------------------------------------------------------------------
   🌈 Global Color System (Brand)
   -------------------------------------------------------------------------- */
:root {
  --primary: #029FAD;
  --accent:  #0066ff;
  --muted:   #878787;
  --text:    #000;
  --border:  #ddd;
  --soft:    #f8f8f8;
  --thead:   #f0f0f0;
  --good:    #16a34a;
  --warn:    #d97706;
  --bad:     #dc2626;
}

/* ==========================================================================
   🧩 Layout & Containers
   ========================================================================== */

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  overflow-x: hidden;
}

.main-content {
  padding: 40px 20px 60px 20px;
}

/* ==========================================================================
   🚀 Gradient Navbar — Matches IT Tracker + Website
   ========================================================================== */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, var(--primary), var(--accent));
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.brand img {
  height: 32px;
  width: auto;
  border-radius: 6px;
  background: #fff;
}

.navbar-links a {
  color: #fff;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.5);
  margin-left: 6px;
}

.navbar-links a.active {
  background: rgba(255,255,255,0.18);
}

.btn-logout {
  color: #fff !important;
}

/* ==========================================================================
   🏷️ Legacy Banner Handling
   ========================================================================== */

.banner-container {
  width: 100%;
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.banner-container img {
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: max-height 0.5s ease-in-out;
}

.banner-container.shrink img {
  max-height: 80px;
}

/* ==========================================================================
   📦 Card Components — Matches Uploaded HTML (Rounded + Soft Header)
   ========================================================================== */

.card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
  margin-bottom: 20px;
}

.card h2 {
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--soft);
}

.card .content {
  padding: 16px;
}

/* ==========================================================================
   🧠 Buttons & Interactive Elements (Unified)
   ========================================================================== */

.button-standard,
.btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

.btn,
.button-standard {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #fff;
}

.btn:hover {
  opacity: 0.9;
}

.btn.secondary {
  background: #fff;
  color: var(--primary);
  border-color: var(--primary);
}

.btn.warn {
  background: var(--warn);
  border-color: var(--warn);
}

.btn.bad {
  background: var(--bad);
  border-color: var(--bad);
}

/* Your existing color custom buttons preserved */
.btn-gray { background-color: #6c757d; color: #ffffff; }
.btn-gray:hover { background-color: #5a6268; }

.btn-royal { background-color: #7047eb; color: #ffffff; }
.btn-royal:hover { background-color: #5c3dc4; }

.btn-teal { background-color: #20c997; color: #ffffff; }
.btn-teal:hover { background-color: #17a586; }

.text-teal { color: #029fad; }

/* ==========================================================================
   🏢 Subscription & Tier Badges (unchanged)
   ========================================================================== */

.badge-subscription {
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-left: 8px;
  color: #ffffff;
  font-weight: bold;
}

.badge-basic {
  background-color: #d0f0f8;
  color: #029fad;
  border: 1px solid #b4e1ec;
}

.badge-pro {
  background-color: #d6e4ff;
  color: #0066ff;
  border: 1px solid #aac5ff;
}

.badge-enterprise {
  background-color: #e6e6e6;
  color: #878787;
  border: 1px solid #cfcfcf;
}

/* ==========================================================================
   📄 Tables — Unified with Reference UI
   ========================================================================== */

.tablewrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: var(--thead);
}

table thead th {
  padding: 10px;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

table td {
  padding: 10px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}

.table-hover tbody tr:hover {
  background-color: rgba(2,159,173,0.06);
}

/* ==========================================================================
   🟢 / 🟡 / 🔴 Status Badges (matches reference HTML)
   ========================================================================== */

.status-badge {
  padding: 2px 8px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
}

.status-good { background: var(--good); }
.status-warn { background: var(--warn); }
.status-bad  { background: var(--bad); }
.status-muted { background: #9aa0a6; }

/* ==========================================================================
   🧭 Tabs (Matches Reference UI)
   ========================================================================== */

.tabbar {
  display: flex;
  gap: 8px;
  margin: 14px 0;
}

.tabbar button,
.tabbar a {
  border: 1px solid var(--border);
  background: #fff;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.tabbar .active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

/* ==========================================================================
   💬 Forms & Inputs
   ========================================================================== */

input[type="text"],
textarea,
input[type="email"],
input[type="password"],
input[type="number"],
select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.input-group .btn {
  border-color: #ced4da;
}

.input-group .btn:focus {
  box-shadow: none;
}

/* ==========================================================================
   🔐 Login Page & Password Toggle (unchanged)
   ========================================================================== */

.password-container { position: relative; }

.password-toggle {
  position: absolute;
  top: 50%; right: 14px;
  transform: translateY(-50%);
  cursor: pointer;
  color: #6c757d;
  font-size: 1.2rem;
  transition: color 0.2s ease-in-out;
}

.password-toggle:hover { color: var(--accent); }

/* ==========================================================================
   ⚙️ Utility & Status Elements (preserved)
   ========================================================================== */

.file-icon {
  display: inline-block;
  font-size: 1.2rem;
  width: 2rem;
  text-align: center;
  margin-right: 6px;
}

.badge.pulsing { animation: pulse 1.5s infinite; }

@keyframes pulse {
  0% { opacity: 1; } 
  50% { opacity: 0.4; }
  100% { opacity: 1; }
}

#prompt-help {
  border-left: 4px solid var(--accent);
  padding-left: 10px;
}

.badge.bg-success {
  box-shadow: 0 0 6px rgba(25, 135, 84, 0.6);
  transition: transform 0.15s ease-in-out;
}

.badge.bg-success:hover {
  transform: scale(1.05);
}

/* ==========================================================================
   🦶 Footer (matches reference HTML)
   ========================================================================== */

.tagline {
  border-top: 1px solid var(--border);
  background: #fafafa;
  color: #555;
  font-size: 12px;
  padding: 8px 16px;
  text-align: center;
}
/* ========================================================================== */
/* 📊 Dashboard Layout (Tile Grid + Detail Cards + Upload Panel)              */
/* ========================================================================== */

.wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.page-header h1 {
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.page-header .muted {
  color: var(--muted);
  margin: 0;
}

/* ------------------  UPLOAD SECTION  ------------------ */

.detail-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 20px;
  margin-top: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

.detail-card h2 {
  margin: 0 0 10px 0;
  font-size: 1.3rem;
  font-weight: 700;
}

.detail-section-title {
  margin-top: 40px;
  font-size: 1.5rem;
  font-weight: 700;
}

/* Hideable upload form */
.hidden {
  display: none !important;
}

/* ------------------  TILE GRID  ------------------ */

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.tile {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

.tile--primary {
  border-color: var(--primary);
  box-shadow: 0px 0px 6px rgba(2,159,173,0.25);
}

.tile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 12px;
}

.tile-title {
  font-weight: 600;
  color: var(--text);
  font-size: 0.85rem;
}

.tile-body {
  margin-top: 5px;
}

.tile-value {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}

.tile-sub {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ------------------  EMPTY STATE  ------------------ */

.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--muted);
  font-style: italic;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: #fafafa;
  margin-top: 10px;
}
.admin-nav {
    gap: 1.25rem;
}

.admin-link {
    color: white;
    font-weight: 500;
    text-decoration: none;
    padding: 4px 6px;
    border-radius: 6px;
    transition: 0.2s;
}

.admin-link:hover {
    background: rgba(255,255,255,0.15);
}

.admin-link.active {
    background: rgba(255,255,255,0.25);
    font-weight: 600;
}
.tier-badge {
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.tier-trial { background-color: #dcd0ff; color: #4b2bbf; }
.tier-starter { background-color: #d4f5f1; color: #029FAD; }
.tier-pro { background-color: #dbe8ff; color: #0066FF; }
.tier-enterprise { background-color: #fff4cc; color: #b88b00; }

.status-active { background-color: #d4f8d4; color: #1d7a1d; }
.status-inactive { background-color: #e5e5e5; color: #555; }

.btn-royal {
    background-color: #0066FF;
    color: white;
    font-weight: 600;
}
.btn-royal:hover {
    background-color: #0053d1;
    color: white;
}
.prompt-row {
  padding: 16px 24px;
  border-bottom: 1px solid #eee;
  background: #fafafa;
}

#promptSelect {
  max-width: 420px;
}
/* Prompt layout + table breathing room — 2025-11-23 */
#promptSelect {
  max-width: 420px;
}

.tablewrap {
  padding: 0 16px 16px 16px;
}

.btn.secondary.btn-sm {
  min-width: 105px;
}

.table td, .table th {
  vertical-align: middle;
}
#fileTable td:first-child, 
#fileTable th:first-child {
  text-align: center;
  width: 48px;
}

/* Add CSS for a narrow info drawer — 2025-12-02 */
.results-drawer {
  position: fixed;
  top: 0;
  right: -360px; /* hidden by default */
  width: 340px;  /* narrow info drawer */
  height: 100vh;
  background: #ffffff;
  box-shadow: -4px 0 12px rgba(15, 23, 42, 0.18);
  border-left: 3px solid var(--primary, #029FAD);
  z-index: 1050;
  transition: right 0.22s ease-out;
  display: flex;
  flex-direction: column;
}

.results-drawer.open {
  right: 0;
}

.results-drawer-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(90deg, rgba(2,159,173,0.04), rgba(0,102,255,0.05));
}

.results-drawer-meta {
  background: #f8fafc;
}

.results-drawer-body {
  overflow-y: auto;
  flex: 1;
}

.results-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
  z-index: 1040;
}

.results-drawer-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.result-item {
  border-radius: 0.5rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
  padding: 0.5rem 0.75rem;
  background: #ffffff;
}

.result-item:hover {
  border-color: var(--primary, #029FAD);
  box-shadow: 0 0 0 1px rgba(2, 159, 173, 0.25);
}

/* ==========================================================
   eInsightsAI Auth Theme
   © 2025 eInsightsAI — RenewalPro v3.6
   Last Updated: 2025-12-02
   Clean SaaS login/forgot/reset styling
========================================================== */

:root {
    --auth-bg: #f3f6fb;
    --auth-card-bg: #ffffff;
    --auth-border: #dde3f0;
    --auth-input-border: #c7d0e4;
    --auth-input-focus: #0066ff;
}

body {
    background-color: var(--auth-bg);
}

/* auth-wrapper + auth-card are defined in base.html inline CSS,
   these utilities refine input/button/link styling. */

.auth-input {
    border-radius: 10px;
    border: 1px solid var(--auth-input-border);
    padding: 10px 12px;
    font-size: 0.95rem;
}

.auth-input:focus {
    outline: none;
    border-color: var(--auth-input-focus);
    box-shadow: 0 0 0 0.15rem rgba(0, 102, 255, 0.15);
}

.auth-btn-primary {
    border-radius: 999px;
    font-weight: 600;
    padding: 10px 14px;
}

.auth-link {
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

/* Make the topbar slightly softer on auth pages if desired */
.topbar {
    /* no change to your existing brand rules; extend here if needed */
}

/* ============================================================================
   Mobile Responsive Enhancements
   Last Updated: 2025-12-02
============================================================================ */

@media (max-width: 576px) {
    .auth-card {
        padding: 2rem 1.4rem;
        border-radius: 12px;
    }

    .auth-form input,
    .btn-primary {
        height: 48px;
        font-size: 1rem;
    }

    .auth-wrapper {
        padding: 1rem;
    }

    h2 {
        font-size: 1.55rem;
    }
}
