:root {
    --background-ivory: #fdfdf5;
    --card-background: #ffffff;
    --text-primary: #333333;
    --text-secondary: #555555;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --font-family: 'Raleway', sans-serif;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(170deg, var(--background-ivory) 0%, #f7f7f0 100%);
    color: var(--text-primary);
    margin: 0;
    padding: 2rem 1rem;
    text-align: center;
    min-height: 100vh;
}

.logo {
    max-width: 150px;
    margin-bottom: 1rem;
}

header h1 {
    font-weight: 300;
    font-size: 2.5rem;
    margin: 0;
}

header p {
    font-weight: 400;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

#stylist-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
    margin: 3rem auto 0;
    padding: 0 1rem;
}

.stylist-tile {
    background-color: var(--card-background);
    border-radius: 12px;
    padding: 2rem 1rem;
    box-shadow: 0 4px 15px var(--shadow-color);
    cursor: pointer;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    border: 1px solid rgba(0,0,0,0.05);
}

.stylist-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-color);
}

.stylist-tile h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 500;
}

.stylist-tile p {
    margin: 0.25rem 0 0;
    color: var(--text-secondary);
    font-weight: 400;
}

.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: var(--text-primary);
    margin: 2rem auto;
    animation: spin 1s ease infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.appointment-list {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.appointment-card {
    background-color: var(--card-background);
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--shadow-color);
    border: 1px solid rgba(0,0,0,0.05);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    text-align: left;
}

.appointment-time {
    font-size: 1.2rem;
    font-weight: 500;
    width: 100px;
    color: var(--text-primary);
}

.appointment-details h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
}

.appointment-details p {
    margin: 0.25rem 0 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

footer {
    margin-top: 3rem;
}

footer a {
    color: var(--text-secondary);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

#action-item-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.action-item-slice {
    font-family: var(--font-family);
    font-size: 1.1rem;
    font-weight: 500;
    padding: 1.5rem 2.5rem;
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    color: var(--text-secondary);
    background-color: var(--card-background);
    cursor: pointer;
    position: relative;
    transition: all 0.5s cubic-bezier(0.890, -0.170, 0.140, 1.225);
}

.action-item-slice::after {
    content: '';
    height: 2px;
    width: 0;
    background-color: var(--text-primary); 
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    transition: all 0.5s cubic-bezier(0.890, -0.170, 0.140, 1.225);
}

.action-item-slice .top,
.action-item-slice .bottom {
    position: relative;
    height: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(1.000, -0.055, 0.025, 1.040);
    transition-delay: 0.25s; 
}

.action-item-slice .top { top: 0; }
.action-item-slice .bottom { bottom: 0; }
.action-item-slice .bottom span { position: absolute; top: -12px; left: 0; width: 100%; }

.action-item-slice.active {
    color: white;
    border-color: #34D393;
    background-color: #34D399;
}

.action-item-slice.active::after {
    width: 100%;
}

.action-item-slice.active .top { top: -8px; transition-delay: 0s; }
.action-item-slice.active .bottom { bottom: -8px; transition-delay: 0s; }

#mark-complete-btn, .button-container {
    max-width: 600px; margin: 2rem auto; padding: 0 1rem;
}

#mark-complete-btn {
    font-family: var(--font-family); font-size: 1.2rem; font-weight: 500; width: 100%; color: white;
    background-color: var(--text-primary); border: none; border-radius: 12px; padding: 1rem; cursor: pointer;
    transition: background-color 0.2s;
}

#mark-complete-btn:hover { background-color: #000000; }
#mark-complete-btn:disabled { background-color: #555555; cursor: not-allowed; }

.appointment-card.is-complete {
    position: relative;
}

.appointment-card.is-complete::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 1.5rem;
    right: 1.5rem;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.3);
}

.tier-icon {
    position: absolute;
    top: 10px;
    right: 15px;
    width: 24px;
    height: 24px;
}

.appointment-card.tier-gold { color: #D4AF37; }
.appointment-card.tier-silver { color: #C0C0C0; }
.appointment-card.tier-bronze { color: #CD7F32; }
.appointment-card.tier-sad { color: #888888; }

/* === KPI Dial & Goals Page Styles === */

/* --- Dashboard: 1x4 Summary Dials --- */
#kpi-summary-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columns for the 1x4 layout */
    max-width: 600px; /* Adjust max-width for a sleeker look */
    margin: 20px auto;
    padding: 0 10px;
    gap: 10px;
}

.kpi-card-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.kpi-dial-container-summary {
    position: relative;
    width: 70px; /* Smaller dials for the summary view */
    height: 70px;
    margin-bottom: 5px;
}

.kpi-current-value-summary {
    color: #1c1c1e;
    font-size: 1.4em; /* Smaller font for the smaller dial */
    font-weight: 600;
}

/* --- Goals Page: Large, Detailed Dials --- */
#goals-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2x2 grid on mobile */
    gap: 15px;
    padding: 20px 15px;
    max-width: 900px;
    margin: 20px auto;
}

/* Use the original .kpi-card styles for the goals page */
.kpi-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
}

/* --- Shared Styles for ALL Dials --- */
.kpi-dial-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-210deg);
}
.kpi-dial-track, .kpi-dial-progress {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
}
.kpi-dial-track { stroke: #e0e0e0; }
.kpi-dial-progress {
    stroke: url(#gradient-gold);
    transition: stroke-dashoffset 1.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.kpi-value-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.kpi-current-value {
    color: #1c1c1e;
    font-size: 1.8em;
    font-weight: 600;
}
.kpi-label {
    color: #555;
    font-size: 0.7em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}
.kpi-target {
    color: #777;
    font-size: 0.7em;
    margin-top: 2px;
}

/* --- New Text and Button Styles --- */
.appointments-title {
    font-weight: 400;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 2rem;
}
.nav-button-bottom {
    display: block;
    width: 80%;
    max-width: 400px;
    margin: 40px auto 20px; /* More margin on top */
    padding: 15px;
    background-color: var(--text-primary);
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    font-size: 1.1em;
    transition: background-color 0.2s;
}
.nav-button-bottom:hover {
    background-color: #000;
}

/* On wider screens, goals page can also be 4-column */
@media (min-width: 601px) {
    #goals-container {
        grid-template-columns: 1fr 1fr 1fr 1fr;
        max-width: 900px;
    }
}