:root {
    --color-primary: #B7FF4A;
    --color-primary-hover: #A6E63F;
    --color-secondary: #2374AB;
    --color-secondary-hover: #1f5f8e;
    --color-destroy: #e85d5d;
    --color-destroy-hover: #d14d4d;

    --color-secondary-links: #4a5568;
    --color-back-button: #e0e0e0;
    --color-back-button-hover: #ccc;

    /* Modern design system colors */
    --color-border: #e2e8f0;
    --color-bg-light: #f8fafc;
    --color-bg-subtle: #fafbfc;
    --color-text-dark: #1a202c;
    --color-text-medium: #64748b;
    --color-text-light: #94a3b8;

    /* Badge colors */
    --color-badge-blue-bg: #dbeafe;
    --color-badge-blue-text: #1e40af;
    --color-badge-purple-bg: #e0e7ff;
    --color-badge-purple-text: #4338ca;
    --color-badge-green-bg: #d1fae5;
    --color-badge-green-text: #065f46;
    --color-badge-gray-bg: #f1f5f9;
    --color-badge-gray-text: #64748b;

    /* Spacing system (based on 4px) */
    --spacing-xs: 0.25rem;   /* 4px */
    --spacing-sm: 0.5rem;    /* 8px */
    --spacing-md: 0.75rem;   /* 12px */
    --spacing-base: 1rem;    /* 16px */
    --spacing-lg: 1.25rem;   /* 20px */
    --spacing-xl: 1.5rem;    /* 24px */
    --spacing-2xl: 2rem;     /* 32px */
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Gotham', sans-serif;
    font-weight: 400;
    margin: 0;
}

h1, h2, h3, h4, h5, h6,
button, input, select, textarea {
    font-family: inherit;
}

/*
 *
 * Button styles for the primary look & feel.
 *
 */

/* Base button style */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 10px 16px;
    font-size: 1rem;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s ease-in-out;
    font-weight: 500;
    box-sizing: border-box;
    max-width: 100%;
}

