/* ----------------------------------------------------
   ELLA RISES — GLOBAL BRAND STYLING
---------------------------------------------------- */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Montserrat:wght@300;400;500;600;700&display=swap');

/* ----------------------------------------------------
   ROOT VARIABLES (BRAND COLORS)
---------------------------------------------------- */
body {
    margin: 0;
    padding: 0;
    width: 100%;
}

:root {
    --blue: #99B7C6;
    --lavender: #978EC4;
    --offwhite: #F9F5EA;
    --pink-light: #FFDBD1;
    --pink-mid: #F9AFB1;
    --sage: #9AB59D;
    --charcoal: #3A3F3B;
    --coral: #F4B092;
    --berry: #CE325B;

    --font-serif: 'DM Serif Display', serif;
    --font-body: 'Montserrat', sans-serif;
}

/* ----------------------------------------------------
   GLOBAL RESET
---------------------------------------------------- */
body {
    background: var(--offwhite) !important;
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    color: var(--charcoal);
}

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    color: var(--charcoal);
}

/* Remove bootstrap primary color defaults */
.text-primary,
.bg-primary,
.border-primary {
    color: var(--berry) !important;
    background-color: var(--pink-light) !important;
    border-color: var(--berry) !important;
}

/* ----------------------------------------------------
   LINKS
---------------------------------------------------- */
a {
    color: var(--lavender) !important;
    font-weight: 500;
}
a:hover {
    color: var(--berry) !important;
    text-decoration: underline;
}

