body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: #fafafb;
    color: #222;
}

/* Контейнер */
.stocks-wrapper {
    background: #fff;
    width: 1000px;
    max-width: 100%;
    margin: 40px auto;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

/* Заголовок */
.page-title {
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
    color: #222;
}

/* Форма */
.form-block {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    flex-direction: column;
}
.form-label {
    font-size: 14px;
    color: #555;
}
.form-select {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 15px;
    flex: 1;
}

/* Поиск + кнопки */
.controls {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}
.search-input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 15px;
}

/* Кнопки */
button {
    padding: 10px 20px;
    font-size: 15px;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s ease;
}
.btn-primary {
    background-color: #E91E63;
    color: #fff;
}
.btn-primary:hover {
    background-color: #c2185b;
}
.btn-secondary {
    background-color: #383d45;
    color: #fff;
}
.btn-secondary:hover {
    background-color: #21252a;
}

/* Статусы */
.status-message {
    text-align: center;
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 8px;
    display: none;
}
.status-ready {
    background: #e8f6f6;
    color: #222;
}
.status-loading {
    background: #fce2eb;
    color: #222;
}
.status-error {
    background: #f8d7da;
    color: #721c24;
}

/* Анимация загрузки */
.loader-anim {
  display: inline-block;
  font-size: 16px;
  position: relative;
  padding-left: 25px;
}
.loader-anim::before {
  content: "⏳";
  position: absolute;
  left: 0;
  animation: spin 1.5s linear infinite;
}
@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Таблица */
.stocks-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    overflow-x: auto;
}
.stocks-table th, .stocks-table td {
    padding: 10px 14px;
    border: 1px solid #eee;
    text-align: left;
}
.stocks-table th {
    background: #f5f5f5;
    font-weight: 600;
}
.stocks-table tr:nth-child(even) {
    background: #fafafa;
}
.stocks-table tr:hover {
    background: #f9f9f9;
}
.link-open {
    color: #3F51B5;
    text-decoration: none;
    /* font-weight: 500; */
}
.link-open:hover {
    text-decoration: underline;
}

/* 📱 Мобильная адаптация */
@media screen and (max-width: 768px) {
    .stocks-wrapper {
        padding: 20px;
        margin: 20px;
        width: auto;
    }
    .form-block, .controls {
        flex-direction: column;
        align-items: stretch;
    }
    .form-select, .search-input, button {
        width: 100%;
    }
    .page-title {
        font-size: 20px;
    }
    .stocks-table {
        font-size: 14px;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    .stocks-table th, .stocks-table td {
        padding: 8px 10px;
    }
}
