:root {
    --ritchies-blue: #005B9A;
    --ritchies-blue-dark: #003D6B;
    --ritchies-yellow: #FFD600;
    --ritchies-yellow-dark: #E6C200;
    --navy-blue: #1B5E7E;
    --teal-button: #0E7490;
    --teal-button-hover: #0C5F75;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #F9FAFB;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Loading Spinner Animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Header */
.main-header {
    background: white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 10;
}

.container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

.logo-section {
    display: flex;
    align-items: center;
}

.logo-section a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    /*cursor: default;*/
    /*pointer-events: none;*/
    display:inline-block; 
    cursor:pointer; 
}

.authenticated .logo-section a {
    cursor: pointer;
    pointer-events: auto;
}

.logo {
    height: 2.5rem;
    width: auto;
}

.logo-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
}

.main-nav {
    display: none;
    gap: 0.5rem;
    align-items: center;
}

@media (min-width: 768px) {
    .main-nav {
        display: flex;
    }
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 0.25rem;
}

.nav-link:hover {
    color: var(--ritchies-blue);
    background: #F3F4F6;
}

.nav-link.active {
    color: var(--ritchies-blue);
    background: #EFF6FF;
}

.dropdown-icon {
    transition: transform 0.2s;
}

.nav-item:hover .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 12rem;
    background: white;
    border-radius: 0.375rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    margin-top: 0;
    padding: 0.5rem 0;
    padding-top: 0.75rem;
    z-index: 50;
}

.nav-item:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: #F3F4F6;
    color: var(--ritchies-blue);
}

.dropdown-item.active {
    color: var(--ritchies-blue);
    background: #EFF6FF;
    font-weight: 500;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    font-size: 0.875rem;
    color: #374151;
}

.btn-logout {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ritchies-blue);
    background: white;
    border: 1px solid var(--ritchies-blue);
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: var(--ritchies-blue);
    color: white;
}

/* Hide navigation for anonymous users */
.main-nav,
.user-section {
    display: none;
}

.authenticated .main-nav {
    display: none;
}

@media (min-width: 768px) {
    .authenticated .main-nav {
        display: flex;
    }
}

.authenticated .user-section {
    display: flex;
}

/* Main Layout */
.main-wrapper {
    flex: 1;
}

.content-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: #6B7280;
    margin-bottom: 1.5rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 0.375rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    background: #0d5a8f;
    margin: -1.5rem -1.5rem 1rem -1.5rem;
    padding: 1rem 1.5rem;
    border-radius: 0.375rem 0.375rem 0 0;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #D1D5DB;
    border-radius: 0.25rem;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--ritchies-blue);
    box-shadow: 0 0 0 3px rgba(0, 91, 154, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9CA3AF;
}

/* Full width form group for textarea */
.form-group-full {
    grid-column: 1 / -1;
}

/* Buttons */
.btn {
    padding: 0.625rem 1.25rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: #0d5a8f;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #0a4670;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: white;
    color: #374151;
    border: 1px solid #D1D5DB;
}

.btn-secondary:hover {
    background: #F9FAFB;
}

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

/* Footer */
.main-footer {
    background: #F3F4F6;
    border-top: 1px solid #E5E7EB;
    margin-top: auto;
}

.main-footer .container {
    padding: 1.5rem 1rem;
    text-align: center;
}

.main-footer p {
    margin: 0.25rem 0;
    font-size: 0.875rem;
    color: #6B7280;
}

.footer-subtitle {
    font-size: 0.75rem;
    color: #9CA3AF;
}

/* Alert/Notice Box */
.alert-info {
    background: #EFF6FF;
    border-left: 4px solid var(--ritchies-blue);
    padding: 1rem;
    border-radius: 0.25rem;
    margin-bottom: 1.5rem;
}

.alert-info p {
    margin: 0;
    color: #1E40AF;
    font-size: 0.875rem;
}

/* Note Styles */
.note-title {
    font-size: 0.80rem;
    font-weight: 400;
    margin: 0.5rem 0 0.25rem;
    font-style: italic;
    color: #555;
}

.note-text {
    font-size: 0.70rem;
    font-weight: 300;
    color: #555;
    font-style: italic;
    margin: 0 0 1rem;
}

.hidden {
    display: none !important;
}

/* Hide everything except header until JavaScript confirms it's safe to show */
body:not(.js-ready) main,
body:not(.js-ready) .content-container {
    display: none !important;
}

body.js-ready main,
body.js-ready .content-container {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}