:root {
    --primary-color: #87996f;
    --secondary-color: #d6b937;
    --background-color: #efefef;
    --text-color: #34495e;
    --card-bg: #ffffff;
    --light-gray: #bdc3c7;
    --highlight-color: #f57660;
    --modal-overlay: rgba(0, 0, 0, 0.6);
    --input-border: #ccc;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    padding-top: 60px; /* Space for fixed header */
}

header {
    background-color: var(--card-bg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    height: 60px;
}

nav .logo {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li a {
    padding: 20px 15px;
    text-decoration: none;
    color: var(--highlight-color);
    font-weight: bold;
}

.page {
    padding: 40px 5%;
}

.page-title {
    text-align: center;
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.card-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.card {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 25px;
    text-align: center;
    flex: 1;
    min-width: 250px;
}

.card h3 {
    color: var(--secondary-color);
    margin-top: 0;
}

.flyer-section {
    text-align: center;
    margin-top: 40px;
    padding: 30px;
    background: var(--card-bg);
    border-radius: 8px;
}

.description-page {
    max-width: 1400px;
    margin: 40px auto;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.profile-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.profile-table thead {
    background-color: var(--primary-color);
    color: white;
}

.profile-table th, .profile-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

.profile-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.profile-table tbody tr:hover {
    background-color: #e9ecef;
}

#email-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-overlay);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

#email-modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-content h2 {
    color: var(--primary-color);
    margin-top: 0;
}

.modal-content input,
.modal-content textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid var(--input-border);
    border-radius: 4px;
    box-sizing: border-box;
}

.btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 15px;
}

.btn:hover {
    background-color: #b99c19; /* Darker shade of secondary */
}

.btn-highlight {
    background-color: var(--highlight-color);
}

.btn-highlight:hover {
    background-color: #d35400; /* Darker shade of highlight */
}

/* Styles moved from inline */
#total-closers, #mastery-count {
    font-size: 2em;
    font-weight: bold;
}

.description-page .page-title {
    font-size: 2em;
}

.btn.cancel-btn {
    background-color: var(--light-gray);
}

.error-message {
    text-align: center;
}

body { font-family: sans-serif; padding: 20px; background-color: #f4f7f9; }
.dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
#team-summary { display: flex; gap: 20px; }
.stat-box { background: white; padding: 15px 30px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); text-align: center; }
.stat-box h3 { margin-top: 0; color: #0056b3; font-size: 1.2em; }
.profile-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.profile-table th, .profile-table td { border: 1px solid #ddd; padding: 10px; text-align: left; font-size: 0.9em; }
.collab-control-panel { background: #fff; padding: 20px; border-radius: 8px; margin-top: 30px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
#product-control-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-top: 20px; }
.control-group { border: 1px solid #e0e0e0; padding: 10px; border-radius: 4px; }
.control-group label { font-weight: bold; display: block; margin-bottom: 5px; color: #333; }
.control-group button { background-color: #4CAF50; color: white; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; transition: background-color 0.3s; }
.control-group button:hover { background-color: #45a049; }
.control-group span { margin-left: 10px; font-style: italic; color: #777; }
#email-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); justify-content: center; align-items: center; }
#email-modal.active { display: flex; }

/* Ensure the overall modal overlay works */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top of everything else */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; 
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity - The grey overlay */
}

/* Ensure the white content box is visible and centered */
.modal-content {
    background-color: #fefefe; /* White background for the box */
    margin: 5% auto; /* 5% from the top and horizontally centered */
    padding: 30px;
    border: 1px solid #888;
    width: 70%; /* Adjust size as needed */
    max-width: 800px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Styling for the content injected by JavaScript */
.detail-section h3, .qualitative-section h3 {
    color: #0056b3;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 5px;
    margin-top: 20px;
}
.summary-box {
    background: #f9f9f9;
    padding: 15px;
    border-left: 5px solid #007bff;
    margin: 10px 0;
}
.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
