body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #f0f4f8, #d9e2ec);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #333;
}

/* Предыдущий CSS + новые стили */

canvas {
    margin: 20px auto;
    display: block;
    max-width: 100%;
}

.btn.delete {
    background: #dc3545;
    padding: 14px 30px;
    font-weight: bold;
    font-size: 1em;
}
.btn.delete:hover {
    background: #c82333;
}

.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; }
.back { color: #007bff; text-decoration: none; font-size: 1.1em; }
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 30px; }
.portfolio-card { background: white; padding: 20px; border-radius: 12px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); text-decoration: none; color: #333; transition: transform 0.2s; }
.portfolio-card:hover { transform: translateY(-5px); }
.stats { margin-top: 15px; font-size: 0.95em; }
.profit { color: #28a745; }
.loss { color: #dc3545; }
.yield { font-weight: bold; margin-top: 8px; }

.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 15px; margin: 30px 0; }
.summary-card { background: white; padding: 20px; border-radius: 12px; text-align: center; box-shadow: 0 4px 10px rgba(0,0,0,0.1); font-size: 1.1em; }
.spent { border-left: 5px solid #dc3545; }
.received { border-left: 5px solid #28a745; }
.profit { border-left: 5px solid #ffc107; }
.yield { border-left: 5px solid #007bff; }
.positive { color: #28a745; }
.negative { color: #dc3545; }

.action-buttons { display: flex; gap: 15px; flex-wrap: wrap; margin: 20px 0; justify-content: center; }
.btn { padding: 14px 24px; border-radius: 8px; text-decoration: none; color: white; font-weight: bold; }
.btn.buy { background: #28a745; }
.btn.sell { background: #dc3545; }
.btn.coupon { background: #ffc107; color: #212529; }
.btn.redemption { background: #6610f2; }

.transactions { width: 100%; border-collapse: collapse; margin-top: 20px; }
.transactions th { background: #007bff; color: white; }
.transactions td, .transactions th { padding: 12px; border: 1px solid #ddd; }
.tr.buy { background: #d4edda; }
.tr.sell { background: #f8d7da; }
.tr.coupon { background: #fff3cd; }
.tr.redemption { background: #e2d9f3; }

.container {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

h1, h2 {
    color: #007bff;
    margin-bottom: 20px;
}

input {
    display: block;
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    transition: border 0.3s;
}

input:focus {
    border-color: #007bff;
    outline: none;
}

button, .button {
    background: #007bff;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin: 10px 5px;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s;
}

button:hover, .button:hover {
    background: #0056b3;
    transform: scale(1.05);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

th {
    background: #007bff;
    color: white;
}

.logout {
    background: #dc3545;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 20px;
    transition: background 0.3s;
}

.logout:hover {
    background: #c82333;
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
}