@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;500;600;700;800&display=swap');

:root {
    --primary: #4f46e5; --primary-dark: #3730a3; --bg: #f8fafc; --text: #1e293b; --text-light: #64748b;
    --card-bg: #ffffff; --border: #e2e8f0; --shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg); color: var(--text); margin: 0; height: 100vh; overflow: hidden; }

/* LAYOUT */
.app-wrap { display: grid; grid-template-columns: 260px 1fr; height: 100vh; }
.sidebar { background: white; border-right: 1px solid var(--border); padding: 20px; display: flex; flex-direction: column; }
.main { padding: 30px; overflow-y: auto; background: #f8fafc; }

/* LANDING PAGE */
.landing-view { position: fixed; inset: 0; background: white; z-index: 1000; overflow-y: auto; }
.hero { text-align: center; padding: 100px 20px; background: radial-gradient(circle at 50% 0%, #eef2ff 0%, #ffffff 70%); }
.hero h1 { font-size: 4rem; font-weight: 800; color: var(--primary); margin-bottom: 20px; letter-spacing: -1.5px; }
.plan-card { background: white; border: 1px solid var(--border); padding: 40px; border-radius: 24px; width: 320px; display: inline-block; margin: 20px; text-align: left; transition: 0.3s; position: relative; }
.plan-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.plan-card.popular { border: 2px solid var(--primary); }
.plan-price { font-size: 3rem; font-weight: 800; margin: 20px 0; }

/* COMPONENTS */
.btn { padding: 12px 20px; border-radius: 12px; border: 1px solid transparent; font-weight: 600; cursor: pointer; transition: 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.95rem; }
.btn-p { background: var(--primary); color: white; box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2); }
.btn-p:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-s { background: white; border-color: var(--border); color: var(--text); }
.btn-s:hover { border-color: #cbd5e1; background: #f8fafc; }

.nav-btn { padding: 12px 15px; border-radius: 12px; cursor: pointer; display: flex; align-items: center; gap: 12px; color: var(--text-light); font-weight: 500; margin-bottom: 5px; transition: 0.2s; }
.nav-btn:hover { background: #f1f5f9; color: var(--text); }
.nav-btn.active { background: #eef2ff; color: var(--primary); font-weight: 700; }

.card { background: white; border: 1px solid var(--border); border-radius: 16px; padding: 20px; margin-bottom: 15px; transition: 0.2s; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.card:hover { border-color: var(--primary); box-shadow: var(--shadow); }

.folder-head { font-weight: 700; padding: 12px; margin-top: 15px; cursor: pointer; display: flex; align-items: center; gap: 10px; color: var(--text); background: white; border-radius: 10px; border: 1px solid var(--border); }
.file-row { padding: 8px 12px 8px 35px; border-bottom: 1px solid var(--border); color: var(--text-light); display: flex; justify-content: space-between; background: white; }

/* ADMIN DASHBOARD */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 30px; }
.stat-card { background: white; padding: 20px; border-radius: 16px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.stat-num { font-size: 2rem; font-weight: 800; color: var(--primary); }
.admin-table { width: 100%; border-collapse: collapse; background: white; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); }
.admin-table th, .admin-table td { padding: 15px; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { background: #f8fafc; font-weight: 600; color: var(--text-light); }

/* READER */
#mdOut { background: white; padding: 50px; border-radius: 20px; border: 1px solid var(--border); line-height: 1.8; color: #334155; max-width: 900px; margin: auto; }
#mdOut h1 { font-size: 2rem; color: #1e293b; border-bottom: 2px solid var(--border); padding-bottom: 15px; }
#mdOut h2 { font-size: 1.5rem; margin-top: 30px; color: var(--primary); }
#mdOut blockquote { border-left: 4px solid var(--primary); background: #f1f5f9; padding: 20px; margin: 20px 0; font-style: italic; }

/* PALETTES */
.nacre-blue h1 { background: linear-gradient(to right, #1e3a8a, #3b82f6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nacre-purple h1 { background: linear-gradient(to right, #581c87, #a855f7); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nacre-emerald h1 { background: linear-gradient(to right, #064e3b, #10b981); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nacre-gold h1 { background: linear-gradient(to right, #78350f, #f59e0b); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* MODALS */
.modal-over { position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 5000; }
.modal-box { background: white; padding: 30px; border-radius: 24px; width: 600px; max-width: 90%; box-shadow: 0 25px 50px rgba(0,0,0,0.2); }
.hidden { display: none !important; }

@media (max-width: 768px) {
    .app-wrap { grid-template-columns: 1fr; }
    .sidebar { position: fixed; bottom: 0; left: 0; width: 100%; height: 80px; flex-direction: row; justify-content: space-around; z-index: 1000; border-top: 1px solid var(--border); }
    .nav-btn span, .hide-mob { display: none; }
    .stat-grid { grid-template-columns: 1fr; }
}
