/* ===================================================================
   UTM MANAGER — GLOBAL DESIGN SYSTEM (v1)
   Brand: Purple + Lime + Charcoal
   FINAL CLEAN MASTER FILE
   (No sidebar CSS included — as requested)
=================================================================== */


/* ===================================================================
   ROOT VARIABLES
=================================================================== */
:root {
  /* Brand */
  --utm-primary:        #7C3AED;
  --utm-primary-dark:   #4C1D95;
  --utm-primary-light:  #F4EFFE;

  /* Lime Accent */
  --utm-accent:         #4ADE80;
  --utm-accent-dark:    #22C55E;
  --utm-accent-light:   #BBF7D0;

  /* Neutrals */
  --utm-charcoal:       #1F2937;
  --utm-gray-dark:      #374151;
  --utm-gray:           #6B7280;
  --utm-gray-light:     #D1D5DB;
  --utm-bg:             #F9FAFB;
  --utm-surface:        #FFFFFF;

  /* Text */
  --utm-text-dark:      #111827;
  --utm-text:           #1F2937;
  --utm-text-light:     #6B7280;
  --utm-text-invert:    #ffffff;

  /* Borders / Shadows / Radius */
  --utm-border:         #E5E7EB;
  --utm-shadow-sm:      0 1px 2px rgba(0,0,0,0.05);
  --utm-shadow-md:      0 4px 6px rgba(0,0,0,0.08);

  --utm-radius-sm: 4px;
  --utm-radius:    8px;
  --utm-radius-lg: 12px;

  --utm-spacing-sm: 6px;
  --utm-spacing:   12px;
  --utm-spacing-lg: 20px;
}


/* ===================================================================
   GLOBAL RESET
=================================================================== */
html, body {
  margin: 0;
  padding: 0;
  background: var(--utm-bg);
}

.utm-disabled { opacity: .6; cursor: not-allowed; }
.utm-lock { margin-left: 6px; color: var(--utm-gray); }


/* ===================================================================
   TOP NAVIGATION
=================================================================== */
.utm-dashboard-topnav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--utm-surface);
  border-bottom: 1px solid var(--utm-border);
  padding: 12px 28px;
  width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
  position: relative;
  z-index: 20;
}

.utm-dashboard-topnav a {
  color: var(--utm-primary);
  padding: 6px 10px;
  text-decoration: none;
  border-radius: 4px;
}
.utm-dashboard-topnav a:hover { background: var(--utm-primary-light); }

.utm-logo {
  font-weight: bold;
  font-size: 18px;
  color: var(--utm-primary);
}

@media (max-width: 768px) {
  .utm-dashboard-topnav {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* ===================================================================
   LAYOUT WRAPPERS
=================================================================== */
.utm-dashboard-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100vw;
  background: var(--utm-bg);
  overflow: hidden;
}

.utm-content-area {
  flex: 1;
  padding: 2rem;
  background: var(--utm-surface);
  overflow-y: auto;
}


/* ===================================================================
   USER DROPDOWN (Top Right)
=================================================================== */
.utm-nav-right { display: flex; align-items: center; gap: 20px; }

.utm-user-dropdown { position: relative; cursor: pointer; }

.utm-user-name {
  color: var(--utm-primary);
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 4px;
}
.utm-user-name:hover { background: var(--utm-primary-light); }

.utm-dropdown-menu {
  display: none;
  position: absolute;
  top: 110%;
  right: 0;
  background: var(--utm-surface);
  border: 1px solid var(--utm-border);
  border-radius: 6px;
  box-shadow: var(--utm-shadow-md);
  min-width: 180px;
  z-index: 1000;
}

.utm-dropdown-menu a {
  display: block;
  padding: 10px 14px;
  text-decoration: none;
  font-size: 14px;
  color: var(--utm-primary);
  border-bottom: 1px solid var(--utm-border);
}
.utm-dropdown-menu a:last-child { border-bottom: none; }
.utm-dropdown-menu a:hover { background: var(--utm-primary-light); }

.utm-user-dropdown:hover .utm-dropdown-menu { display: block; }


/* ===================================================================
   BUTTON SYSTEM
=================================================================== */
.btn {
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--utm-radius-sm);
  font-size: 14px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: background .20s ease;
}

