* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(120, 80, 255, 0.28), transparent 35%),
        radial-gradient(circle at bottom right, rgba(0, 220, 255, 0.18), transparent 35%),
        #070914;
    color: #f5f7ff;
    font-family: Arial, Helvetica, sans-serif;
}

.stock-widget {
    max-width: 1500px;
    margin: 30px auto;
    padding: 24px;
}

.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.widget-header h1 {
    margin: 0;
    font-size: 34px;
}

.widget-header p {
    margin: 6px 0 0;
    color: #aeb7d8;
}

.btn-primary {
    border: 0;
    border-radius: 14px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #7c4dff, #00d4ff);
    color: white;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 22px rgba(0, 212, 255, 0.28);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 32px rgba(124, 77, 255, 0.45);
}

.btn-primary.full {
    width: 100%;
    margin-top: 14px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 22px;
}

.summary-card,
.table-card,
.modal {
    background: rgba(18, 22, 42, 0.72);
    border: 1px solid rgba(140, 160, 255, 0.22);
    border-radius: 22px;
    backdrop-filter: blur(14px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.summary-card {
    padding: 20px;
}

.summary-card span {
    display: block;
    color: #aeb7d8;
    font-size: 14px;
    margin-bottom: 10px;
}

.summary-card strong {
    font-size: 25px;
}

.summary-card small {
    display: block;
    margin-top: 8px;
    color: #7fdfff;
}

.account-card {
    cursor: pointer;
}

.account-card:hover {
    border-color: rgba(0, 212, 255, 0.55);
    box-shadow: 0 0 35px rgba(0, 212, 255, 0.18);
}

.table-card {
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    color: #93a0c8;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(255, 255, 255, 0.04);
}

th,
td {
    padding: 15px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

td small {
    color: #9ca7ca;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.035);
}

.positive {
    color: #39ff9f;
}

.negative {
    color: #ff5f7a;
}

/* Modal */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.68);
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.modal-backdrop.show {
    display: flex;
}

.modal {
    width: 440px;
    max-width: 100%;
    padding: 22px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-wide {
    width: 1100px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.modal-header h2 {
    margin: 0;
}

.modal-header button {
    border: 0;
    background: transparent;
    color: white;
    font-size: 32px;
    cursor: pointer;
}

label {
    display: block;
    margin: 14px 0 6px;
    color: #b8c1df;
    font-size: 14px;
}

input,
select {
    width: 100%;
    border: 1px solid rgba(140, 160, 255, 0.25);
    border-radius: 12px;
    padding: 11px 12px;
    background: rgba(5, 8, 20, 0.8);
    color: white;
    outline: none;
}

input:focus,
select:focus {
    border-color: #00d4ff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.12);
}

.account-start {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 16px;
    margin-bottom: 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 1000px) {
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .widget-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
.stock-search-wrapper {
    position: relative;
}

.stock-search-results {
    margin-top: 10px;
    max-height: 240px;
    overflow-y: auto;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(8, 10, 20, 0.95);
}

.stock-result-item {
    padding: 12px 14px;
    cursor: pointer;
    transition: 0.15s;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.stock-result-item:hover {
    background: rgba(0,212,255,0.12);
}

.stock-result-item.hidden {
    display: none;
}

.selected-stock {
    margin-top: 10px;
    color: #7fdfff;
    font-size: 14px;
}
.live-status {
    margin-top: 6px;
    color: #7fdfff;
    font-size: 14px;
}

.stock-change {
    font-weight: 700;
    white-space: nowrap;
}