/* ============================================
   EVE AND CO - Cyriaque
   ============================================ */

:root {
    --cloud: #F5F3EF;
    --cloud-light: #FAFAF8;
    --pure: #FFFFFF;
    --glass: rgba(255, 255, 255, 0.55);
    --glass-border: rgba(255, 255, 255, 0.8);
    --text: #1A1A1A;
    --text-soft: #555555;
    --text-muted: #999999;
    --accent: #1A1A1A;
    --success: #D4A74A;
    --danger: #D64545;
}

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

html {
    overflow-y: scroll;
    overflow-x: hidden;
    height: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(160deg, var(--cloud) 0%, var(--cloud-light) 40%, var(--pure) 100%);
    background-attachment: fixed;
    min-height: 100%;
    color: var(--text);
    font-weight: 400;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.glass {
    background: var(--glass);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
}

header {
    position: relative;
    width: 100%;
    z-index: 1000;
    padding-top: 20px;
}

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

nav {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

nav a {
    text-decoration: none;
}

nav button {
    background: transparent;
    border: none;
    padding: 10px 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-soft);
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

nav button:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.5);
}

nav button.active {
    background: var(--pure);
    color: var(--text);
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

nav button.logo-btn {
    font-weight: 700;
    font-size: 14px;
    letter-spacing: -0.3px;
}

.header-favorites {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    height: 59px;
    align-items: center;
}

.header-favorites .favorite-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.header-favorites .favorite-item:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.1);
}

.header-favorites .favorite-icon {
    width: 20px;
    height: 20px;
    border-radius: 3px;
}

main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 40px 60px;
    flex: 1;
    width: 100%;
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 6px;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* Greeting Phrase */
.greeting-phrase {
    max-width: 1400px;
    margin: 0 auto;
    padding: 23px 40px 15px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.greeting-phrase.visible {
    opacity: 1;
}

@keyframes silverShine {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 18px;
}

.control-card {
    padding: 20px;
}

.control-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.control-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

input,
select {
    flex: 1;
    min-width: 180px;
    padding: 12px 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--text);
}

#taskTitleInput {
    flex: 2;
    min-width: 260px;
}

