/* ========================================
   tools.synp.it - Synpion Design System
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500&display=swap');

:root {
    --primary: #00c49a;
    --primary-light: #2dd4a0;
    --primary-dark: #028258;
    --primary-glow: rgba(0, 196, 154, 0.25);

    --bg: #0a0a0a;
    --bg-card: #111111;
    --bg-card-hover: #161616;
    --bg-input: #111111;
    --bg-elevated: #1a1a1a;

    --border: #1a1a1a;
    --border-hover: #222222;
    --border-focus: #00c49a;

    --text: #f0f0f0;
    --text-secondary: #999999;
    --text-muted: #666666;

    --success: #00c49a;
    --success-bg: rgba(0, 196, 154, 0.1);
    --danger: #ff6b6b;
    --danger-bg: rgba(255, 107, 107, 0.08);

    --radius: 16px;
    --radius-sm: 10px;
    --radius-full: 9999px;

    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: rgba(0, 196, 154, 0.2);
    color: var(--text);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-light);
}

/* ---- Navbar ---- */
.navbar {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0 2rem;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0;
    letter-spacing: -0.02em;
}

.navbar-brand span {
    background: linear-gradient(135deg, #00c49a, #028258);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}

.navbar-nav a {
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.navbar-nav a:hover,
.navbar-nav a.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.navbar-user .avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00c49a, #028258);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    color: white;
}

/* ---- Container ---- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
}

/* ---- Hero Section ---- */
.hero {
    text-align: center;
    padding: 6rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 196, 154, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.25rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
    position: relative;
}

.hero h1 span {
    background: linear-gradient(135deg, #00c49a 0%, #028258 50%, #00c49a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

/* ---- Cards ---- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: var(--transition);
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(0, 196, 154, 0.1);
    border: 1px solid rgba(0, 196, 154, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
    color: var(--primary);
}

.card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* ---- Mono Label ---- */
.mono-label {
    font-family: 'Geist Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

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

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-bottom-color: var(--primary);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* Boxed variant for specific inputs */
.form-control-box {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.form-control-box:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-control-box::placeholder {
    color: var(--text-muted);
}

select.form-control-box {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: var(--primary);
    color: #0a0a0a;
}

.btn-primary:hover {
    background: var(--primary-light);
    color: #0a0a0a;
    box-shadow: 0 0 40px var(--primary-glow);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-hover);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--text-muted);
    color: var(--text);
}

.btn-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(255, 107, 107, 0.15);
}

.btn-danger:hover {
    background: rgba(255, 107, 107, 0.15);
}

.btn-sm {
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
}

.btn-block {
    width: 100%;
}

/* ---- Auth Pages ---- */
.auth-wrapper {
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 196, 154, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    position: relative;
}

.auth-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    letter-spacing: -0.02em;
}

.auth-card .subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

.auth-card .footer-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 1.75rem;
}

/* ---- Toast Container ---- */
.toast-container {
    position: fixed;
    top: 84px;
    right: 1.5rem;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    max-width: 420px;
    min-width: 280px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: toastIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.toast.removing {
    animation: toastOut 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-message {
    flex: 1;
    line-height: 1.4;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: inherit;
    opacity: 0.5;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    line-height: 1;
    transition: var(--transition);
}

.toast-close:hover {
    opacity: 1;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    animation: toastProgress 4s linear forwards;
}

.toast-error {
    background: rgba(30, 10, 10, 0.92);
    border: 1px solid rgba(255, 107, 107, 0.2);
    color: #ff8a8a;
}

.toast-error .toast-progress {
    background: var(--danger);
}

.toast-success {
    background: rgba(10, 30, 20, 0.92);
    border: 1px solid rgba(0, 196, 154, 0.2);
    color: #5eecc0;
}

.toast-success .toast-progress {
    background: var(--primary);
}

@keyframes toastIn {
    0% { opacity: 0; transform: translateX(40px) scale(0.95); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
    0% { opacity: 1; transform: translateX(0) scale(1); }
    100% { opacity: 0; transform: translateX(40px) scale(0.95); }
}

@keyframes toastProgress {
    0% { width: 100%; }
    100% { width: 0%; }
}

@media (max-width: 480px) {
    .toast-container {
        right: 0.75rem;
        left: 0.75rem;
    }

    .toast {
        max-width: 100%;
        min-width: 0;
    }
}

/* Legacy fallback - alerts werden zu toasts konvertiert */
.alert {
    display: none;
}

/* ---- Confirm Dialog ---- */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.confirm-overlay.active {
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.confirm-dialog {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: scale(0.9) translateY(10px);
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: var(--shadow-lg);
}

.confirm-overlay.active .confirm-dialog {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.confirm-icon {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.confirm-icon svg {
    opacity: 0.7;
}

.confirm-overlay .confirm-dialog:has(~ .btn-danger) .confirm-icon,
.confirm-dialog .confirm-icon {
    color: var(--text-muted);
}

.confirm-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.confirm-message {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.75rem;
}

.confirm-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.confirm-actions .btn {
    min-width: 100px;
}

/* ---- QR Code Tool ---- */
.tool-header {
    margin-bottom: 2.5rem;
}

.tool-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.tool-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.qr-generator {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.qr-preview-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    position: sticky;
    top: 96px;
}

.qr-preview-area {
    background: white;
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    min-width: 200px;
    min-height: 200px;
}

.qr-preview-area canvas {
    display: block;
}

.qr-preview-placeholder {
    color: #bbb;
    font-size: 0.85rem;
}

.qr-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

/* ---- Tabelle ---- */
.table-wrapper {
    overflow-x: auto;
    margin-top: 2rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    color: var(--text-muted);
    font-family: 'Geist Mono', monospace;
    font-weight: 500;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.data-table td {
    font-size: 0.875rem;
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.url-cell {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Geist Mono', monospace;
}

.badge-scans {
    background: rgba(0, 196, 154, 0.1);
    color: var(--primary);
    border: 1px solid rgba(0, 196, 154, 0.15);
}

/* ---- Stats Page ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.stat-card .stat-label {
    font-family: 'Geist Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.5rem;
}

.stat-card .stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.stat-card .stat-value.accent {
    color: var(--primary);
}

.stat-card .stat-value.success {
    color: var(--primary);
}

/* ---- Tracking Log ---- */
.log-entry {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
    box-shadow: 0 0 8px var(--primary-glow);
}

.log-time {
    color: var(--text-muted);
    font-family: 'Geist Mono', monospace;
    font-size: 0.75rem;
    min-width: 140px;
}

.log-ip {
    color: var(--text-secondary);
    font-family: 'Geist Mono', monospace;
    font-size: 0.75rem;
}

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--text-secondary);
}

.empty-state .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* ---- Copy Tooltip ---- */
.copy-btn {
    position: relative;
    cursor: pointer;
    font-family: 'Geist Mono', monospace;
    font-size: 0.8rem;
}

.copy-btn:hover {
    color: var(--primary);
}

.copy-btn.copied::after {
    content: 'Kopiert!';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #0a0a0a;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-family: 'Geist', sans-serif;
    white-space: nowrap;
    animation: fadeUp 0.6s ease forwards;
}

@keyframes fadeUp {
    0% { opacity: 0; transform: translateX(-50%) translateY(4px); }
    20% { opacity: 1; transform: translateX(-50%) translateY(0); }
    80% { opacity: 1; }
    100% { opacity: 0; transform: translateX(-50%) translateY(-6px); }
}

/* ---- Dashboard ---- */
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ---- Section Titles ---- */
.section-title {
    font-family: 'Geist Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* ---- Divider ---- */
.divider {
    height: 1px;
    background: var(--border);
    margin: 2rem 0;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero {
        padding: 4rem 1.5rem 3rem;
    }

    .qr-generator {
        grid-template-columns: 1fr;
    }

    .qr-preview-card {
        position: static;
        order: -1;
    }

    .navbar {
        padding: 0 1.25rem;
    }

    .container {
        padding: 2rem 1.25rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .data-table th:nth-child(4),
    .data-table td:nth-child(4) {
        display: none;
    }

    .app-grid {
        grid-template-columns: 1fr;
    }

    .app-card {
        flex-wrap: wrap;
    }

    .notes-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .navbar-nav a span {
        display: none;
    }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ---- Modal ---- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 400px;
    width: 90%;
}

.modal h3 {
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.modal p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* ---- Share Banner ---- */
.share-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 196, 154, 0.06);
    border: 1px solid rgba(0, 196, 154, 0.12);
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.share-banner-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ---- Shared Note ---- */
.shared-note-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.shared-note-header h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.shared-note-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-family: 'Geist Mono', monospace;
    font-size: 0.8rem;
}

.shared-note-content {
    font-size: 1rem;
    line-height: 1.9;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
}

/* ---- E2E Banner ---- */
.e2e-banner {
    display: flex;
    align-items: center;
    padding: 0.65rem 1rem;
    background: rgba(0, 196, 154, 0.04);
    border: 1px solid rgba(0, 196, 154, 0.1);
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
}

.e2e-banner-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 500;
}

/* ---- E2E Toggle ---- */
.e2e-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.8rem;
    user-select: none;
}

.e2e-toggle input {
    display: none;
}

.e2e-toggle-slider {
    width: 32px;
    height: 18px;
    background: var(--border-hover);
    border-radius: 9px;
    position: relative;
    transition: var(--transition);
}

.e2e-toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: var(--transition);
}

.e2e-toggle input:checked + .e2e-toggle-slider {
    background: var(--primary);
}

.e2e-toggle input:checked + .e2e-toggle-slider::after {
    left: 16px;
    background: white;
}

.e2e-toggle input:checked ~ span,
.e2e-toggle input:checked ~ svg {
    color: var(--primary);
}

/* ---- E2E Share Locked ---- */
.e2e-share-locked {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.e2e-share-locked svg {
    color: var(--primary);
    opacity: 0.5;
    margin-bottom: 1rem;
}

.e2e-share-locked h3 {
    color: var(--text);
    margin-bottom: 0.5rem;
}

.e2e-share-locked p {
    font-size: 0.85rem;
}

/* ---- Settings ---- */
.settings-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}

/* ---- Back Link ---- */
.back-link {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: 'Geist Mono', monospace;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--primary);
}

/* ---- App Grid (Dashboard) ---- */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1rem;
}

.app-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: var(--transition);
}

.app-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    color: inherit;
}

.app-card:hover::before {
    opacity: 1;
}

.app-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(0, 196, 154, 0.08);
    border: 1px solid rgba(0, 196, 154, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.app-card-body {
    flex: 1;
    min-width: 0;
}

.app-card-body h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    letter-spacing: -0.01em;
}

.app-card-body p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.5;
}

.app-card-stat {
    text-align: right;
    flex-shrink: 0;
}

.app-card-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.02em;
    line-height: 1;
}

.app-card-stat-label {
    font-family: 'Geist Mono', monospace;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ---- Notes ---- */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.note-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    display: block;
}

.note-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    color: inherit;
}

.note-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.note-card-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.note-card-date {
    font-family: 'Geist Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.note-card-preview {
    color: var(--text-secondary);
    font-size: 0.825rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Note Editor */
.note-title-input {
    width: 100%;
    padding: 0;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1.75rem;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: -0.02em;
    outline: none;
    margin-bottom: 1.5rem;
}

.note-title-input::placeholder {
    color: var(--text-muted);
}

.note-content-input {
    width: 100%;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.925rem;
    font-family: inherit;
    line-height: 1.8;
    resize: vertical;
    outline: none;
    transition: var(--transition);
    min-height: 400px;
}

.note-content-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.note-content-input::placeholder {
    color: var(--text-muted);
}

/* ---- Footer ---- */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 4rem;
}

.site-footer a {
    color: var(--text-secondary);
}

.site-footer a:hover {
    color: var(--primary);
}
