/* Styles für den Fokus-Modus (Tagesbericht-Detailansicht), ausgelagert aus
   modules/daily_reports.php. Rein strukturelle Aufräumarbeit – am Aussehen
   ändert sich dadurch nichts. */

/* Globale Nav und Liste im Fokus-Modus ausblenden */
.col-list { display: none !important; }
.col-nav { display: none !important; }
/* Fokus-Container nimmt den gesamten verbleibenden Platz ein */
.focus-mode-container {
    display: flex;
    flex: 1;
    height: 100%;
    overflow: hidden;
}
/* Linke Sticky-Nav-Spalte */
.focus-nav {
    width: 250px;
    flex-shrink: 0;
    background: #0e0e0e;
    border-right: 1px solid #2a2a2a;
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    height: 100%;
    position: sticky;
    top: 0;
    overflow-y: auto;
}
.focus-nav .back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #888;
    text-decoration: none;
    font-size: 0.78rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 8px 0;
    transition: color 0.2s;
    margin-bottom: 30px;
}
.focus-nav .back-link:hover { color: #fff; }
.focus-nav .nav-project-name {
    font-size: 1rem;
    font-weight: 400;
    color: #e0e0e0;
    line-height: 1.3;
    margin-bottom: 8px;
}
.focus-nav .nav-meta {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 4px;
}
.focus-nav .nav-status {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #2ecc71;
    border: 1px solid #2ecc71;
    padding: 3px 8px;
    border-radius: 2px;
}
.focus-nav .nav-divider {
    border: none;
    border-top: 1px solid #2a2a2a;
    margin: 24px 0;
}
.focus-nav .sidebar-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid #fff;
    color: #fff;
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    transition: border-color 0.2s, color 0.2s;
    cursor: pointer;
}
.focus-nav .sidebar-action-btn:hover { border-color: #aaa; color: #eee; }
/* Rechte scrollbare Arbeitsspalte */
.focus-workspace {
    flex: 1;
    overflow-y: auto;
    background: #121212;
}
.focus-context-header {
    padding: 30px 30px 10px 30px;
    border-bottom: 1px solid #1e1e1e;
}
.focus-context-header .proj-label {
    font-size: 0.7rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
}
.focus-context-header h1 {
    font-size: 1.6rem;
    font-weight: 300;
    color: #fff;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.focus-context-header .report-meta {
    font-size: 0.85rem;
    color: #888;
}
/* Responsive: Unter 800px wieder single-column */
@media (max-width: 800px) {
    .focus-nav { display: none; }
    .focus-workspace { flex: 1; }
}

/* Kontakt-Maske: Header + Formatierungsleiste bleiben beim Scrollen oben */
.mask-sticky-top {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #1a1a1a;
}
.mask-header {
    background: #1a1a1a;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}
.mask-header h2 {
    margin: 0 20px 0 0;
    color: var(--text);
    font-size: 2em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}
.mask-cancel-btn {
    background: transparent;
    border: 1px solid #555;
    color: #aaa;
    padding: 8px 16px;
    font-size: 0.8rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
}
.mask-cancel-btn:hover {
    color: #fff;
    border-color: #fff;
}

.format-toolbar {
    display: none;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 16px 12px 16px;
    background: #161616;
    border-bottom: 1px solid #333;
}
.format-toolbar.is-visible {
    display: flex;
}
.format-toolbar button {
    background: transparent;
    color: #d8d8d8;
    border: 1px solid #8a8a8a;
    border-radius: 999px;
    padding: 6px 16px;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    cursor: pointer;
    line-height: 1.3;
    white-space: nowrap;
    touch-action: manipulation;
}
.format-toolbar button b { font-weight: 700; }
.format-toolbar button i { font-style: italic; }
.format-toolbar button u { text-decoration: underline; }
.format-toolbar button.is-active {
    background: #2a2a2a;
    border-color: #fff;
    color: #fff;
}
.format-toolbar .format-toolbar-close {
    margin-left: auto;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    line-height: 1;
    color: #ccc;
}

.rich-editor {
    width: 100%;
    padding: 15px;
    background: #1a1a1a;
    border: 1px solid #333;
    color: var(--text);
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 1.1em;
    line-height: 1.5;
    overflow: hidden;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    outline: none;
    min-height: 3.3em;
    caret-color: #fff;
    display: block;
    cursor: text;
    -webkit-user-select: text;
    user-select: text;
}
.rich-editor:focus {
    border-color: #666;
}
.rich-editor-danger {
    border-color: var(--danger);
}
.rich-editor-danger:focus {
    border-color: var(--danger);
}
.rich-editor b, .rich-editor strong { font-weight: 700; }
.rich-editor i, .rich-editor em { font-style: italic; }
.rich-editor u { text-decoration: underline; }
.rich-editor div, .rich-editor p { margin: 0; }

.beteiligte-liste .company-list-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 8px;
    background: #1a1a1a;
    border-bottom: none;
    font-size: inherit;
    cursor: pointer;
    box-shadow: inset 3px 0 0 #333;
    transition: background 0.2s;
}
.beteiligte-liste .company-list-row.has-entry {
    box-shadow: inset 3px 0 0 var(--green);
}
.beteiligte-liste .company-list-row-main {
    grid-column: span 3;
    display: flex;
    align-items: center;
    min-width: 0;
    padding-left: 12px;
}
.beteiligte-liste .company-list-row-name {
    font-weight: 500;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}
.beteiligte-liste .company-list-row-check {
    color: var(--green);
    margin-left: 10px;
    font-size: 1.1em;
}
.beteiligte-liste .company-list-row-meta {
    grid-column: span 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.beteiligte-liste .company-list-row-status {
    color: var(--accent);
    font-size: 1.1em;
    flex: 1;
    min-width: 0;
}
.beteiligte-liste .company-list-row-delete {
    color: var(--danger);
    font-size: 1.5em;
    text-decoration: none;
    padding: 0 5px;
    flex-shrink: 0;
    line-height: 1;
}
.beteiligte-liste .company-list-row-delete:hover {
    color: var(--danger);
}

.company-sort-hint {
    font-size: 0.7rem;
    letter-spacing: 0.4px;
    text-transform: none;
    color: #777;
    font-weight: 400;
    margin-left: 12px;
}
.company-sort-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 12px;
    flex-shrink: 0;
}
.company-sort-handle {
    width: 36px;
    height: 42px;
    padding: 0;
    border: 1px solid #444;
    background: #161616;
    color: #999;
    font-size: 1.05rem;
    line-height: 1;
    border-radius: 4px;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}
.company-sort-handle:active {
    cursor: grabbing;
    color: #fff;
    border-color: #888;
}
.company-sort-arrows {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.company-sort-btn {
    width: 32px;
    height: 20px;
    padding: 0;
    border: 1px solid #444;
    background: #161616;
    color: #ccc;
    font-size: 0.65rem;
    line-height: 1;
    border-radius: 3px;
    cursor: pointer;
    touch-action: manipulation;
}
.company-sort-btn:hover:not(:disabled) {
    border-color: #888;
    color: #fff;
}
.company-sort-btn:disabled {
    opacity: 0.25;
    cursor: default;
}
.company-list-row.is-dragging {
    opacity: 0.65;
    background: #222 !important;
}

.company-print-toggle {
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid #444;
    background: #161616;
    color: #ccc;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    touch-action: manipulation;
}
.company-print-toggle svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.company-print-toggle .eye-off { display: none; }
.company-print-toggle:hover {
    border-color: #888;
    color: #fff;
}
.company-list-row.is-print-hidden {
    opacity: 0.45;
}
.company-list-row.is-print-hidden .company-print-toggle {
    color: #888;
    border-color: #555;
}
.company-list-row.is-print-hidden .company-print-toggle .eye-on { display: none; }
.company-list-row.is-print-hidden .company-print-toggle .eye-off { display: block; }

@media (max-width: 900px) {
    .beteiligte-liste .company-list-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .beteiligte-liste .company-list-row-main,
    .beteiligte-liste .company-list-row-meta {
        grid-column: span 1;
    }
}

@media (max-width: 600px) {
    .company-sort-hint { display: none; }
    .company-sort-handle { width: 40px; height: 46px; }
    .company-sort-btn { width: 34px; height: 22px; }
    .company-print-toggle { width: 46px; height: 46px; }
}

@media (max-width: 600px) {
    .format-toolbar button {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}
