/* ============================================================
   Notiz-App Custom Styles
   ============================================================ */

:root {
    --sidebar-width: 280px;
    --navbar-height: 56px;
    --primary: #3B82F6;
    --primary-dark: #2563EB;
    --bg-sidebar: #f8f9fa;
    --bg-main: #ffffff;
    --text-muted: #6B7280;
    --border-color: #e5e7eb;
}

/* Gast-Navbar Links */
.nav-link-guest {
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.15s ease;
}
.nav-link-guest:hover {
    color: var(--primary);
}

/* Smooth Scroll + Offset für sticky Navbar */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

/* Body */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f3f4f6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar-notiz {
    height: var(--navbar-height);
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    z-index: 1040;
}
.navbar-notiz .navbar-brand {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.25rem;
}
.navbar-notiz .nav-link {
    color: #374151;
    font-weight: 500;
}
.navbar-notiz .nav-link:hover,
.navbar-notiz .nav-link.active {
    color: var(--primary);
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    bottom: 0;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    z-index: 1030;
    transition: transform 0.3s ease;
}
.sidebar .notebook-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 0.375rem;
    margin: 0.125rem 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #374151;
    text-decoration: none;
    font-size: 0.9rem;
}
.sidebar .notebook-item:hover {
    background: #e5e7eb;
}
.sidebar .notebook-item.active {
    background: var(--primary);
    color: #fff;
}
.sidebar .notebook-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding-top: calc(var(--navbar-height) + 1rem);
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-bottom: 2rem;
    min-height: 100vh;
}

/* Note Cards */
.note-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.note-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}
.note-card .note-title {
    font-weight: 600;
    font-size: 1rem;
    color: #111827;
    margin-bottom: 0.25rem;
}
.note-card .note-snippet {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.note-card .note-meta {
    font-size: 0.75rem;
    color: #9CA3AF;
    margin-top: 0.5rem;
}
.note-card.pinned {
    border-left: 3px solid var(--primary);
}

/* Editor Modal/Offcanvas */
.note-editor-offcanvas {
    width: 60% !important;
    max-width: 900px;
    top: 10px !important;
    bottom: 10px !important;
    height: auto !important;
}
.note-editor-offcanvas .note-editor-title {
    border: none;
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0;
    width: 100%;
    outline: none;
}
.note-editor-offcanvas .note-editor-title::placeholder {
    color: #D1D5DB;
}

/* Calendar Page */
.fc .fc-button-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}
.fc .fc-button-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}
.fc .fc-button-primary:not(:disabled).fc-button-active {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}
.fc .fc-daygrid-event {
    border-radius: 4px;
    padding: 1px 4px;
    font-size: 0.8rem;
}

/* Search */
.search-highlight {
    background: #FEF3C7;
    padding: 0 2px;
    border-radius: 2px;
}

/* Tags */
.tag-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Auth Pages */
.auth-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}
.auth-card {
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}
.auth-card .auth-logo {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Flash Messages */
.flash-message {
    position: fixed;
    top: calc(var(--navbar-height) + 1rem);
    right: 1rem;
    z-index: 1050;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Tier Badge */
.tier-badge-demo {
    background: #FEF3C7;
    color: #92400E;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    font-weight: 600;
}
.tier-badge-pro {
    background: #D1FAE5;
    color: #065F46;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    font-weight: 600;
}

/* Onboarding Cards */
.onboarding-card {
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    cursor: default;
}
.onboarding-card:hover {
    border-color: var(--primary) !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

/* Mobile Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .note-editor-offcanvas {
        width: 100% !important;
    }
}

/* Summernote Anpassungen */
.note-editor.note-frame {
    border: 1px solid var(--border-color) !important;
    border-radius: 0.375rem !important;
}
.note-editor .note-editing-area .note-editable {
    min-height: 300px;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 4px;
}
.sidebar::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 2px;
}

/* Attachment List */
.attachment-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: #F9FAFB;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    margin-bottom: 0.375rem;
    font-size: 0.85rem;
}
/* Upload Dropzone */
.upload-dropzone {
    border: 2px dashed #D1D5DB;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    position: relative;
}
.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: var(--primary);
    background: #EFF6FF;
}
.upload-dropzone i {
    font-size: 2.5rem;
    color: #9CA3AF;
    display: block;
    margin-bottom: 0.5rem;
}
.upload-dropzone:hover i,
.upload-dropzone.dragover i {
    color: var(--primary);
}
.upload-dropzone p {
    color: #6B7280;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}
.upload-dropzone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.upload-dropzone .form-text {
    position: relative;
    z-index: 1;
}

.attachment-item .attachment-remove {
    margin-left: auto;
    color: #EF4444;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
}

/* ============================================================
   Browser Mockup (Startseite)
   ============================================================ */
.mockup-browser {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    border: 1px solid #e5e7eb;
}
.mockup-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
}
.mockup-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.mockup-url {
    margin-left: 12px;
    font-size: 0.7rem;
    color: #9CA3AF;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 2px 10px;
    flex: 1;
}
.mockup-body {
    display: flex;
    min-height: 280px;
}
.mockup-sidebar {
    width: 160px;
    background: #f9fafb;
    border-right: 1px solid #e5e7eb;
    padding: 12px 8px;
    flex-shrink: 0;
}
.mockup-sidebar-title {
    font-size: 0.6rem;
    text-transform: uppercase;
    color: #9CA3AF;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0 6px;
    margin-bottom: 8px;
}
.mockup-nb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: #374151;
    padding: 5px 6px;
    border-radius: 4px;
    margin-bottom: 2px;
}
.mockup-nb.active {
    background: var(--primary);
    color: #fff;
}
.mockup-nb-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.mockup-nb.active .mockup-nb-dot {
    border: 1.5px solid rgba(255,255,255,0.6);
}
.mockup-nb-count {
    margin-left: auto;
    font-size: 0.6rem;
    opacity: 0.6;
}
.mockup-content {
    flex: 1;
    padding: 12px;
}
.mockup-note {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 8px;
}
.mockup-note.pinned {
    border-left: 3px solid var(--primary);
}
.mockup-note-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
}
.mockup-note-text {
    font-size: 0.68rem;
    color: #6B7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mockup-note-meta {
    font-size: 0.58rem;
    color: #9CA3AF;
    margin-top: 4px;
}

@media (max-width: 991.98px) {
    .mockup-sidebar {
        display: none;
    }
    .mockup-body {
        min-height: 220px;
    }
}