#taskAssigneeSelect {
    flex: 0 0 120px;
    min-width: 110px;
    max-width: 140px;
    padding-right: 28px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    --select-arrow: var(--text);
    background-image:
        linear-gradient(45deg, transparent 50%, var(--select-arrow) 50%),
        linear-gradient(135deg, var(--select-arrow) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 12px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-primary {
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.btn-danger {
    border: none;
    background: transparent;
    color: var(--danger);
    cursor: pointer;
    font-size: 14px;
}

.inline-message {
    min-height: 18px;
    margin: 6px 0 18px;
    font-size: 12px;
    color: var(--text-muted);
}

.inline-message.error {
    color: var(--danger);
}

.inline-message.success {
    color: var(--success);
}

.board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.board-column {
    padding: 16px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.board-column.drag-over {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.column-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.member-remove {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.member-remove:hover {
    color: var(--danger);
    background: rgba(255, 255, 255, 0.95);
}

.column-title {
    font-size: 14px;
    font-weight: 600;
}

.column-count {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-soft);
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 120px;
}

.task-card {
    background: var(--pure);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    cursor: grab;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.task-title {
    font-size: 13px;
    color: var(--text);
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: calc(100% - 28px);
}

.empty-state {
    font-size: 12px;
    color: var(--text-muted);
    padding: 12px;
    border-radius: 12px;
    border: 1px dashed rgba(0, 0, 0, 0.15);
    text-align: center;
}

.empty-board {
    grid-column: 1 / -1;
    text-align: center;
    padding: 24px;
    border-radius: 16px;
    border: 1px dashed rgba(0, 0, 0, 0.15);
    color: var(--text-muted);
}

.history-section {
    margin-top: 22px;
    padding: 16px 20px;
}

.history-section.collapsed .history-list {
    display: none;
}

.history-section.collapsed {
    padding: 12px 16px;
}

.history-section.collapsed .history-header {
    margin-bottom: 0;
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.history-title {
    font-size: 14px;
    font-weight: 600;
}

.history-toggle {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.7);
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-toggle:hover {
    background: rgba(255, 255, 255, 0.95);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 260px;
    overflow: auto;
}

.history-item {
    align-items: center;
}

.history-item .task-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #E8C36A 0%, #D4A74A 100%);
    border: 1px solid #D4A74A;
    color: #fff;
}

.history-item .history-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    flex: 1;
}

.history-item .task-name {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 12.5px;
    line-height: 1.3;
}

.history-item .task-date {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

.history-item .task-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    font-weight: 200;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.5;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-item .task-delete:hover {
    opacity: 1;
    color: var(--danger);
}

/* Confirm popup (same style as Journal) */
.success-popup {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.success-popup.active {
    opacity: 1;
    pointer-events: auto;
}

.success-popup-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 26px 24px;
    width: 90%;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    transform: scale(0.95);
    transition: all 0.3s ease;
}

.success-popup.active .success-popup-content {
    transform: scale(1);
}

.success-popup-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.04);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.success-popup-icon img {
    width: 28px;
    height: 28px;
}

.success-popup-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.success-popup-message {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.popup-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.popup-btn-cancel,
.popup-btn-confirm {
    padding: 10px 18px;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.popup-btn-cancel {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--text-soft);
}

.popup-btn-cancel:hover {
    background: rgba(0, 0, 0, 0.08);
}

.popup-btn-confirm {
    border: none;
    background: #d64545;
    color: white;
}

.popup-btn-confirm:hover {
    background: #c62828;
}

.site-footer {
    padding: 30px 40px 40px;
}

.footer-bottom {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

.footer-logout {
    text-decoration: none;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.footer-logout:hover {
    color: var(--danger);
    text-shadow: 2px 0 var(--danger), -2px 0 #c77dff, 0 0 8px var(--danger);
}

/* Mobile Navigation */
.mobile-logo-btn {
    display: none;
    padding: 12px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.mobile-nav-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 16px 20px;
}

.close-mobile-nav {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: none;
    font-size: 18px;
    font-weight: 400;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-mobile-nav:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    padding: 8px 24px 16px;
    gap: 0;
}

.mobile-nav-links a {
    display: block;
    width: 100%;
    padding: 12px 20px;
    color: var(--text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active-link {
    background: rgba(0,0,0,0.04);
    color: var(--text);
}

.mobile-nav-favorites {
    padding: 16px 24px 30px;
    border-top: 1px solid rgba(0,0,0,0.06);
    margin-top: auto;
}

.mobile-nav-favorites-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.mobile-nav-favorites-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.mobile-nav-favorites-grid a {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    background: rgba(0,0,0,0.03);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.mobile-nav-favorites-grid a:hover {
    background: rgba(0,0,0,0.08);
    transform: scale(1.1);
}

.mobile-nav-favorites-grid img {
    width: 22px;
    height: 22px;
    border-radius: 4px;
}

.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
}

.mobile-nav-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.burger-menu-btn {
    display: none;
    cursor: pointer;
    padding: 14px;
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.2s ease;
}

.burger-menu-btn:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.burger-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 18px;
    height: 18px;
}

.burger-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

@media (max-width: 900px) {
    nav,
    .header-favorites {
        display: none;
    }
    .burger-menu-btn {
        display: flex;
    }
    .mobile-logo-btn {
        display: block;
    }
    .mobile-nav-overlay {
        display: block;
    }
    main {
        padding: 25px 20px 50px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 0;
    }
    .header-inner {
        padding: 16px 16px;
        flex-wrap: nowrap;
        gap: 12px;
        justify-content: space-between;
    }
    nav,
    .header-favorites {
        display: none;
    }
    .mobile-logo-btn {
        display: block;
    }
    .burger-menu-btn {
        display: flex;
    }
    .greeting-phrase {
        padding: 0 16px 16px;
    }
    main {
        padding: 20px 16px 40px;
    }
}
