/* AN Boards – Vanilla CSS + Dark Mode */

:root {
    --bg: #f4f5f7;
    --surface: #ffffff;
    --border: #dfe1e6;
    --text: #172b4d;
    --text-muted: #5e6c84;
    --primary: #0052cc;
    --primary-hover: #0043a3;
    --danger: #de350b;
    --success: #00875a;
    --radius: 12px;
    --shadow-sm: 0 1px 2px rgba(9, 30, 66, 0.05);
    --shadow: 0 3px 6px rgba(9, 30, 66, 0.08), 0 0 1px rgba(9, 30, 66, 0.15);
    --shadow-lg: 0 8px 16px -4px rgba(9, 30, 66, 0.1), 0 0 1px rgba(9, 30, 66, 0.15);
    --header-bg: rgba(255, 255, 255, 0.95);
    --kanban-list-bg: #f4f5f7;
    --card-hover: #fafbfc;
    --drag-over: rgba(0, 82, 204, 0.08);
}

body.theme-dark {
    --bg: #101214;
    --surface: #1d2125;
    --border: #2c333a;
    --text: #c7d1db;
    --text-muted: #738496;
    --primary: #579dff;
    --primary-hover: #85b8ff;
    --danger: #f87462;
    --success: #4bce97;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.25), 0 0 1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px -4px rgba(0, 0, 0, 0.4), 0 0 1px rgba(0, 0, 0, 0.5);
    --header-bg: rgba(29, 33, 37, 0.95);
    --kanban-list-bg: #161a1d;
    --card-hover: #22272b;
    --drag-over: rgba(87, 157, 255, 0.15);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    transition: background-color .3s ease, color .3s ease;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(9, 30, 66, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(9, 30, 66, 0.25);
}
body.theme-dark ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}
body.theme-dark ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ----- Kompakte Header-Leiste ----- */
.site-header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1rem;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 100;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
    text-decoration: none;
}

.logo:hover {
    text-decoration: underline;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Menü-Button (Hamburger) */
.menu-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background .15s ease;
}

.menu-btn:hover {
    background: var(--bg);
}

.menu-btn-icon {
    width: 24px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu-btn-icon span {
    display: block;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform .2s ease, opacity .2s ease;
}

.menu-btn[aria-expanded="true"] .menu-btn-icon span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-btn[aria-expanded="true"] .menu-btn-icon span:nth-child(2) {
    opacity: 0;
}

.menu-btn[aria-expanded="true"] .menu-btn-icon span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Theme-Toggle */
.theme-toggle {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 1.25rem;
    transition: background .15s ease;
}

.theme-toggle:hover {
    background: var(--bg);
}

.theme-icon-light {
    display: none;
}

.theme-icon-dark {
    display: inline;
}

body.theme-dark .theme-icon-light {
    display: inline;
}

body.theme-dark .theme-icon-dark {
    display: none;
}

/* Fullscreen-Nav Overlay */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: var(--surface);
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}

.nav-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.nav-overlay .nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.nav-overlay .nav-links li {
    margin: 0.5rem 0;
}

.nav-overlay .nav-links a {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    border-radius: var(--radius);
    transition: background .15s ease, color .15s ease;
}

.nav-overlay .nav-links a:hover {
    background: var(--bg);
    color: var(--primary);
}

.nav-overlay .nav-links .btn {
    margin-top: 0.5rem;
    font-size: 1rem;
}