/* Primary (Purple) */
.btn-primary {
  background: var(--utm-primary);
  color: var(--utm-text-invert);
}
.btn-primary:hover { background: var(--utm-primary-dark); }

/* Secondary (Charcoal) */
.btn-secondary {
  background: var(--utm-charcoal);
  color: #fff;
}
.btn-secondary:hover { opacity: 0.9; }

/* Accent (Lime) */
.btn-accent {
  background: var(--utm-accent);
  color: var(--utm-charcoal);
}
.btn-accent:hover { background: var(--utm-accent-dark); }

/* Outline */
.btn-outline {
  background: transparent;
  border: 1px solid var(--utm-primary);
  color: var(--utm-primary-dark);
}
.btn-outline:hover { background: var(--utm-primary-light); }

/* Disabled */
.btn[disabled] {
  background: var(--utm-gray-light);
  color: var(--utm-text-light);
  cursor: not-allowed;
}


/* ===================================================================
   FORM INPUTS
=================================================================== */
.utm-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--utm-gray-light);
  border-radius: 8px;
  background: var(--utm-bg);
  transition: all 0.12s ease;
}

.utm-input:focus {
  border-color: var(--utm-primary);
  background: #fff;
  outline: none;
}


/* ===================================================================
   CARDS / INFO BOXES / ALERTS
=================================================================== */
.utm-form-box {
  background: var(--utm-surface);
  padding: 22px;
  border-radius: var(--utm-radius-lg);
  border: 1px solid var(--utm-gray-light);
  box-shadow: var(--utm-shadow-sm);
  margin-bottom: 18px;
}

.utm-page-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--utm-text-dark);
}

.utm-info-bar {
  background: var(--utm-primary-light);
  border-left: 4px solid var(--utm-primary);
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  color: var(--utm-text);
}

.utm-alert-success {
  background: #e8fbe8;
  padding: 10px 14px;
  border-left: 4px solid var(--utm-accent-dark);
  border-radius: 8px;
  margin-bottom: 12px;
  color: var(--utm-text);
}

.utm-fade-alert {
  animation: fadeOut 0.5s ease-in-out 3s forwards;
}
@keyframes fadeOut {
  to { opacity: 0; height: 0; margin: 0; padding: 0; overflow: hidden; }
}


/* ===================================================================
   TABLES
=================================================================== */
.utm-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.utm-table th {
  background: var(--utm-bg);
  padding: 12px 10px;
  font-weight: 600;
  border-bottom: 1px solid var(--utm-gray-light);
}

.utm-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--utm-gray-light);
}


/* ===================================================================
   MODALS / TOAST
=================================================================== */
.utm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.utm-modal {
  background: var(--utm-surface);
  padding: 20px;
  border-radius: var(--utm-radius-lg);
  max-width: 650px;
  width: 90%;
  border: 1px solid var(--utm-border);
  box-shadow: var(--utm-shadow-md);
  position: relative;
}

.utm-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 26px;
  color: var(--utm-primary);
  background: none;
  border: none;
  cursor: pointer;
}

#utm-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--utm-charcoal);
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--utm-radius-sm);
  display: none;
  box-shadow: var(--utm-shadow-md);
}


/* ===================================================================
   TEMPLATE LIBRARY
=================================================================== */
#utm-template-library {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

.utm-template-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(260px,1fr));
}

.utm-template-card {
  background: var(--utm-surface);
  border: 1px solid var(--utm-border);
  padding: 15px;
  border-radius: var(--utm-radius);
  box-shadow: var(--utm-shadow-sm);
}
.utm-template-card:hover { box-shadow: var(--utm-shadow-md); }


/* ===================================================================
   *** FINAL ADD VALUES FORM — PERFECT ALIGNMENT ***
=================================================================== */

