@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* MODERN SaaS PALETTE */
:root {
  /* FACTORY: Corporate Navy Blue (Represents Trust, Stability, Enterprise) */
  --factory-primary: #1e40af; 
  --factory-bg: #f8fafc;
  --factory-accent: rgba(30, 64, 175, 0.08);

  /* SHOP: Financial Deep Green (Represents Money, Commerce, Growth) */
  --shop-primary: #059669; 
  --shop-bg: #f0fdf4;
  --shop-accent: rgba(5, 150, 105, 0.08);

  /* CUSTOMER: Premium Gold/Bronze (Represents Value, Coins, Premium Service) */
  --customer-primary: #d97706; 
  --customer-bg: #fffbeb;
  --customer-accent: rgba(217, 119, 6, 0.08);

  --white: #ffffff;
  --glass: rgba(255, 255, 255, 0.85); /* Slightly less transparent for cleaner text reading */
  --text-main: #0f172a; /* Deep Slate Black */
  --text-muted: #475569; /* Darker muted text for better professional contrast */
  
  /* Smoother, softer native app shadow */
  --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.03), 0 2px 4px rgba(0, 0, 0, 0.02);
  
  --nav-height: 75px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* BASE RESET & PERFORMANCE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--white);
  color: var(--text-main);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* PREMIUM HEADER */
.main-header {
  height: 70px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-area i {
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--factory-primary), var(--customer-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.logo-area h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

/* APP WRAPPER: MOBILE FIRST REVERSE */
.app-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column-reverse; 
  overflow: hidden;
  background: inherit;
}

/* FLOATING DOCK NAVIGATION (MOBILE) */
.navigation-bar {
  background: var(--white);
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 500px;
  height: 65px;
  border-radius: 20px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.8);
  z-index: 1000;
  padding: 0 10px;
}

.nav-item {
  text-decoration: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
  position: relative;
  padding: 8px 12px;
  border-radius: 12px;
}

.nav-item i {
  font-size: 1.2rem;
}

.nav-item span {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-item.active {
  color: var(--factory-primary);
  background: var(--factory-accent);
}

.nav-item.active::after {
  
  position: absolute;
  bottom: -4px;
  width: 4px;
  height: 4px;
  background: var(--factory-primary);
  border-radius: 50%;
}

/* MAIN VIEW & THEMES (Dynamic Color Variables) */
.main-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-bottom: 100px; 
  transition: var(--transition);
  min-height: 0;
  overflow-y: auto;
}

/* We bind the active colors to the current theme wrapper */
.factory-theme { 
  background: var(--factory-bg); 
  --theme-primary: var(--factory-primary);
  --theme-accent: var(--factory-accent);
  --theme-soft-border: #e0e7ff; 
}
.shop-theme { 
  background: var(--shop-bg); 
  --theme-primary: var(--shop-primary);
  --theme-accent: var(--shop-accent);
  --theme-soft-border: #d1fae5; 
}
.customer-theme { 
  background: var(--customer-bg); 
  --theme-primary: var(--customer-primary);
  --theme-accent: var(--customer-accent);
  --theme-soft-border: #ede9fe; 
}

/* SEGMENTED CONTROL TABS (Smooth Premium Upgrade) */
.tab-container {
  display: flex;
  margin: 16px 20px; /* Better alignment with the new premium cards */
  background: #f1f5f9; /* Solid, soft modern slate background */
  padding: 6px;
  border-radius: 20px;
  position: relative;
}

.tab-btn {
  flex: 1;
  padding: 12px 0;
  border: none;
  background: transparent;
  font-weight: 800; /* Bolder, app-like typography */
  font-size: 0.85rem;
  color: #94a3b8; /* Muted slate for inactive tabs */
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  border-radius: 14px; /* Slightly tighter than the container */
  /* Super smooth iOS-style spring transition */
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
  position: relative;
}

/* Touch feedback before the tab activates */
.tab-btn:active {
  transform: scale(0.95);
  background: rgba(255, 255, 255, 0.3);
}

.tab-btn.active {
  background: #ffffff;
  /* Uses the dynamic theme color, falls back to factory blue if needed */
  color: var(--theme-primary, var(--factory-primary)); 
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.02);
  transform: scale(1);
}