.nav-overlay .user-name-nav {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.nav-icon-link {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background: var(--danger);
    color: #fff;
    font-size: 0.70rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 999px;
    line-height: 1;
}

.inline-form {
    display: inline;
}

.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

.flash {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
}

.flash-success {
    background: #e3fcef;
    color: var(--success);
}

body.theme-dark .flash-success {
    background: rgba(52, 199, 123, 0.2);
}

.flash-error {
    background: #ffebe6;
    color: var(--danger);
}

body.theme-dark .flash-error {
    background: rgba(232, 93, 93, 0.2);
}

/* Auth */
.auth-page {
    max-width: 360px;
    margin: 2rem auto;
    padding: 1.5rem;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.auth-page h1 {
    margin-top: 0;
}

.auth-form label {
    display: block;
    margin-bottom: 1rem;
}

.auth-form label.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
}

.auth-form button {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.form-error {
    color: var(--danger);
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: none;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    background: rgba(9, 30, 66, 0.04);
    color: var(--text);
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

body.theme-dark .btn {
    background: rgba(255, 255, 255, 0.04);
}

.btn:hover {
    background: rgba(9, 30, 66, 0.08);
}

body.theme-dark .btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.btn:active {
    transform: scale(0.97);
}

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

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

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

.btn-secondary:hover {
    background: var(--bg);
}

body.theme-dark .btn-secondary:hover {
    background: var(--border);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-small {
    padding: 0.35rem 0.65rem;
    font-size: 12px;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1rem;
}

/* Forms */
.form-page,
.board-list-page {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Modern Auth Cards */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 100px);
    padding: 2rem;
}

.auth-card {
    background: var(--surface);
    border-radius: calc(var(--radius) * 1.5);
    box-shadow: var(--shadow-lg);
    padding: 3rem;
    width: 100%;
    max-width: 440px;
    border: 1px solid var(--border);
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-card h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    text-align: center;
    color: var(--text);
}

.auth-subtitle {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text);
}

.form-group input:not([type="checkbox"]) {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    box-sizing: border-box;
}

.form-group input:not([type="checkbox"]):focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: var(--surface);
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.btn-block {
    width: 100%;
    padding: 0.85rem;
    font-size: 1.05rem;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.card-form label {
    display: block;
    margin-bottom: 1rem;
}

.card-form input[type="text"],
.card-form input[type="email"],
.card-form input[type="date"],
.card-form input[type="color"],
.card-form textarea,
.card-form select {
    width: 100%;
    max-width: 400px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
}

.card-form textarea {
    resize: vertical;
    min-height: 80px;
}

.card-form button,
.card-form .btn {
    margin-right: 0.5rem;
    margin-top: 0.5rem;
}

/* Board list */
.board-grid {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.board-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.board-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.board-link {
    display: block;
    padding: 1.25rem;
    text-decoration: none;
    color: var(--text);
}

.board-link:hover {
    background: var(--card-hover);
}

.board-desc {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.board-meta {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.empty-hint {
    color: var(--text-muted);
}

/* Kanban */
.kanban-board {
    min-height: 80vh;
}

.board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.board-header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.board-actions {
    display: flex;
    gap: 0.5rem;
}

.kanban-lists {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    align-items: flex-start;
}

.kanban-list {
    flex: 0 0 280px;
    background: var(--kanban-list-bg);
    border-radius: var(--radius);
    padding: 0.75rem;
    max-height: calc(100vh - 140px);
    display: flex;
    flex-direction: column;
}

.kanban-list.add-list {
    background: transparent;
    border: 2px dashed var(--border);
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.add-list-btn {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    font-weight: 500;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.add-list-btn:hover {
    color: var(--primary);
    background: rgba(9, 30, 66, 0.04);
}

body.theme-dark .add-list-btn:hover {
    background: rgba(255, 255, 255, 0.04);
}

/* Sidebar "Letzte Aktivitäten" */
.board-sidebar {
    width: 240px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    flex-shrink: 0;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    box-shadow: var(--shadow-sm);
}

.board-sidebar h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.8rem;
}

.activity-list li {
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--bg);
    padding-bottom: 0.75rem;
}

.activity-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.activity-target-type {
    color: var(--primary);
}

.activity-time {
    color: var(--text-muted);
    font-size: 0.75em;
    margin-top: 0.25rem;
}

/* Scrollbars für Listen und Sidebar */

.list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.list-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.list-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.list-header:hover .list-actions {
    opacity: 1;
}

.list-cards {
    flex: 1;
    overflow-y: auto;
    min-height: 40px;
}

.list-footer {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(9, 30, 66, 0.06);
}

body.theme-dark .list-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.add-card {
    display: block;
    width: 100%;
    text-align: left;
    color: var(--text-muted);
    background: transparent;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease;
    text-decoration: none;
}

.add-card:hover {
    background: rgba(9, 30, 66, 0.08);
    color: var(--text);
}

body.theme-dark .add-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.card-item {
    background: var(--surface);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow-sm);
    cursor: grab;
    transition: box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
    position: relative;
    border: 1px solid transparent;
}

.card-item:hover {
    background: var(--card-hover);
    box-shadow: var(--shadow);
}

.card-item:active {
    cursor: grabbing;
}

.card-item.dragging {
    opacity: 0.9;
    transform: rotate(2deg) scale(1.02);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
}

.list-cards.drag-over {
    background: var(--drag-over);
    border-radius: 8px;
    min-height: 60px;
    transition: background-color 0.2s ease;
}

.card-link {
    text-decoration: none;
    color: var(--text);
    display: block;
}

.card-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 4px;
}

.card-label {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    color: #fff;
    text-shadow: 0 0 1px #000;
}

.card-title {
    display: block;
}

.card-due {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Card edit */
.card-edit-page .upload-form {
    margin-bottom: 1rem;
}

.attachment-list {
    list-style: none;
    padding: 0;
}

.attachment-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.label-list {
    list-style: none;
    padding: 0;
}

.label-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.label-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    color: #fff;
    font-size: 12px;
    text-shadow: 0 0 1px #000;
}

.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-right: 0.75rem;
    margin-bottom: 0.35rem;
}

.member-list {
    list-style: none;
    padding: 0;
}

.member-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

/* ----- Hero / Landing ----- */
.hero {
    min-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1rem 4rem;
}

.hero-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 1rem;
    color: var(--text);
}

.hero-tagline {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

.hero-purpose {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.hero-ctas .btn {
    min-width: 140px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    text-align: center;
}

.hero-ctas .btn-primary {
    box-shadow: 0 2px 8px rgba(0, 82, 204, 0.35);
}

body.theme-dark .hero-ctas .btn-primary {
    box-shadow: 0 2px 12px rgba(91, 156, 244, 0.4);
}
