﻿.side-card {
    position: fixed;
    right: -460px;
    top: 0;
    width: 440px;
    height: 100%;
    background: #fff;
    box-shadow: -2px 0 14px rgba(0,0,0,0.25);
    transition: right 0.3s ease;
    z-index: 100;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    font-family: "Segoe UI", Roboto, sans-serif;
}

    .side-card.open {
        right: 0;
    }
#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 99;
}
/* Header картки */
.side-card .card-header {
    padding: 14px 16px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.side-card .status-badge {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
}
.side-card .close-btn {
    border: none;
    background: none;
    font-size: 18px;
    cursor: pointer;
}

/* Тіло картки */
.side-card .card-body {
    padding: 15px;
    flex: 1;
    overflow-y: auto;
}

.side-card section {
    margin-bottom: 20px;
}

.side-card h4 {
    margin: 10px 0;
    font-size: 14px;
    color: #444;
}
/* Іконки */
.side-card section p i,
.side-card .files li i {
    width: 18px;
    margin-right: 8px;
    text-align: center;
}
/* Файли */
.side-card .files li {
    margin: 6px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.side-card .files i {
    color: #1976d2;
}

.side-card .files button.download {
    border: none;
    background: #eee;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
}
/* textarea */
.side-card textarea {
    width: 100%;
    min-height: 60px;
    resize: vertical;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px;
}
/* Збереження примітки */
.side-card .save-note {
    margin-top: 8px;
    padding: 6px 10px;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
/* Footer */
.side-card .card-footer {
    padding: 10px;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 10px;
}

    .side-card .card-footer button {
        flex: 1;
        padding: 8px;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        transition: background 0.2s ease;
    }

    .side-card .card-footer .edit {
        background: #1976d2;
        color: #fff;
    }

        .side-card .card-footer .edit:hover {
            background: #0d47a1;
        }

    .side-card .card-footer .deal {
        background: #43a047;
        color: #fff;
    }

        .side-card .card-footer .deal:hover {
            background: #2e7d32;
        }
/* Загальні іконки */
.side-card p.author i {
    color: #3f51b5;
}

.side-card p.manager i {
    color: #2196f3;
}

.side-card p.dealer i {
    color: #e53935;
}

.side-card p.address i {
    color: #43a047;
}
/* Сума угоди */
.side-card p.suma-deal i {
    color: #ff9800;
}
/* Джерело */
.side-card p.source i {
    color: #ff9800;
}

/* Спроби */
.side-card p.attempts i {
    color: #9c27b0;
}
/* Показати / приховати */
.side-card .show-more,
.side-card .hide-more {
    margin-top: 6px;
    cursor: pointer;
    background: none;
    border: none;
    color: #2196f3;
    font-weight: 500;
    transition: color 0.2s ease;
}

    .side-card .show-more:hover,
    .side-card .hide-more:hover {
        color: #1565c0;
    }
.side-card.files li i {
    color: #1976d2;
}
.side-card .add-button {
    border: none;
    background: #1976d2;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    margin-left: 10px;
}

    .side-card .add-button:hover {
        background: #125a9c;
    }
.side-card .status-new {
    background: #e3f2fd;
    color: #1565c0;
}

.side-card .status-qualified {
    background: #e8f5e9;
    color: #2e7d32;
}

.side-card .status-converted {
    background: #ede7f6;
    color: #5e35b1;
}

.side-card .status-lost {
    background: #ffebee;
    color: #c62828;
}


.side-card .timeline {
    list-style: none;
    padding: 0;
    border-left: 2px solid #1976d2;
    margin-left: 10px;
}

    .side-card .timeline li {
        margin: 8px 0;
        padding-left: 12px;
        position: relative;
    }

        .side-card .timeline li::before {
            content: "";
            position: absolute;
            left: -7px;
            top: 6px;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #1976d2;
        }

        .side-card .timeline li i {
            color: #1976d2;
            margin-right: 6px;
        }