.utm-predefined-add-form {
  /* wrapper to avoid leaking rules into other forms */
}

/* Header row */
.utm-predefined-add-form .utm-inline-header {
  display: grid;
  grid-template-columns: 180px 1fr 120px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--utm-text);
}

/* Input row */
.utm-predefined-add-form .utm-inline-group {
  display: grid !important;
  grid-template-columns: 180px 1fr 120px !important;
  gap: 14px !important;
  align-items: center !important;
  width: 100%;
}

/* Unified heights */
.utm-predefined-add-form .utm-inline-group select.utm-input,
.utm-predefined-add-form .utm-inline-group input.utm-input,
.utm-predefined-add-form .utm-inline-group .btn-primary {
  height: 44px !important;
  border-radius: 8px !important;
  padding: 0 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 15px;
}

/* Button column fixed width */
.utm-predefined-add-form .utm-button-holder {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  width: 120px;
}

/* Reduced form box height */
.utm-predefined-add-form .utm-form-box {
  padding: 16px 20px !important;
  margin-bottom: 10px !important;
}

/* ==========================================================
   REFINEMENT: Add Values Form (compact horizontal layout)
   Scope: .utm-predefined-add-form ONLY
   ========================================================== */

/* Smaller & tighter title */
.utm-predefined-add-form .utm-section-title {
    font-size: 20px !important;
    margin-bottom: 12px !important;
}

/* Header row (optional — keep or remove) */
.utm-predefined-add-form .utm-inline-header {
    display: grid !important;
    grid-template-columns: 160px 1fr 120px !important;
    margin-bottom: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}

/* One-line horizontal layout */
.utm-predefined-add-form .utm-inline-group {
    display: grid !important;
    grid-template-columns: 200px 1fr 120px !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    margin-bottom: 0 !important;
}

/* Inputs + dropdown */
.utm-predefined-add-form select.utm-input,
.utm-predefined-add-form input.utm-input {
    height: 42px !important;
    border-radius: 8px !important;
    background: #fafafa !important;
    padding: 8px 10px !important;
}

/* Add Values button */
.utm-predefined-add-form .btn-primary {
    height: 42px !important;
    padding: 0 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
}

/* Reduce spacing inside the card */
.utm-predefined-add-form .utm-form-box {
    padding: 16px 18px !important;
}
.utm-logout-wrapper {
  min-height: 70vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
}

.utm-logout-card {
  background:#fff;
  border-radius:14px;
  box-shadow:0 10px 30px rgba(0,0,0,.08);
  padding:40px;
  max-width:480px;
}

.utm-check {
  width:56px;
  height:56px;
  border-radius:50%;
  background:#6a0dad;
  color:#fff;
  font-size:28px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0 auto 20px;
}

.utm-btn-primary {
  display:inline-block;
  background:#6a0dad;
  color:#fff;
  padding:14px 28px;
  border-radius:10px;
  margin:20px 0;
  text-decoration:none;
}

.utm-btn-outline {
  display:inline-block;
  border:2px solid #6a0dad;
  color:#6a0dad;
  padding:12px 24px;
  border-radius:10px;
  text-decoration:none;
}

.utm-secondary-links a {
  margin:0 10px;
  color:#777;
  font-size:14px;
}
.utm-public-app-shell {
  min-height:100vh;
  background:#f7f8fb;
  display:flex;
  align-items:center;
  justify-content:center;
}

.utm-public-app-canvas {
  width:100%;
  max-width:900px;
  padding:40px;
}
.utm-auth-wide .utm-public-app-canvas {
  max-width: 900px;
}

.utm-auth-hero {
  text-align: center;
  padding: 40px 30px;
}

.utm-auth-hero h1 {
  font-size: 48px;
  line-height: 1.1;
  margin-bottom: 16px;
}

.utm-auth-hero p {
  font-size: 17px;
  color: #6b7280;
  margin-bottom: 28px;
}
.utm-public-app-shell.utm-auth-wide .utm-public-app-canvas {
  max-width: 900px !important;
}