/* ----------------------------------------------------
   NAVIGATION
---------------------------------------------------- */
.navbar {
    background-color: var(--pink-light);
    padding: 0.8rem 2rem;
    border-bottom: 3px solid var(--pink-mid);

    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

/* Left section (logo + links) */
.nav-left {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

/* Navigation links */
.nav-left a {
    font-weight: 600;
    color: var(--charcoal);
    text-decoration: none;
    transition: color 0.2s ease;
}
.nav-left a:hover {
    color: var(--berry);
}

/* Logo */
.logo {
    height: 90px;
    margin-right: 1rem;
}

/* Right side: welcome + logout */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.welcome {
    font-weight: 600;
    color: var(--charcoal);
}

/* Logout button */
.logout-btn {
    background: var(--sage);
    padding: 0.5rem 1.1rem;
    border-radius: 8px;
    color: white !important;
    font-weight: 600;
    text-decoration: none;
}
.logout-btn:hover {
    background: #829f84;
}

/* Responsive nav */
@media (max-width: 900px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .nav-left {
        flex-wrap: wrap;
    }
}

/* ----------------------------------------------------
   BUTTONS — BRAND OVERRIDES
---------------------------------------------------- */

.btn,
button {
    font-weight: 600 !important;
    border-radius: 8px !important;
    padding: 0.6rem 1.2rem !important;
    border: none !important;
    font-family: var(--font-body);
}

/* Pink Primary Button */
.btn-primary,
.btn-primary:hover,
.btn-primary:active,
.btn-primary:focus {
    background-color: var(--berry) !important;
    border-color: var(--berry) !important;
    color: white !important;
}

/* Secondary Sage Button */
.btn-secondary {
    background-color: var(--sage) !important;
    color: white !important;
}

/* Light Button */
.btn-light {
    background: var(--pink-light) !important;
    color: var(--charcoal) !important;
}

/* Danger Button (for deletes, if used) */
.btn-danger {
    background: #f25c5c !important;
    color: #ffffff !important;
}

/* Smaller button variant (used outside tables if needed) */
.btn-small {
    font-size: 0.9rem !important;
    padding: 0.35rem 0.9rem !important;
}

/* ----------------------------------------------------
   FORMS
---------------------------------------------------- */
label {
    font-weight: 600;
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--blue) !important;
    background: white !important;
    font-family: var(--font-body);
}

input:focus, select:focus, textarea:focus {
    outline: none !important;
    border-color: var(--lavender) !important;
    box-shadow: 0 0 4px rgba(151, 142, 196, 0.5) !important;
}

/* Remove Chrome autofill blue */
input:-webkit-autofill {
    box-shadow: 0 0 0px 1000px white inset !important;
}

/* ----------------------------------------------------
   CARDS
---------------------------------------------------- */
.card {
    background: white !important;
    border-radius: 12px !important;
    padding: 1.5rem !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    margin: 1rem 0 !important;
    width: 100% !important;
    overflow-x: auto !important; /* allows wide tables */
}

/* ----------------------------------------------------
   TABLES (GLOBAL)
---------------------------------------------------- */
table {
    width: 100% !important;
    border-collapse: collapse !important;
}

/* Default table head */
table thead {
    background-color: var(--pink-light) !important;
}

/* ----------------------------------------------------
   STYLED TABLES (APP MAIN TABLES)
---------------------------------------------------- */
.styled-table {
    width: 100%;
    border-collapse: collapse;
}

.styled-table thead {
    background-color: var(--pink-light);
}

.styled-table tbody tr:hover {
    background: var(--pink-light) !important;
}

/* Compact, single-line rows */
.styled-table th,
.styled-table td {
    padding: 0.6rem 0.75rem !important;
    border-bottom: 1px solid #ddd !important;
    vertical-align: middle !important;
    white-space: nowrap; /* single-line cells by default */
    font-size: 0.95rem;
}

/* Allow wrapping in non-action, non-NPS cells when needed */
.styled-table td.allow-wrap {
    white-space: normal !important;
    word-break: break-word;
}

/* ----------------------------------------------------
   ACTIONS COLUMN
---------------------------------------------------- */
.actions-column {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start;
    gap: 0.5rem !important;
    white-space: nowrap !important;
}

.actions-column form {
    margin: 0 !important;
}

/* Standardize all buttons inside tables */
.styled-table .btn,
.styled-table .btn-small {
    height: 28px !important;
    padding: 0 12px !important;
    font-size: 0.85rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

/* ----------------------------------------------------
   SECTION HEADERS & PAGE HEADER
---------------------------------------------------- */
.section-header {
    font-family: var(--font-serif);
    font-size: 2rem;
    border-left: 6px solid var(--lavender);
    padding-left: 1rem;
}



.add-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 8px;
}

/* ----------------------------------------------------
   FOOTER
---------------------------------------------------- */
.footer {
    /* The Breakout Code */
    width: 100vw;                   /* Force width to be 100% of the Viewport Width */
    margin-left: calc(50% - 50vw);  /* Pull the left side to the edge */
    margin-right: calc(50% - 50vw); /* Pull the right side to the edge */
    
    /* Your existing styles */
    margin-top: 2rem;
    background: var(--charcoal) !important;
    color: white !important;
    padding: 1.5rem;
    text-align: center;
}



/* ----------------------------------------------------
   LOGIN PAGE
---------------------------------------------------- */
body.login-bg {
    background: linear-gradient(135deg, var(--pink-light), var(--lavender)) !important;
}

.login-background {
    background: linear-gradient(135deg, var(--pink-light), var(--lavender)) !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: #ffffff !important;
    border-radius: 1rem !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important;
    padding: 2.5rem !important;
}

.login-title {
    font-family: var(--font-serif);
    font-size: 1.7rem;
    color: var(--charcoal);
}

.page-container {
    padding: 2rem;
    display: flex;
    justify-content: center;
}

.login-card form,
.login-card .form-group,
.login-card input {
    width: 100%;
    box-sizing: border-box;
}

/* ----------------------------------------------------
   HERO CARD (HOME)
---------------------------------------------------- */
.hero-card {
    max-width: 650px;
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    text-align: center;
}

.hero-card h1 {
    font-family: var(--font-serif);
    font-size: 2.4rem;
    color: var(--charcoal);
}

.subtitle {
    color: var(--lavender);
    font-size: 1.1rem;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

.user-info {
    margin-bottom: 2rem;
    color: var(--charcoal);
}

/* ----------------------------------------------------
   MODAL
---------------------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.modal-content {
    background: white;
    padding: 20px;
    width: 450px;
    max-width: 90%;
    border-radius: 10px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

/* ----------------------------------------------------
   NPS DOTS (SURVEYS)
---------------------------------------------------- */
.nps-cell {
    text-align: center;
}

.nps-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.nps-promoter {
    background-color: #4CAF50;  /* green */
}

.nps-passive {
    background-color: #FFC107;  /* yellow */
}

.nps-detractor {
    background-color: #F44336;  /* red */
}

.nps-none {
    color: #666;
    font-size: 0.9rem;
}

.nps-legend {
    margin-top: 0.75rem;
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
}

.nps-legend span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ----------------------------------------------------
   MISC UTILS
---------------------------------------------------- */
.button-right {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* Tableau embeds */
.tableau-container {
    padding: 1rem;
    overflow-x: auto;
}

/* ----------------------------------------------------
   PROGRAMS SECTION (HOME)
---------------------------------------------------- */
.programs {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1.5rem;
}

.program {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.program:nth-child(even) {
    flex-direction: row-reverse; /* alternate sides for variety */
}

.program-image {
    width: 260px;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.program-image.tall {
    width: 220px;
}

.program-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.program-content p {
    margin: 0;
    line-height: 1.5;
}

/* Stack on small screens */
@media (max-width: 768px) {
    .program {
        flex-direction: column;
    }
    .program:nth-child(even) {
        flex-direction: column;
    }
    .program-image {
        width: 100%;
        max-width: 400px;
    }
}

/* UNIVERSAL FIX: Page title + Add button always under logo, left aligned */
.page-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;   /* Keep both on the left */
    gap: 1.5rem;                   /* Space between title and button */
    margin: 1.5rem 0 1rem 0;       /* Space UNDER nav bar */
    flex-wrap: nowrap;             /* Never wrap title/button */
}

.page-header h1,
.page-header .add-btn {
    white-space: nowrap;
}

.search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.search-bar input {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #ccc;
    width: 220px;
}

.nav-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.6rem;
}

.btn-create-account {
    opacity: 0.95;
}



/* Make sure add buttons aren’t squished */
.add-btn {
    /* keep any existing styles you already had */
    white-space: nowrap;
}

.search-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;   /* 👈 prevents the buttons from dropping to the next line */
}
