.task-list-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background: #1e1e2f;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    padding: 1rem;
    max-width: 420px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #eee;
    z-index: 9999;
    user-select: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.task-list-container:empty {
    display: none;
}

.task-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.task-title {
    font-weight: 600;
    font-size: 1rem;
    color: #b0c4ff;
    margin: 0;
}

.task-bar {
    height: 14px;
    background-color: #2c2c44;
    border-radius: 7px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

.task-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3a8dff, #005ecb);
    box-shadow:
        0 0 8px #3a8dff,
        inset 0 0 6px #005ecb;
    transition: width 0.25s ease;
}

.task-info {
    font-size: 0.85rem;
    color: #c0c4d8;
    text-align: right;
    user-select: text;
}
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    overflow-y: auto;
    padding: 0.5rem;
}

.grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-align: center;
    font-size: 0.9rem;
}

.grid-item:hover {
    background-color: #e9ecef;
}

.grid-item.task-in-progress {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.grid-item-name-input {
    width: 100%;
    font: inherit;
    text-align: center;

    border: 1px solid #3366cc;
    border-radius: 4px;

    padding: 2px 4px;

    box-sizing: border-box;
}

.grid-item-error {
    margin-top: 4px;

    color: #d00;

    font-size: 0.75rem;

    text-align: center;

    word-break: break-word;
}

/* Затемнение */
.grid-item.task-in-progress::before {
    content: '';
    position: absolute;
    inset: 0;

    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;

    z-index: 10;
}

/* Спиннер */
.grid-item.task-in-progress::after {
    content: '';

    position: absolute;
    top: 50%;
    left: 50%;

    width: 24px;
    height: 24px;

    margin-left: -12px;
    margin-top: -12px;

    border: 3px solid #ccc;
    border-top-color: #3366cc;
    border-radius: 50%;

    animation: task-spinner 1s linear infinite;

    z-index: 11;
}

@keyframes task-spinner {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.grid-empty {
    color: #777;
    font-style: italic;
    justify-content: center;
    align-items: center;
    display: flex;
}

.grid-item-name {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: relative;
}

.grid-icon {
    font-size: 2rem;
    color: #3366cc;
    margin-bottom: 0.25rem;
}

.grid-delete-button {
    margin-top: 0.5rem;
    font-size: 0.7rem;
    color: #d00;
    background: none;
    border: none;
    cursor: pointer;
}

.box-id {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.folder-path {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #444;
    background: #f0f0f0;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    display: inline-block;
    max-width: 100%;
    overflow-x: auto;
}

.context-menu {
    min-width: 180px;
    background: white;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    padding: 0.25rem;
}

.context-menu-item {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

.context-menu-item:hover {
    background-color: #e9ecef;
}

.context-menu-item[data-highlighted] {
    background-color: #e9ecef;
    outline: none;
}
.container {
    display: flex;
    flex-direction: column;
    height: 100%; /* занимает всё доступное от layout */
    width: 100%;
    padding: 1rem;
    box-sizing: border-box;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.title {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    color: #333;
    flex-shrink: 0;
}

.boxArea {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    flex-grow: 1;
    overflow-y: auto; /* прокрутка если боксов много */
    padding-right: 0.5rem; /* чтобы не прилипали к краю скролла */
}

.boxCard {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    border-radius: 10px;
    background-color: #f1f3f5;
    text-decoration: none;
    color: #333;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.boxCard:hover {
    background-color: #e9ecef !important;
    cursor: pointer;
}
.layout {
    display: flex;
    height: 100vh;
    background-color: #f0f0f0;
    font-family: sans-serif;
}

.sidebar {
    width: 240px;
    background-color: #2d2d2d;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar-header {
    padding: 16px;
    font-size: 20px;
    font-weight: bold;
    border-bottom: 1px solid #444;
}

.nav {
    display: flex;
    flex-direction: column;
    padding: 8px;
}

.nav-link {
    padding: 10px 16px;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin-bottom: 4px;
}

.nav-link:hover {
    background-color: #444;
}

.nav-link.active {
    background-color: #555;
    font-weight: bold;
}

.logout-container {
    padding: 16px;
    border-top: 1px solid #444;
}

.logout-button {
    width: 100%;
    padding: 10px;
    background-color: #d9534f;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.logout-button:hover {
    background-color: #c9302c;
}

.content {
    flex-grow: 1;
    overflow: auto;
    padding: 24px;
    box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
}

.controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
    flex-wrap: wrap;
}

.text-input,
.file-input {
    padding: 0.4rem 0.6rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.9rem;
}

.action-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.action-button:hover {
    background-color: #0056b3;
}

.action-button:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

.error-message {
  color: red;
}


