/* App pages styled to match landing theme */

.app-shell {
    background: var(--cream);
    min-height: 100vh;
}

.app-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 1.5rem 3rem;
}

.app-hero {
    margin-bottom: 1.5rem;
}

.app-hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 0.5rem;
}

.app-hero p {
    color: var(--text-muted);
}

.app-card {
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid rgba(26, 35, 64, 0.08);
    box-shadow: var(--shadow-soft);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.app-grid {
    display: grid;
    gap: 1rem;
}

.app-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.input, textarea.input {
    width: 100%;
    padding: 0.8rem 0.9rem;
    border: 1px solid #d8deeb;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    background: #fff;
}

.app-form-grid {
    display: grid;
    gap: 0.7rem;
}

.app-status {
    font-weight: 600;
}

.app-status-live { color: #047857; }
.app-status-paused { color: #9a3412; }
.app-status-closed { color: #334155; }
.app-status-draft, .app-status-pending_approval { color: #1d4ed8; }

.torah-scroll-wrap {
    overflow-x: auto;
    padding-bottom: 1rem;
}

.torah-scroll {
    min-width: 1180px;
    display: flex;
    gap: 0.8rem;
    padding: 0.7rem 0.2rem 0.9rem;
}

.torah-node {
    width: 260px;
    min-height: 250px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(26, 35, 64, 0.1);
    background: linear-gradient(180deg, #fff 0%, #f8f4eb 100%);
    backdrop-filter: blur(2px);
    padding: 0.95rem;
    transition: var(--transition);
    opacity: 0.65;
    position: relative;
    transform-origin: center bottom;
}

.torah-node[data-state="open"] { opacity: 0.8; }
.torah-node[data-state="locked"] { opacity: 0.9; border-color: #d97706; }
.torah-node[data-state="owned"] {
    opacity: 1;
    border-color: var(--gold);
    box-shadow: 0 6px 22px rgba(198, 167, 94, 0.2);
}

.torah-node.is-selected {
    border-color: var(--navy);
    box-shadow: 0 8px 24px rgba(26, 35, 64, 0.2);
    transform: translateY(-2px);
    opacity: 1;
}

.torah-node-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.6rem;
}

.torah-select-btn {
    border: 1px solid rgba(26, 35, 64, 0.24);
    background: #fff;
    color: var(--navy);
    border-radius: 999px;
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.torah-select-btn.selected {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}

.torah-select-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.section-select {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.torah-node h3 {
    font-size: 1.95rem;
    margin-bottom: 0.2rem;
}

.torah-meta {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.torah-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.25rem 0.55rem;
    font-size: 0.74rem;
    font-weight: 600;
    margin-right: 0.3rem;
    margin-bottom: 0.3rem;
}

.torah-chip-open { background: #dcfce7; color: #065f46; }
.torah-chip-locked { background: #fef3c7; color: #92400e; }
.torah-chip-owned { background: #dbeafe; color: #1e40af; }

.torah-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.torah-filter {
    border: 1px solid rgba(26, 35, 64, 0.16);
    background: #fff;
    color: var(--navy);
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    cursor: pointer;
}

.torah-filter.active {
    background: var(--navy);
    color: #fff;
}

.rtl-he {
    direction: rtl;
    font-family: var(--font-serif);
    font-size: 2rem;
    line-height: 1.1;
}

.selection-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid rgba(26, 35, 64, 0.12);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.75rem;
    background: rgba(255, 255, 255, 0.8);
}

.app-alert {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.8rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .app-main { padding-top: 7rem; }
    .torah-node { width: 210px; min-height: 220px; }
    .torah-node h3 { font-size: 1.5rem; }
    .rtl-he { font-size: 1.5rem; }
    .selection-summary { flex-direction: column; align-items: flex-start; }
}