/* DATA LIST AREA */
.data-list-area {
  flex: 1;
  padding: 0 20px;
  overflow-y: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.data-list-area::-webkit-scrollbar { display: none; }

/* PREMIUM ENTRY CARDS (App-like UI Upgrade) */
.entry-card {
  background: var(--white);
  margin-bottom: 10px; /* Tighter spacing to utilize space better */
  padding: 16px 18px; /* Optimized padding for mobile devices */
  border-radius: 20px; /* Modern squircle shape */
  border: 1px solid #f1f5f9; /* Clean, subtle boundary */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03), 0 2px 4px rgba(0, 0, 0, 0.02); /* Soft, native iOS-like shadow */
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s, box-shadow 0.2s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

/* Active touch feedback for mobile */
.entry-card:active {
  transform: scale(0.98);
  background: #f8fafc;
}

/* Remove floaty hover effect on mobile, keep subtle for desktop */
@media (hover: hover) {
  .entry-card:hover {
    box-shadow: 0 12px 25px -10px rgba(0,0,0,0.08);
  }
}

/* Name and Subtext container constraints for responsiveness */
.entry-card > div:first-child {
  min-width: 0; /* Crucial: allows text truncation to work */
  flex: 1;
  padding-right: 12px;
}

.entry-card strong {
  font-size: .9rem !important;
  font-weight: 800;
  color: #0f172a !important; /* Deep slate for high contrast */
  display: block;
  margin-bottom: 2px !important;
  letter-spacing: -0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; /* Truncate long names */
}

/* Override inline phone text styling */
.entry-card > div:first-child > div {
  font-size: 0.8rem !important;
  color: #64748b !important; /* Muted slate */
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Chevron icon color override */
.entry-card .fa-chevron-right {
  color: #cbd5e1 !important;
  font-size: 0.9rem;
}

/* FLOATING ACTION BUTTON (FAB) */
.action-layer {
  position: fixed;
  bottom: 100px;
  right: 25px;
  z-index: 900;
}

#add-entry-btn, #add-bill-btn, #open-add-item {
  height: 60px;
  padding: 0 18px;
  border-radius: 30px;
  border: none;
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
  transition: var(--transition);
  cursor: pointer;
}
#add-bill-btn{
  height: 50px;
}

#add-entry-btn:active { transform: scale(0.9); }

/* Premium Fintech Button Gradients */
.factory-btn { background: linear-gradient(135deg, #2563eb, #1e40af); } /* Modern Corporate Navy */
.shop-btn { background: linear-gradient(135deg, #10b981, #059669); } /* Deep Financial Green */
.customer-btn { background: linear-gradient(135deg, #f59e0b, #d97706); } /* Premium Wealth Gold */

/* DESKTOP ADAPTATION */
@media (min-width: 1024px) {
  .app-wrapper {
    flex-direction: row;
  }

  .navigation-bar {
    position: relative;
    left: 0;
    top: 0;
    transform: none;
    width: 260px;
    height: 100vh;
    flex-direction: column;
    justify-content: flex-start;
    padding: 40px 20px;
    gap: 15px;
    border-radius: 0;
    border-right: 1px solid rgba(0,0,0,0.05);
    background: var(--white);
    box-shadow: none;
  }

  .nav-item {
    width: 100%;
    flex-direction: row;
    gap: 15px;
    padding: 14px 20px;
    justify-content: flex-start;
  }

  .nav-item i { font-size: 1.4rem; }
  .nav-item span { font-size: 0.9rem; }

  .main-view {
    padding-bottom: 0;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
  }

  .tab-container { width: 500px; margin: 40px auto; }

  .action-layer {
    bottom: 40px;
    right: 40px;
  }
}

/* MODERN MODAL */
.modal-overlay {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
}

.modal-content {
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: modalPop 0.3s ease-out;
}

@keyframes modalPop {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.input-group input {
  background: #f1f5f9;
  border: 1px solid transparent;
  padding: 14px;
  transition: var(--transition);
}

.input-group input:focus {
  background: var(--white);
  border-color: var(--factory-primary);
  outline: none;
  box-shadow: 0 0 0 4px var(--factory-accent);
}


/* PREMIUM GLASS-SAAS MODAL REDESIGN 
   Targeting: #entry-modal, .modal-content, .input-group
*/

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4); /* Slate overlay with transparency */
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    display: none; /* Managed by entryManager.open() in script.js */
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: modalOverlayFade 0.3s ease-out;
}

.modal-content {
    background: #ffffff;
    padding: 40px;
    border-radius: 32px; /* Super-rounded modern corners */
    width: 100%;
    max-width: 440px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.15), 
        0 0 0 1px rgba(0, 0, 0, 0.02);
    transform-origin: center;
    /* Spring-like entry animation */
    animation: modalSheetSlide 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalOverlayFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSheetSlide {
    from { transform: translateY(40px) scale(0.92); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

#modal-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 28px;
    letter-spacing: -0.03em;
    text-align: left;
}

/* INPUT FIELD STYLING */
.input-group {
    margin-bottom: 24px;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b; /* Muted slate */
    margin-bottom: 10px;
    margin-left: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-group input {
    width: 100%;
    background: #f8fafc;
    border: 2px solid #f1f5f9;
    padding: 16px 20px;
    border-radius: 18px;
    font-size: 1rem;
    color: #0f172a;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.input-group input::placeholder {
    color: #94a3b8;
}

.input-group input:focus {
    background: #ffffff;
    border-color: var(--factory-primary); /* Uses Indigo from your :root */
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    transform: translateY(-1px);
}

/* ERROR STATE */
.error-text {
    color: #ef4444;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 8px;
    margin-left: 6px;
    display: none;
}

/* ACTION BUTTONS */
.modal-actions {
    display: flex;
    gap: 14px;
    margin-top: 36px;
}

.modal-actions button {
    flex: 1;
    padding: 16px;
    border-radius: 18px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.btn-secondary:hover {
    background: #e2e8f0;
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, var(--factory-primary), #4f46e5);
    color: #ffffff;
    box-shadow: 0 12px 20px -8px rgba(99, 102, 241, 0.5);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -8px rgba(99, 102, 241, 0.6);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

/* VALIDATION SHAKE ANIMATION */
.shake {
    animation: premiumShake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes premiumShake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
    40%, 60% { transform: translate3d(3px, 0, 0); }
}

/* MOBILE RESPONSIVENESS */
@media (max-width: 480px) {
    .modal-content {
        padding: 32px 24px;
        border-radius: 28px;
        align-self: flex-end; /* Slides up from bottom on mobile */
        margin-bottom: 20px;
    }
    
    #modal-title {
        font-size: 1.5rem;
    }
}


/* EMPTY STATE UI STYLING */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted); /* Uses your defined muted slate color */
  animation: fadeIn 0.6s ease-out;
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.05));
}

.empty-state p {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  max-width: 250px;
  line-height: 1.5;
}

/* Subtle entry animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
/* --- Premium Import Button Style --- */
.import-btn {
    width: 100%;
    padding: 12px;
    border-radius: 20px;
    border: 1.5px solid #e2e8f0;
    background: white;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}
.import-btn:active { transform: scale(0.98); background: #f8fafc; }

.btn-icon-circle {
    width: 45px;
    height: 45px;
    background: var(--factory-accent);
    color: var(--factory-primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.btn-text-area strong { display: block; font-size: 0.95rem; color: #1e293b; }
.btn-text-area span { font-size: 0.75rem; color: #64748b; }

/* --- Full Screen Picker Overlay --- */
.picker-overlay {
    position: fixed;
    top: 0; left: 100%; width: 100%; height: 100%;
    background: #f8fafc;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.picker-overlay.active { left: 0; }

.picker-header { 
    background: white; 
    padding: 15px 20px; 
    display: flex; 
    align-items: center; 
    gap: 20px; 
    border-bottom: 1px solid #f1f5f9;
}

.picker-tabs {
    flex: 1;
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 12px;
}

.picker-tab {
    flex: 1;
    border: none;
    padding: 8px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    color: #64748b;
    background: transparent;
    cursor: pointer;
}
.picker-tab.active { background: white; color: var(--factory-primary); box-shadow: 0 2px 8px rgba(0,0,0,0.05); }

.picker-search-area { padding: 15px 20px; background: white; }
.search-box-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.search-box-wrapper i { position: absolute; left: 15px; color: #94a3b8; }
.search-box-wrapper input {
    width: 100%;
    padding: 12px 12px 12px 45px;
    border-radius: 14px;
    border: 1.5px solid #6a6a6a;
    background: #f8fafc;
    outline: none;
    font-weight: 600;
}

/* --- List Item Style --- */
.picker-item {
    background: white;
    padding: 15px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.picker-item:active { background: #f1f5f9; }

.call-type-tag {
    font-size: 0.65rem;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 800;
    text-transform: uppercase;
}
.type-missed { background: #fee2e2; color: #ef4444; }
.type-incoming { background: #dcfce7; color: #10b981; }

.fab-add-contact {
    position: fixed;
    bottom: 30px;
    right: 25px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--factory-primary);
    color: white;
    border: none;
    font-size: 1.5rem;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

/* Back Button in Picker Header */
.picker-header .back-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
}

/* FAB positioning fix - Only visible inside Picker */
.fab-add-contact {
    position: absolute; /* Changed from fixed to absolute within overlay */
    bottom: 30px;
    right: 25px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--factory-primary);
    color: white;
    border: none;
    font-size: 1.5rem;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
    z-index: 10001;
}

.hidden { display: none !important; }


/* --- Premium Small Add Bill Button for Contact List --- */
.add-bill-btn-small {
    background: var(--theme-accent, #eff6ff) !important; 
    color: var(--theme-primary, var(--factory-primary)) !important; 
    border: 1px solid var(--theme-soft-border, #dbeafe) !important;
    padding: 8px 14px !important; 
    border-radius: 12px !important; 
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
}

/* Modern interactive states */
.add-bill-btn-small:hover {
    background: var(--theme-primary, var(--factory-primary)) !important;
    color: #ffffff !important;
    border-color: var(--theme-primary, var(--factory-primary)) !important;
}

.add-bill-btn-small:active {
    transform: scale(0.92);
}

.add-bill-btn-small i {
    font-size: 0.8rem;
}

/* --- PREMIUM ANIMATED SEARCH BAR --- */
.premium-search-wrapper {
    position: relative;
    margin: 10px 20px 20px 20px;
    height: 54px;
    background: #f8fafc;
    border: 2px solid #f1f5f9;
    border-radius: 18px; /* Squircle corners */
    display: flex;
    align-items: center;
    padding: 0 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02) inset;
    overflow: hidden;
}

/* Glow effect when user clicks the search bar */
.premium-search-wrapper:focus-within {
    background: #ffffff;
    border-color: var(--theme-primary, var(--factory-primary));
    box-shadow: 0 0 0 4px var(--theme-accent, rgba(99, 102, 241, 0.15));
}

.premium-search-wrapper .search-icon {
    color: #94a3b8;
    font-size: 1.1rem;
    z-index: 3;
    transition: color 0.3s ease;
}

.premium-search-wrapper:focus-within .search-icon {
    color: var(--theme-primary, var(--factory-primary));
}

/* The actual input - made transparent to show animation behind it */
.premium-search-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding-left: 45px; /* Space for the icon */
    padding-right: 15px;
    background: transparent;
    border: none;
    outline: none;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    z-index: 2; /* Sits above the animation */
}

/* The Animated Placeholder Layer */
.animated-placeholder {
    position: absolute;
    left: 45px; 
    top: 50%; /* FIX: Perfectly centers the text vertically */
    transform: translateY(-50%); /* FIX: Perfectly centers the text vertically */
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: none; 
    z-index: 1;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* FIX: Pure CSS way to hide animation when user clicks or types! */
.premium-search-input:focus ~ .animated-placeholder,
.premium-search-input:not(:placeholder-shown) ~ .animated-placeholder {
    opacity: 0;
    transform: translateY(-65%); /* Slides up smoothly when disappearing */
}

.static-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #94a3b8;
}

/* The window that hides the overflow */
.word-scroller {
    height: 1.2rem;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: flex-start;
}

/* NEW: The slider that holds the words, stacks them vertically, and applies the animation */
.word-slider {
    display: flex;
    flex-direction: column;
    animation: rollWords 8s infinite ease-in-out;
}

.word {
    height: 1.2rem;
    line-height: 1.2rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--theme-primary, var(--factory-primary)); 
    white-space: nowrap; /* Ensures words stay on a single line */
}

/* Keyframes for sliding 4 words */
@keyframes rollWords {
    0%, 20% { transform: translateY(0); }
    25%, 45% { transform: translateY(-25%); }
    50%, 70% { transform: translateY(-50%); }
    75%, 95% { transform: translateY(-75%); }
    100% { transform: translateY(0); }
}

/* --- PREMIUM TOAST & GLOBAL ALERTS --- */
.premium-toast {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    color: #1e293b;
    padding: 14px 24px;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 12px;
    z-index: 10000;
    transition: top 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #f1f5f9;
}
.premium-toast.show { top: 30px; }
.toast-success i { color: #10b981; font-size: 1.3rem; }
.toast-error i { color: #ef4444; font-size: 1.3rem; }