/* Color Palette & Fonts */
:root {
    --bg-color: #F8F5F2; /* Off-white from logo */
    --primary-text: #0A2342; /* Dark Blue from logo */
    --accent-color: #B81C2C; /* Red from logo stitches */
    --white: #ffffff;
    --light-gray: #f4f4f4;
    --error-red: #d93025;
    --success-green: #4caf50;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    background-color: var(--bg-color);
    color: var(--primary-text);
}

/* Header & Navigation */
header {
    background-color: var(--bg-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #ddd;
}

.logo img {
    height: 50px;
    cursor: pointer;
}

nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

nav a {
    color: var(--primary-text);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.nav-btn, .nav-btn-primary {
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none; /* For the 'a' tag styled as a button */
    display: inline-block;
}

.nav-btn {
    background-color: var(--light-gray);
    color: var(--primary-text);
}

.nav-btn-primary {
    background-color: var(--accent-color);
    color: var(--white);
}

.cta-button {
    background-color: var(--accent-color);
    color: var(--white);
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
}

/* General Section Styling */
main > section {
    padding: 4rem 2rem;
}

section:not(#dashboard):not(#admin-panel) {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

#dashboard, #admin-panel {
     max-width: 900px;
     margin: 0 auto;
}

.hidden {
    display: none !important;
}

/* Features Section */
.home-logo {
    height: 240px;
    margin-bottom: 1.5rem;
}

.feature-list {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: nowrap;
}

.feature-item {
    flex-basis: 30%;
    display: flex; /* ADDED */
    flex-direction: column; /* ADDED */
    align-items: center; /* ADDED */
}

.feature-item h3 {
    text-align: center;
}

.feature-item p {
    text-align: left; /* Ensures text inside the block is left-aligned */
}


.example-image {
    width: 100%;
    max-width: 972px;
    border: 1px solid #ddd;
    margin-top: 1rem;
}


/* Form Styling */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    margin: 1rem auto 0;
}

.form-input, input[type="email"], input[type="password"], input[type="text"], input[type="url"], input[type="number"] {
    padding: 0.8rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    width: 100%;
}

.error-message {
    color: var(--error-red);
    background-color: #fce8e6;
    border: 1px solid var(--error-red);
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 1rem;
    display: none;
}

/* --- Dashboard & Component Styles --- */
.dashboard-section {
    background-color: var(--white);
    padding: 2rem;
    margin-top: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dashboard-section h3 {
    margin-top: 0;
    color: var(--primary-text);
}

#gc-creds-form, #generate-report-form, #update-name-form, #change-password-form, #generate-token-form {
    margin: 0;
    max-width: none;
    align-items: flex-start;
}

#generate-report-form, #generate-token-form {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
}

#generate-report-form .form-input, #generate-token-form .form-input {
    flex-basis: 100%;
    margin-bottom: 1rem;
}


#update-name-form .cta-button, #change-password-form .cta-button, #generate-token-form .cta-button {
    width: auto;
}


#gc-creds-section.greyed-out #gc-creds-form {
    opacity: 0.5;
    pointer-events: none;
}

#generate-report-btn {
    width: auto;
    align-self: flex-start;
}

.status-message {
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 1rem;
    font-weight: 500;
    display: none;
}

.status-message.success {
    background-color: #e6f4ea;
    border: 1px solid var(--success-green);
    color: #388e3c;
}

.status-message.error {
    background-color: #fce8e6;
    border: 1px solid var(--error-red);
    color: var(--error-red);
}

.status-message.info {
    background-color: #e7f3fe;
    border: 1px solid #2196f3;
    color: #1976d2;
}

/* Progress Bar Styling */
#progress-container {
    margin-top: 1.5rem;
    width: 100%;
}

#progress-bar-container {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

#progress-bar {
    width: 0%;
    height: 20px;
    background-color: var(--accent-color);
    text-align: center;
    line-height: 20px;
    color: white;
    transition: width 0.4s ease;
}

#progress-text {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--primary-text);
}

/* Reports List Styling */
#reports-list {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

#reports-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

#reports-list li:last-child {
    border-bottom: none;
}

#reports-list .cta-button, #reports-list .nav-btn-primary {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    margin-left: 1rem;
    flex-shrink: 0;
}

/* Pricing/Store Section Styling */
#store h2 {
    text-align: center;
}

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

.pricing-table th, .pricing-table td {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.pricing-table thead th {
    background-color: var(--primary-text);
    color: var(--white);
    font-size: 1.2rem;
}

.pricing-table tbody th {
    text-align: left;
    background-color: var(--light-gray);
    font-weight: bold;
}

.pricing-table .price {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-color);
}

.pricing-table .check {
    color: var(--success-green);
    font-size: 1.5rem;
}

.pricing-table .cross {
    color: #ccc;
    font-size: 1.5rem;
}

.pricing-table .coming-soon {
    font-style: italic;
    color: #777;
}

.pricing-table .purchase-btn {
    background-color: var(--accent-color);
    color: var(--white);
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
}

.pricing-table .purchase-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.status-in-progress {
    font-style: italic;
    color: #757575; /* A medium gray color */
}

/* ToS & Admin Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    text-align: left;
}

.modal-content h2 {
    text-align: center;
    margin-top: 0;
}

#accept-tos-btn {
    display: block;
    margin: 2rem auto 0;
}

.tos-content {
    margin-top: 1rem;
}

.tos-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

#edit-user-form label {
    display: block;
    margin-top: 1rem;
    font-weight: 500;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

.modal-actions .cta-button, .modal-actions .nav-btn {
    width: auto;
}


/* Admin Panel Styles */
#user-list-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}

#user-list-table th, #user-list-table td {
    padding: 0.8rem;
    border: 1px solid #ddd;
    text-align: left;
}

#user-list-table th {
    background-color: var(--light-gray);
    font-weight: bold;
}

#user-list-table td {
    font-size: 0.9rem;
}

#user-list-table .edit-user-btn, #user-list-table .delete-user-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    margin-right: 0.5rem;
}

#user-list-table .delete-user-btn {
    background-color: var(--error-red);
    color: var(--white);
}


#user-search-input {
    margin-bottom: 1rem;
}