/* assets/css/style.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --topbar-bg: #026aa7;
    --bg: #f4f5f7;
    --surface: #ffffff;
    --col-bg: #ebecf0;
    --border: #dfe1e6;
    --text: #172b4d;
    --text-muted: #5e6c84;
    --brand: #0079bf;
    --danger: #de350b;
    --ok: #36b37e;
    --p-high: #ff5630;
    --p-med: #ffab00;
    --p-low: #36b37e;
}

body {
    font-family: 'Nunito', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    overflow-x: hidden;
}

.hidden { display: none !important; }

/* Top Bar */
.topbar {
    background: var(--topbar-bg);
    height: 48px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left { display: flex; align-items: center; gap: 8px; }
.topbar-center { flex: 1; display: flex; justify-content: center; }
.topbar-right { display: flex; align-items: center; gap: 6px; }

.topbar-logo {
    width: 32px; height: 32px;
    background: rgba(255,255,255,.22);
    color: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
}

.topbar-name {
    color: rgba(255,255,255,.9);
    font-weight: 700;
    font-size: 15px;
}

.search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 9px;
    font-size: 13px;
    opacity: .7;
    color: white;
}

.search-wrap input {
    background: rgba(255,255,255,.2);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 4px;
    color: white;
    width: 220px;
    padding: 5px 10px 5px 28px;
    font-family: inherit;
    font-size: 13px;
    outline: none;
}

.search-wrap input::placeholder { color: rgba(255,255,255,.65); }
.search-wrap input:focus { background: rgba(255,255,255,.3); width: 260px; }

.user-badge {
    background: rgba(255,255,255,.18);
    color: rgba(255,255,255,.9);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
}

/* Buttons */
.btn-topbar-primary {
    background: rgba(255,255,255,.2);
    color: white;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 4px;
    padding: 5px 12px;
    font-family: inherit;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}

.btn-topbar-ghost {
    background: transparent;
    color: rgba(255,255,255,.85);
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 5px 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

.btn-topbar-icon {
    background: transparent;
    color: rgba(255,255,255,.85);
    border: none;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    font-size: 13px;
    transition: all .15s;
}

.btn-primary {
    background: var(--brand);
    color: white;
}
.btn-primary:hover { background: var(--topbar-bg); }

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}
.btn-ghost:hover { background: var(--border); }

.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger-ghost {
    background: transparent;
    color: var(--danger);
    border: 1px solid rgba(222,53,11,.3);
}
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* More Menu */
.more-menu-wrap { position: relative; }

.more-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(9,30,66,.16);
    min-width: 200px;
    z-index: 200;
    border: 1px solid var(--border);
    overflow: hidden;
}

.more-menu-item {
    padding: 9px 14px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
}
.more-menu-item:hover { background: #e9f2ff; color: var(--brand); }
.more-menu-item.danger { color: var(--danger); }
.more-menu-divider { height: 1px; background: var(--border); margin: 3px 0; }

/* Filter Strip */
.filter-strip {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.chip-group { display: flex; gap: 4px; }

.chip {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px 12px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip-active {
    background: var(--brand);
    border-color: var(--brand);
    color: white;
}

.toggle-pill {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
}

/* Board */
.view { display: none; }
.view.active { display: block; }

.board {
    display: flex;
    gap: 12px;
    padding: 16px 12px;
    overflow-x: auto;
    align-items: flex-start;
    min-height: calc(100vh - 96px);
}

.col {
    min-width: 272px;
    width: 272px;
    background: var(--col-bg);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 110px);
}

.col.drag-over {
    box-shadow: 0 0 0 2px var(--brand);
    background: #e2edff;
}

.col-header {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: var(--col-bg);
    border-radius: 12px 12px 0 0;
}

.col-title-wrap { display: flex; align-items: center; gap: 8px; }
.col-title { font-size: 13px; font-weight: 800; }
.col-count {
    background: var(--border);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    padding: 1px 7px;
}

.col-add-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.col-body {
    padding: 4px 8px 8px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(9,30,66,.12);
    padding: 10px 12px;
    cursor: pointer;
    position: relative;
    border-left: 3px solid transparent;
    transition: all .15s;
}

.card:hover { box-shadow: 0 4px 12px rgba(9,30,66,.16); transform: translateY(-2px); }
.card.dragging { opacity: .45; transform: rotate(1deg) scale(.97); }

.card[data-priority="high"] { border-left-color: var(--p-high); }
.card[data-priority="med"] { border-left-color: var(--p-med); }
.card[data-priority="low"] { border-left-color: var(--p-low); }

.card-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 5px;
}
.card-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.chip-sm {
    font-size: 11px;
    font-weight: 700;
    border-radius: 3px;
    padding: 2px 6px;
}
.chip-high { background: #fce8e3; color: var(--p-high); }
.chip-med { background: #fff4e0; color: #974f00; }
.chip-low { background: #e3faf0; color: #1b7a4e; }
.chip-user { background: #e9f2ff; color: #026aa7; }
.chip-attach { background: #f0e9ff; color: #5e35b1; }
.chip-collab { background: #e8f5e9; color: #2e7d32; }

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    padding-top: 7px;
    font-size: 11px;
    color: var(--text-light);
}

.card-kebab {
    position: absolute;
    top: 7px;
    right: 7px;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 16px;
    cursor: pointer;
    width: 26px;
    height: 26px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .15s;
    z-index: 2;
}

.card:hover .card-kebab { opacity: 1; }
.card-kebab:hover { background: var(--border); }

.col-add-task-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 8px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    text-align: left;
}
.col-add-task-btn:hover { background: var(--col-hover); }

/* Modal */
.overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(9,30,66,.54);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.overlay.active { display: flex; }

.modal {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 660px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 30px rgba(9,30,66,.22);
}

.modal-header {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 { font-size: 16px; font-weight: 800; }

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-close:hover { background: var(--border); color: var(--danger); }

.modal-body {
    padding: 16px 18px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 12px 18px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Forms */
.field-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 13px;
}

.field-group > label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.form-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

input, textarea, select {
    background: white;
    border: 2px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    padding: 7px 10px;
    font-family: inherit;
    font-size: 13px;
    transition: all .15s;
    width: 100%;
    outline: none;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(0,121,191,.12);
}

textarea { resize: vertical; min-height: 72px; }

/* Notifications */
.notification-badge { position: relative; }

.notification-badge .count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.notification-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(9,30,66,.16);
    border: 1px solid var(--border);
    z-index: 1000;
    display: none;
}

.notification-panel.show { display: block; }

.notification-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-header h3 { font-size: 14px; font-weight: 700; }
.notification-header a { font-size: 12px; color: var(--brand); text-decoration: none; }

.notification-list { max-height: 300px; overflow-y: auto; }

.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background .15s;
}
.notification-item:hover { background: #e9f2ff; }
.notification-item.unread {
    background: #f4f5f7;
    border-left: 3px solid var(--brand);
}

.notification-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 3px;
}
.notification-message {
    font-size: 12px;
    color: var(--text-muted);
}
.notification-time {
    font-size: 10px;
    color: var(--text-light);
    margin-top: 5px;
}
.notification-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-light);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    background: var(--text);
    color: white;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 8px 30px rgba(9,30,66,.22);
    animation: scaleIn .2s ease;
}
.toast.ok { background: var(--ok); }
.toast.err { background: var(--danger); }
.toast.info { background: var(--brand); }

/* Animations */
@keyframes scaleIn {
    from { transform: scale(.94); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}