/* Buttons */
.btn-primary {
    background-color: var(--accent);
    color: var(--on-accent);
    border: none;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.btn-secondary {
    background-color: var(--card-bg);
    color: var(--accent-text);
    border: 1px solid var(--accent);
    padding: 0.6rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: var(--accent);
    color: var(--on-accent);
}

.btn-primary-small {
    background-color: var(--accent);
    color: var(--on-accent);
    border: none;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary-small:hover {
    background-color: var(--accent-hover);
}

.btn-share {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: all 0.2s;
    padding: 0 1rem;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.9rem;
}

.btn-share:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.btn-share svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.theme-toggle {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    height: 40px;
    width: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: all 0.2s;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.dark-icon {
    display: none;
}
.dark-theme .light-icon {
    display: none;
}
.dark-theme .dark-icon {
    display: block;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--modal-overlay);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 20px;
    width: 90%;
    max-width: 550px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
}

.close-btn {
    background: var(--line-color);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-btn:hover {
    background: var(--accent);
    color: var(--on-accent);
}

/* Forms */
.form-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow);
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.form-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

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

.flex-1 {
    flex: 1;
}

label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--card-border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--input-bg);
    color: var(--text-primary);
    transition: all 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--card-bg);
    box-shadow: var(--focus-ring);
}

/* Badges */
.status-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-assigned {
    background: #dcfce7;
    color: #166534;
}

.dark-theme .status-assigned {
    background: #064e3b;
    color: #34d399;
}

.status-unassigned {
    background: var(--line-color);
    color: var(--text-secondary);
}

.status-invited {
    background: #e0f2fe;
    color: #0369a1;
}

.status-confirmed {
    background: #dcfce7;
    color: #166534;
}

.status-declined {
    background: #fee2e2;
    color: #991b1b;
}

.status-maybe {
    background: #fef3c7;
    color: #92400e;
}

/* Loading */
.loading,
.loading-small {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.loading-small {
    padding: 1rem;
    font-size: 0.85rem;
}

.no-data {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* --- Activity image upload & gallery --- */
.image-url-input {
    margin-bottom: 0.5rem;
}

.upload-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.upload-container [hidden] {
    display: none !important;
}

.upload-actions {
    display: flex;
    gap: 0.5rem;
}

.upload-btn {
    flex: 1;
    cursor: pointer;
    text-align: center;
    padding: 0.5rem;
}

label.upload-btn {
    border-style: dashed;
}

.gallery-container {
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0.75rem;
    background: var(--bg-color);
    max-height: 200px;
    overflow-y: auto;
}

.gallery-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.gallery-item {
    width: 100%;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
}

.gallery-item:hover {
    border-color: var(--accent);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.upload-preview {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--card-border);
}

.upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-img-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
}

.upload-status {
    font-size: 0.8rem;
    text-align: center;
    color: var(--text-secondary);
}
