:root {
    --bg-color: #050505;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;

    --col-todo: #ffffff;
    --col-processing: #00f0ff;
    --col-testing: #ff0099;
    --col-done: #00ff00;

    /* Category Colors */
    --cat-hardware: #ff0099;
    /* Pink */
    --cat-software: #39ff14;
    /* Green */
    --cat-hitech: #00f0ff;
    /* Blue */
    --cat-specials: #ffea00;
    /* Yellow */
    --cat-others: #ff9100;
    /* Orange */

    --font-main: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow: hidden;
    /* Prevent body scroll, handle in containers */
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.app-header {
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
    z-index: 10;
}

.logo {
    height: 32px;
    margin-right: 15px;
}

.user-info {
    margin-left: auto;
    font-size: 0.9rem;
    color: var(--col-processing);
    font-weight: 500;
}

.app-header h1 {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: linear-gradient(90deg, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Board Layout */
.board {
    flex: 1;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    /* Hide scrollbar */
    scrollbar-width: none;
}

.board::-webkit-scrollbar {
    display: none;
}

.column {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 10px;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(0, 0, 0, 0) 100%);
    transition: background 0.3s;
}

.column:nth-child(even) {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(0, 0, 0, 0) 100%);
}

.column:last-child {
    border-right: none;
}

/* Mobile specific: One column per view */
@media (max-width: 768px) {
    .board {
        scroll-snap-type: x mandatory;
    }

    .column {
        min-width: 100vw;
        width: 100vw;
        scroll-snap-align: start;
        padding: 20px;
    }
}

/* Desktop specific: All columns visible */
@media (min-width: 769px) {
    .column {
        flex: 1;
        min-width: 250px;
    }
}



.login-footer {
    margin-top: 20px;
    color: #666;
    font-size: 0.8rem;
    text-align: center;
}

.column-header {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px;
}

.column-header h2 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
}

.column[data-status="todo"] .column-header h2 {
    border-bottom: 2px solid var(--col-todo);
}

.column[data-status="processing"] .column-header h2 {
    border-bottom: 2px solid var(--col-processing);
    color: var(--col-processing);
}

.column[data-status="testing"] .column-header h2 {
    border-bottom: 2px solid var(--col-testing);
    color: var(--col-testing);
}

.column[data-status="done"] .column-header h2 {
    border-bottom: 2px solid var(--col-done);
    color: var(--col-done);
}

.count {
    font-size: 0.8rem;
    background: var(--card-border);
    padding: 2px 8px;
    border-radius: 10px;
}

.task-list {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 80px;
    /* Space for FAB */
}

/* Tasks */
.task-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 15px;
    margin-bottom: 12px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.task-card:active {
    transform: scale(0.98);
}

.task-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.task-card.cat-hardware::before {
    background-color: var(--cat-hardware);
    box-shadow: 0 0 10px var(--cat-hardware);
}

.task-card.cat-software::before {
    background-color: var(--cat-software);
    box-shadow: 0 0 10px var(--cat-software);
}

.task-card.cat-hitech::before {
    background-color: var(--cat-hitech);
    box-shadow: 0 0 10px var(--cat-hitech);
}

.task-card.cat-specials::before {
    background-color: var(--cat-specials);
    box-shadow: 0 0 10px var(--cat-specials);
}

.task-card.cat-others::before {
    background-color: var(--cat-others);
    box-shadow: 0 0 10px var(--cat-others);
}

.task-text {
    color: #eee;
    font-size: 0.95rem;
    line-height: 1.4;
    word-break: break-word;
    /* Handle long words */
}

.task-desc {
    font-size: 0.85rem;
    color: #bbb;
    margin-top: 8px;
    padding-left: 10px;
    border-left: 3px solid rgba(255, 255, 255, 0.3);
    font-style: italic;
    white-space: pre-wrap;
    display: block;
    overflow: hidden;
    max-height: 80px;
    /* Fallback clamping */
}