/* Button sizes (work with any color variant) */
.button.small {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.button.tiny {
    padding: 4px 8px;
    font-size: 0.75rem;
}

/* Primary button: Blue */
.button.primary {
    background-color: var(--color-secondary);
    color: white;
}

.button.primary:hover {
    background-color: var(--color-secondary-hover);
}

/* Secondary button: Blue */
.button.secondary {
    background-color: var(--color-secondary);
    color: white;
}

.button.secondary:hover {
    background-color: var(--color-secondary-hover);
}

.button.secondary.small {
    background-color: var(--color-secondary);
    color: white;
    padding: 6px 12px;
    font-size: 0.8rem;
}

.button.secondary.tiny {
    background-color: var(--color-secondary);
    color: white;
    padding: 4px 6px;
    font-size: 0.75rem;
}

/* Destroy button: Soft Red */
.button.destroy {
    background-color: var(--color-destroy);
    color: white;
}

/* Destroy button: Soft Red */
.button.destroy.semi-small {
    background-color: var(--color-destroy);
    color: white;
    padding: 6px 12px;
    font-size: 0.8rem;
}

.button.destroy.small {
    background-color: var(--color-destroy);
    color: white;
    padding: 6px 12px;
    font-size: 0.8rem;
}

.button.destroy.tiny {
    background-color: var(--color-destroy);
    color: white;
    padding: 4px 6px;
    font-size: 0.75rem;
}

/* Destroy button: Soft Red */
.button.destroy {
    background-color: var(--color-destroy);
    color: white;
}

.button.destroy:hover {
    background-color: var(--color-destroy-hover);
}

.button.back {
    background-color: var(--color-back-button);
    color: #333;
    margin-bottom: 20px;
    padding: 8px 12px;
}

/* Back button (standalone class) */
.back-button {
    display: inline-block;
    margin-bottom: 20px;
    padding: 8px 12px;
    background-color: var(--color-back-button);
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.back-button:hover {
    background-color: var(--color-back-button-hover);
}

/*
 *
 * Card box style for views that are "one-off" (e.g. change climber, change password)
 *
 */


.card {
    max-width: 600px;
    margin: 2rem auto;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.5rem 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card-small {
    max-width: 400px;
    margin: 2rem auto;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/*
 * Modern card styles - new design system
 */

.card-modern {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: var(--spacing-xl);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: var(--spacing-xl);
}

.card-modern-compact {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.boxed {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: var(--spacing-2xl);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.06);
}

@media (max-width: 768px) {
    .card-modern {
        padding: var(--spacing-lg);
    }

    .boxed {
        padding: var(--spacing-lg);
        border-radius: 8px;
    }
}

/*
 * Unity Boulder Logo
 */
.ub-logo {
    max-height: 60px;
}

.under-development {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    text-align: center;
}

.unityLink {
    color: #2374ab;
    text-decoration: none;
    font-weight: 600;
}

/*
 * Alerts
 */

.validation-alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.validation-alert-danger {
    background-color: #fee;
    border: 1px solid var(--color-destroy);
    color: #991b1b;
}

.validation-alert-info {
    background-color: #eff6ff;
    border: 1px solid #3b82f6;
    color: #1e40af;
}

/*
 *
 * Form styles
 *
 */
@font-face {
    font-family: 'Gotham';
    src: url('/fonts/gotham/gotham-rounded-medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Gotham';
    src: url('/fonts/gotham/gotham-rounded-bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Gotham';
    src: url('/fonts/gotham/gotham-rounded-book.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Gotham';
    src: url('/fonts/gotham/gotham-rounded-book-italic.otf') format('opentype');
    font-weight: 400;
    font-style: italic;
}

/*
 *
 * Modern Design System Components
 *
 */

/* List Items */
.list-item-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(to right, var(--color-bg-subtle) 0%, #ffffff 100%);
}

.list-item-modern:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .list-item-modern {
        padding: 0.75rem 0.875rem;
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }
}

/* Badges */
.badge-info {
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 500;
}

.badge-blue {
    background: var(--color-badge-blue-bg);
    color: var(--color-badge-blue-text);
}

.badge-purple {
    background: var(--color-badge-purple-bg);
    color: var(--color-badge-purple-text);
}

.badge-green {
    background: var(--color-badge-green-bg);
    color: var(--color-badge-green-text);
}

.badge-gray {
    background: var(--color-badge-gray-bg);
    color: var(--color-badge-gray-text);
}

.badge-small {
    font-size: 0.6875rem;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    font-weight: 500;
    display: inline-block;
}

/* Section Headers */
.section-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-base);
    border-bottom: 2px solid var(--color-border);
}

.section-header-modern h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text-dark);
    letter-spacing: -0.025em;
}

@media (max-width: 768px) {
    .section-header-modern {
        margin-bottom: var(--spacing-base);
        padding-bottom: var(--spacing-md);
    }

    .section-header-modern h3 {
        font-size: 1rem;
    }
}

/* Forms */
.form-modern {
    padding: var(--spacing-base);
    background: var(--color-bg-light);
    border-radius: 8px;
    border: 1px solid var(--color-border);
    margin-bottom: var(--spacing-lg);
    box-sizing: border-box;
}

form {
    max-width: 100%;
}

input, select, textarea {
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .form-modern {
        padding: 0.875rem;
        margin-bottom: var(--spacing-base);
    }
}

/* Icon Buttons */
.button-icon {
    background: var(--color-secondary);
    color: white;
    border: none;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
    flex-shrink: 0;
}

.button-icon.small {
    width: 32px;
    height: 32px;
    min-width: 32px;
}

.button-icon.danger {
    background: var(--color-destroy);
}

.button-icon i {
    font-size: 0.875rem;
}

.button-icon.small i {
    font-size: 0.8125rem;
}

/* Empty States */
.empty-state-modern {
    text-align: center;
    color: var(--color-text-light);
    padding: 2.5rem 1rem;
    font-style: italic;
    background: var(--color-bg-light);
    border-radius: 8px;
    font-size: 0.9375rem;
}

@media (max-width: 768px) {
    .empty-state-modern {
        padding: 2rem 1rem;
        font-size: 0.875rem;
    }
}

/* Typography Helpers */
.text-dark {
    color: var(--color-text-dark);
}

.text-medium {
    color: var(--color-text-medium);
}

.text-light {
    color: var(--color-text-light);
}

.text-small {
    font-size: 0.8125rem;
}

.text-tiny {
    font-size: 0.75rem;
}

/* Utility Classes */
.gradient-bg {
    background: linear-gradient(to right, var(--color-bg-subtle) 0%, #ffffff 100%);
}

.shadow-sm {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.shadow-md {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Form Note */
.ub-note {
    font-size: 0.875rem;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin: 0;
}

.ub-note i {
    margin-right: 0.5rem;
    color: #3b82f6;
}

/* Responsive content container */
.content-container {
    padding: 20px;
}

@media (max-width: 768px) {
    .content-container {
        padding: 16px 12px;
    }

    .section-header-modern {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }

    .card {
        padding: 1.25rem 1rem;
        margin: 1rem auto;
    }

    .card-small {
        padding: 1rem;
        margin: 1rem auto;
    }
}

/* Responsive table wrapper for horizontal scroll on mobile */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Mobile button labels — hidden on desktop (tooltips suffice), visible on mobile */
.btn-label {
    display: none;
}

@media (max-width: 768px) {
    .btn-label {
        display: inline;
    }
}
