/* =================================================
        Kanban Folder Isolated Stylesheet
================================================= */

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

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: "Courier New", Courier, monospace;
    color: #333333;
    background-color: #333333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Header Styles --- */
.site-header {
    width: 100%;
}

.header-row {
    border: none;
    border-bottom: 1px solid #ffffff;
    width: 100%;
    margin-bottom: 0;
}

.green-row {
    background-color: #99cc66;
    padding: 0.8rem 0;
    color: #ffffff;
}

.header-nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 95%;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.nav-left a, .nav-left span {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.nav-left .divider {
    margin: 0 0.8rem;
}

.orange-stripe {
    background-color: #fbb03b;
    height: 11px;
}

.hero-row {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 380px;
    display: flex;
    align-items: flex-end;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.22);
    z-index: 1;
}

.hero-content-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 95%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 5rem 1.5rem 2rem 1.5rem;
    color: #ffffff;
}

.hero-text h1 {
    font-size: 2.8rem;
    font-weight: normal;
    margin-bottom: 0.2rem;
    letter-spacing: 0.5px;
}

.hero-text p {
    font-size: 1.05rem;
    opacity: 0.95;
}

.blue-row {
    background-color: #94b2b5;
    height: 13px;
}

/* --- Main Content Area & Kanban Board Layout --- */
.site-main {
    flex: 1;
    width: 100%;
    max-width: 95%;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem 1.5rem;
    background-color: #333333;
}

/* --- Kanban Board Container Integration --- */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
    width: 100%;
    max-width: 98%;
    margin: 1rem auto 0 auto;
    align-items: start;
}

/* Dynamic hiding for mobile empty columns when filtering */
.kanban-column.mobile-hidden-column {
    display: none !important;
}