/* Card Metadata */
.task-meta {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.task-badges {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 3px;
}

.badge-hours {
    border: 1px solid var(--col-processing);
    color: var(--col-processing);
}

.badge-price {
    border: 1px solid var(--col-done);
    color: var(--col-done);
}

.badge-invoiced {
    background: var(--col-done);
    color: black;
    font-weight: bold;
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00f0ff, #0055ff);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
    border: none;
    color: white;
    font-size: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 100;
    transition: transform 0.3s;
}

.fab:hover {
    transform: scale(1.1) rotate(90deg);
}

/* Modal */
.hidden {
    display: none !important;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #151515;
    width: 90%;
    max-width: 400px;
    padding: 25px;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.modal-content h2 {
    margin-bottom: 20px;
    font-weight: 500;
}

.modal-content input[type="text"],
.modal-content input[type="password"],
.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    background: #222;
    border: 1px solid #333;
    padding: 12px;
    color: white;
    border-radius: 8px;
    margin-bottom: 20px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.modal-content textarea {
    width: 100%;
    background: #222;
    border: 1px solid #333;
    padding: 12px;
    color: white;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    resize: vertical;
    transition: border-color 0.3s;
    min-height: 80px;
}

.modal-content textarea:focus {
    border-color: var(--col-processing);
}

.modal-content input:focus,
.login-form input:focus {
    border-color: var(--col-processing);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.category-select p {
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.radio-label:hover {
    background: rgba(255, 255, 255, 0.05);
}

.radio-label input {
    margin-right: 10px;
    accent-color: white;
}

.radio-label span {
    font-size: 0.9rem;
}

.category-hardware span {
    color: var(--cat-hardware);
}

.category-software span {
    color: var(--cat-software);
}

.category-hitech span {
    color: var(--cat-hitech);
}

.category-specials span {
    color: var(--cat-specials);
}

.category-others span {
    color: var(--cat-others);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-family: inherit;
    transition: opacity 0.2s;
}

.btn:active {
    opacity: 0.7;
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--card-border);
}

.btn-primary {
    background: white;
    color: black;
}

.btn-large {
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
    margin-top: 10px;
    background: linear-gradient(90deg, #fff, #ddd);
}

.btn-large:hover {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* Login Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000000 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.login-content {
    text-align: center;
    width: 90%;
    max-width: 350px;
    animation: fadeIn 0.5s ease-out;
}

.login-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.4));
}

.login-content h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 40px;
    letter-spacing: 4px;
    text-transform: uppercase;
    background: linear-gradient(90deg, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-form {
    background: rgba(255, 255, 255, 0.03);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.error-msg {
    color: #ff3333;
    margin-bottom: 15px;
    font-size: 0.9rem;
    min-height: 20px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Detail Modal Styles */
.detail-content {
    max-width: 500px;
    position: relative;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow-y: auto;
}

.detail-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 15px;
}

.meta-tag {
    text-transform: uppercase;
    font-weight: 700;
}

.field-group {
    margin-bottom: 15px;
}

.field-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.checkbox-group input {
    width: 20px;
    height: 20px;
    accent-color: var(--col-done);
    margin: 0;
}

.space-between {
    justify-content: space-between;
}

.action-right {
    display: flex;
    gap: 10px;
}

.close-corner {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

.close-corner:hover {
    color: white;
}

.btn-danger {
    background: rgba(255, 0, 0, 0.1);
    color: #ff3333;
    border: 1px solid #ff3333;
}

.btn-danger:hover {
    background: rgba(255, 0, 0, 0.2);
}

/* Task Badges */
.task-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-hours {
    background: rgba(0, 240, 255, 0.2);
    color: #00f0ff;
    border: 1px solid rgba(0, 240, 255, 0.4);
}

.badge-price {
    background: rgba(0, 255, 0, 0.2);
    color: #00ff00;
    border: 1px solid rgba(0, 255, 0, 0.4);
}

.badge-invoiced {
    background: rgba(0, 255, 0, 0.3);
    color: #00ff00;
    border: 1px solid #00ff00;
}

.badge-pending {
    background: rgba(255, 165, 0, 0.3);
    color: #ffa500;
    border: 1px solid #ffa500;
}