/* ============================================================
   SHARED APP-PAGE COMPONENTS
   Extracted from inline <style> blocks across app pages.
   Include after style.css, before page-specific inline styles.
   ============================================================ */

/* ── A. Cosmic Background ────────────────────────────────── */
.cosmic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(157, 78, 221, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(67, 97, 238, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(46, 196, 182, 0.1) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* ── B. Navbar — App variant (solid bg) ──────────────────── */
.navbar {
    background-color: #12121A;
    border-bottom: 1px solid #1A1A24;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding-top: env(safe-area-inset-top, 1rem);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: #FFFFFF;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    color: #9D4EDD;
    font-size: 1.5rem;
}

.logo-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-icons {
    display: flex;
    gap: 1.5rem;
}

.nav-icon {
    color: #8B8B9E;
    cursor: pointer;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.nav-icon:hover {
    color: #9D4EDD;
}

.nav-icon svg {
    width: 24px;
    height: 24px;
}

/* ── C. Container + Page Header ──────────────────────────── */
.container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #8B8B9E;
}

/* ── D. Buttons ──────────────────────────────────────────── */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #9D4EDD;
    color: #0A0A0F;
}

.btn-primary:hover {
    background-color: rgba(157, 78, 221, 0.9);
}

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

.btn-secondary {
    background-color: transparent;
    border: 1px solid #1A1A24;
    color: #FFFFFF;
}

.btn-secondary:hover {
    border-color: #9D4EDD;
    color: #9D4EDD;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-link {
    background: none;
    border: none;
    padding: 0;
    color: #9D4EDD;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
}

.btn-link:hover {
    text-decoration: underline;
}

/* ── E. Forms ────────────────────────────────────────────── */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: #FFFFFF;
}

textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem;
    background-color: #1A1A24;
    border: 1px solid #1A1A24;
    border-radius: 6px;
    color: #FFFFFF;
    font-family: inherit;
    resize: vertical;
}

textarea:focus {
    outline: none;
    border-color: #9D4EDD;
    box-shadow: 0 0 0 3px rgba(157, 78, 221, 0.1);
}

/* ── F. Spinner + Keyframes ──────────────────────────────── */
.spinner {
    display: inline-block;
    width: 36px;
    height: 36px;
    border: 3px solid rgba(157, 78, 221, 0.3);
    border-radius: 50%;
    border-top-color: #9D4EDD;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── G. Modal ────────────────────────────────────────────── */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

/* Support both activation classes */
.modal.active,
.modal.show {
    display: flex;
}

.modal-content {
    background-color: #12121A;
    border: 1px solid #1A1A24;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Support both close-button naming conventions */
.close-modal,
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #8B8B9E;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover,
.modal-close:hover {
    color: #FFFFFF;
}

/* ── H. Empty State (+ .empty-panel alias) ───────────────── */
.empty-state,
.empty-panel {
    text-align: center;
    padding: 3rem 2rem;
    background-color: #12121A;
    border: 1px dashed #1A1A24;
    border-radius: 12px;
}

.empty-icon,
.empty-panel-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3,
.empty-panel h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.empty-state p,
.empty-panel p {
    color: #8B8B9E;
    margin-bottom: 1.5rem;
}

.empty-state .btn,
.empty-panel .btn {
    display: inline-block;
}

/* ── I. Status Badges ────────────────────────────────────── */
.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-pending {
    background-color: rgba(255, 215, 0, 0.15);
    color: #FFD700;
}

.status-confirmed {
    background-color: rgba(46, 196, 182, 0.15);
    color: #2EC4B6;
}

.status-in-progress {
    background-color: rgba(157, 78, 221, 0.15);
    color: #9D4EDD;
}

.status-completed {
    background-color: rgba(74, 74, 92, 0.15);
    color: #4A4A5C;
}

.status-cancelled {
    background-color: rgba(247, 37, 133, 0.15);
    color: #F72585;
}

/* ── J. Loading helper ───────────────────────────────────── */
.loading {
    text-align: center;
    padding: 2rem;
    color: #8B8B9E;
}