.kanban-column {
    background-color: #222222;
    border: 1px solid #444444;
    border-top: 4px solid #94b2b5;
    border-radius: 6px;
    padding: 10px;
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

.kanban-column.drag-over {
    background: #2a2a2a;
    border: 2px dashed #94b2b5;
}

.kanban-column h3 {
    color: #94b2b5;
    font-size: 1rem;
    margin-top: 0;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px dashed #555;
}

/* Update your column drop zone in kanban.css to tile cards compactly */
.column-drop-zone {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
    flex: 1;
    min-height: 500px;
    align-content: start;
}


/* Task Cards & Sticky Note Variants - Compact for wide screens */
.task-card {
    padding: 12px;
    border-radius: 2px;
    position: relative;
    box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    cursor: grab;
    transition: all 0.2s ease-in-out;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.task-card-title {
    margin: 0 0 6px 0;
    font-size: 1.05em;
    font-weight: bold;
    cursor: pointer;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.task-card-desc {
    font-size: 0.85em;
    margin: 0 0 8px 0;
    line-height: 1.4;
    max-height: 4.2em;
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.task-latest-update {
    background: rgba(255, 255, 255, 0.65);
    border-left: 3px solid #333;
    padding: 8px 10px;
    margin-bottom: 10px;
    font-size: 0.8em;
    border-radius: 2px;
    color: #222;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.task-latest-update-header {
    font-weight: bold;
    font-size: 0.9em;
    color: #111;
    margin-bottom: 3px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.task-latest-update-total {
    font-size: 0.85em;
    color: #444;
    font-weight: normal;
    flex-shrink: 0;
}

.task-latest-update-text {
    line-height: 1.3;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
}

.task-latest-update-author {
    font-weight: bold;
}

.task-latest-update-time {
    font-size: 0.7em;
    color: #555;
    text-align: right;
    margin-top: 2px;
}

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

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 3px 6px 12px rgba(0, 0, 0, 0.25);
    z-index: 10;
}

.sticky-high {
    background-color: #ffcccc;
    color: #401010;
    transform: rotate(-0.5deg);
}

.sticky-medium {
    background-color: #fef68a;
    color: #333300;
    transform: rotate(0.5deg);
}

.sticky-low {
    background-color: #d2f8d2;
    color: #103010;
    transform: rotate(-0.5deg);
}

.task-card.card-overdue {
    background-color: #511 !important;
    color: #fbb03b !important;
    border: 1px solid #fbb03b !important;
}
.task-card.card-overdue * { color: #fbb03b !important; }
.task-card.card-overdue input, 
.task-card.card-overdue select { color: #333333 !important; }

/* --- Footer Styles --- */
.site-footer {
    width: 100%;
    margin-top: auto;
    position: relative;
}

.footer-row {
    border: none;
    border-bottom: 1px solid #ffffff;
    width: 100%;
    margin-bottom: 0;
}

.site-footer .blue-row {
    background-color: #94b2b5;
    height: 14px;
}

.site-footer .orange-stripe {
    background-color: #fbb03b;
    height: 8px;
}

.site-footer .green-row {
    background-color: #99cc66;
    padding: 2.5rem 0;
    color: #ffffff;
    position: relative;
}

.footer-content {
    max-width: 95%;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
}

.footer-content p {
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-align: right;
}

.back-to-top {
    position: absolute;
    right: 8%;
    top: -28px;
    width: 56px;
    height: 56px;
    background-color: #94b2b5;
    border: 2px solid #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.back-to-top:hover {
    background-color: #7d9a9d;
    transform: translateY(-2px);
}

/* =================================================
        Kanban Action Bar & Green Filter Toolbar
================================================= */

.kanban-notice-error {
    background: #511;
    color: #fcc;
    padding: 12px 15px;
    border: 1px solid #c33;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.kanban-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center; 
    margin-bottom: 10px;
    background: #222222;
    padding: 15px 20px;
    border-radius: 4px;
    border-top: 5px solid #fbb03b;
    border-bottom: 1px solid #444;
    flex-wrap: wrap;
    gap: 15px;
}

.kanban-header-title {
    color: #fbb03b;
    font-family: inherit;
    font-size: 1.5rem;
    margin: 0;
}

.kanban-status-container {
    display: flex;
    gap: 15px;
    font-size: 0.85em;
    color: #94b2b5;
}

.kanban-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.kanban-login-inline {
    display: flex;
    gap: 6px;
    margin: 0;
    align-items: center;
    flex-wrap: wrap;
}

.kanban-input-field {
    padding: 8px;
    background: #1f1f1f;
    color: #fff;
    border: 1px solid #94b2b5;
    border-radius: 4px;
    box-sizing: border-box;
}

.kanban-btn-primary {
    padding: 8px 14px;
    background: #94b2b5;
    color: #333333;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}
.kanban-btn-primary:hover { background: #a5c3c6; }

.kanban-btn-success {
    padding: 8px 12px;
    cursor: pointer;
    background: #99cc66;
    color: #333333;
    border: 1px solid #7cb350;
    border-radius: 4px;
    font-weight: bold;
}
.kanban-btn-success:hover { background: #a8d677; }

.kanban-btn-danger {
    padding: 8px 12px;
    background: #d9534f;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.9em;
    cursor: pointer;
}

/* Board visit digest (under header, above filters) */
.kanban-board-digest {
    background: #1a2332;
    border: 1px solid #2f4b5c;
    border-left: 4px solid #3d7ea6;
    border-radius: 4px;
    padding: 10px 14px;
    margin: 0 0 12px 0;
    color: #d5e2ec;
    font-size: 0.9em;
    line-height: 1.4;
}

.kanban-board-digest-label {
    font-size: 0.75em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #8eb4c9;
    margin-bottom: 6px;
}

.kanban-board-digest ul {
    margin: 0;
    padding-left: 1.15em;
}

.kanban-board-digest li {
    margin: 0.2em 0;
}

.kanban-board-digest li.kanban-board-digest-urgent {
    color: #f5c26b;
    font-weight: 700;
}

/* Tucked-up Green Filter Toolbar */
.kanban-filter-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    background-color: #99cc66;
    padding: 8px 15px;
    border-radius: 4px;
    border-bottom: 3px solid #fbb03b;
}

.kanban-filter-label {
    font-size: 0.85em;
    font-weight: bold;
    color: #333333;
    margin-right: 5px;
}

.kanban-filter-assignee-label {
    margin-left: 10px;
    padding-left: 10px;
    border-left: 2px solid rgba(51, 51, 51, 0.35);
}

.filter-btn {
    background: #333333;
    color: #99cc66;
    border: 1px solid #333333;
    padding: 5px 12px;
    font-size: 0.85em;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}

.filter-btn:hover {
    background: #ffffff;
    color: #333333;
}

.filter-btn.active {
    background: #ffffff;
    color: #333333;
    border-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.block-toggle-btn {
    background: #333333;
    color: #fbb03b;
    border: 1px solid #fbb03b;
    padding: 3px 8px;
    font-size: 0.75em;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
}
.block-toggle-btn.is-blocked {
    background: #fbb03b;
    color: #333333;
    border-color: #e59d2a;
}

/* Forms & Panels */
.kanban-panel-box {
    display: none;
    background: #2a2a2a;
    color: #fff;
    padding: 20px;
    border: 1px solid #444;
    border-top: 3px solid #94b2b5;
    margin-bottom: 25px;
    border-radius: 6px;
}

.kanban-form-container {
    display: none;
    background: #2a2a2a;
    color: #fff;
    padding: 20px;
    border: 1px solid #444;
    border-top: 3px solid #99cc66;
    margin-bottom: 25px;
    border-radius: 6px;
}

.kanban-modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
}

.kanban-modal-content {
    background: #2a2a2a;
    color: #fff;
    padding: 25px;
    border: 1px solid #444;
    border-top: 4px solid #fbb03b;
    width: 100%;
    max-width: 450px;
    border-radius: 6px;
}

/* =================================================
        Responsive Design
================================================= */

@media screen and (max-width: 1100px) {
    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 900px) {
    .hero-text h1 { font-size: 2.2rem; }
    .hero-content-container {
        padding: 3rem 1rem 1.5rem 1rem;
        flex-direction: column;
        align-items: flex-start;
    }
    .header-nav-container, .hero-content-container, .footer-content {
        max-width: 100%;
        padding: 0 1rem;
    }
    .footer-content { justify-content: center; }
    .footer-content p { text-align: center; }
    .back-to-top {
        right: 50%;
        transform: translateX(50%);
        top: -28px;
    }
}

@media screen and (max-width: 600px) {
    .hero-text h1 { font-size: 1.7rem; }
    .hero-text p { font-size: 0.9rem; }
    .nav-left a, .nav-left span { font-size: 0.95rem; }
    .site-main { padding: 1rem 0.75rem 3rem 0.75rem; }
    .kanban-board { grid-template-columns: 1fr; }
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media screen and (max-width: 768px) {
    .admin-grid { grid-template-columns: 1fr; }
    body { padding: 10px; }
    .kanban-header-bar { flex-direction: column; align-items: stretch; }
    .kanban-header-actions, .kanban-login-inline { flex-direction: column; width: 100%; }
    .kanban-login-inline select, 
    .kanban-login-inline input, 
    .kanban-login-inline button { width: 100% !important; box-sizing: border-box; }
    .kanban-header-actions button, 
    .kanban-header-actions form { width: 100%; }
}

/* =================================================
        Due Date Left Border Indicators
================================================= */
.task-card {
    border-left-width: 6px !important;
    border-left-style: solid !important;
}

.task-card.border-red {
    border-left-color: #d9534f !important;
}

.task-card.border-orange {
    border-left-color: #fbb03b !important;
}

.task-card.border-green {
    border-left-color: #99cc66 !important;
}

/* Per-viewer "Updated" chip (unread activity from someone else) */
.task-card.has-unread-update .task-card-meta {
    padding-right: 4.75em;
}

.task-updated-chip {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    background: #1f5f74;
    color: #fff;
    font-size: 0.65em;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 3px 7px;
    border-radius: 3px;
    line-height: 1.2;
    pointer-events: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.task-card.card-overdue .task-updated-chip {
    background: #8a3a12 !important;
    color: #ffe6cc !important;
}

.task-card.is-blocked-card .task-updated-chip {
    opacity: 0.95;
}

/* Enable text selection and clipboard paste on mobile devices */
input, textarea {
    -webkit-user-select: text !important;
    user-select: text !important;
    -webkit-touch-callout: default !important;
}
