
:root {
--green: #27ae60;       
--green2: #2ecc71;     
--red: #e74c3c;
--blue: #2980b9;
--blue-light: #ebf5ff;   
--blue-green: #f0f9f0; 
--light-blue: #E8F0FE;
--dark-blue: #3367D6;
--gray1: #F5F5F5;
--grey: #afafaf;
--dark-gray: #757575;
--orange: #f39c12;

--red: #EA4335;
--yellow: #FBBC05;
--violet: #9966FF;
--light: #F5F6FA;
--accent-color: #FD79A8;
}

body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
margin: 0;
padding: 0;
background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
color: #333;
}
a { color:inherit; text-decoration: none }


.header {text-align: center;
margin-bottom: 30px;
padding: 20px;
background: white;
border-radius: 12px;
box-shadow: 0 4px 15px rgba(0,0,0,0.08);
width: 100%;} 


        /* ==================== СТИЛИ ==================== */
        :root {
            --primary-color: #3498db;
            --secondary-color: #2980b9;
            --success-color: #2ecc71;
            --danger-color: #e74c3c;
            --light-color: #f8f9fa;
            --dark-color: #343a40;
            --gray-color: #6c757d;
            --border-radius: 4px;
            --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        
        body {
            background-color: #f5f7fa;
            color: var(--dark-color);
            line-height: 1.6;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }
        
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;  width: 100%;  flex: 1;
        }
        
        header {
            background-color: white;
            box-shadow: var(--box-shadow);
            padding: 15px 0; margin-bottom: 24px; 
        }
        
        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .logo {
            font-size: 24px;
            font-weight: bold;
            color: var(--primary-color);
        }
        
        .auth-buttons {
            display: flex;
            gap: 10px;
        }
        
        .btn {
            padding: 8px 16px;
            border: none;
            border-radius: var(--border-radius);
            cursor: pointer;
            font-weight: 500;
            transition: all 0.3s ease;
        }
        
        .btn-primary {
            background-color: var(--primary-color);
            color: white;
        }
        
        .btn-primary:hover {
            background-color: var(--secondary-color);
        }
        
        .btn-outline {
            background-color: transparent;
            border: 1px solid var(--primary-color);
            color: var(--primary-color);
        }
        
        .btn-outline:hover {
            background-color: var(--primary-color);
            color: white;
        }
        
        .auth-container {
            width: 400px;
            margin: 50px auto;
            background-color: white;
            border-radius: 8px;
            box-shadow: var(--box-shadow);
            padding: 30px;
        }
        
        .auth-tabs {
            display: flex;
            margin-bottom: 20px;
            border-bottom: 1px solid #e0e0e0;
        }
        
        .auth-tab {
            padding: 10px 20px;
            cursor: pointer;
            font-weight: 500;
            color: var(--gray-color);
            transition: all 0.3s ease;
        }
        
        .auth-tab.active {
            color: var(--primary-color);
            border-bottom: 2px solid var(--primary-color);
        }
        
        .auth-form {
            display: none;
        }
        
        .auth-form.active {
            display: block;
        }
        
        .form-group {
            margin-bottom: 20px;
        }
        
        .form-label {
            display: block;
            margin-bottom: 5px;
            font-weight: 500;
        }
        
        .form-control {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: var(--border-radius);
            font-size: 16px;
        }
        
        .form-control:focus {
            outline: none;
            border-color: var(--primary-color);
        }
        
        .form-check {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
        }
        
        .form-check-input {
            margin-right: 8px;
        }
        
        .form-footer {
            margin-top: 20px;
            text-align: center;
        }
        
        .form-link {
            color: var(--primary-color);
            text-decoration: none;
        }
        
        .form-link:hover {
            text-decoration: underline;
        }
        
        .alert {
            padding: 10px 15px;
            border-radius: var(--border-radius);
            margin-bottom: 20px;
        }
        
        .alert-success {
            background-color: rgba(46, 204, 113, 0.1);
            border: 1px solid var(--success-color);
            color: var(--success-color);
        }
        
        .alert-danger {
            background-color: rgba(231, 76, 60, 0.1);
            border: 1px solid var(--danger-color);
            color: var(--danger-color);
        }
        
        footer {
            background-color: var(--dark-color);
            color: white;
            padding: 30px 0;
            margin-top: 50px;
        }
        
        .footer-content {
            display: flex;
            justify-content: space-between;
            flex-wrap: wrap;
        }
        
        .footer-section {
            flex: 1;
            min-width: 200px;
            margin-bottom: 20px;
        }
        
        .footer-section h3 {
            margin-bottom: 15px;
            font-size: 18px;
        }
        
        .footer-section ul {
            list-style: none;
        }
        
        .footer-section ul li {
            margin-bottom: 8px;
        }
        
        .footer-section a {
            color: #ddd;
            text-decoration: none;
        }
        
        .footer-section a:hover {
            color: white;
            text-decoration: underline;
        }
        
        .copyright {
            text-align: center;
            margin-top: 20px;
            padding-top: 20px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        @media (max-width: 768px) {
            .auth-container {
                margin: 20px auto;
                padding: 20px;
            }
            
            .footer-content {
                flex-direction: column;
            }
        }








h1 { color: #2c3e50; margin-bottom: 10px; font-weight: 700;}
.green { color:var(--green); }
.red { color:var(--red); }
.blue { color:var(--blue); }
.grey {  color:var(--grey);}
.orange { color:#f39c12; }


.BGgreen { background-color:var(--blue-green); }
.BGblue { background-color:var(--blue-light); }
.BGred {  background-color: #fff5f5; }
.BGorange {  background-color: #fff2e8; }
.BGwhite {  background-color: #fff; }


.subtitle {
color: #7f8c8d;
font-size: 1.1em;
max-width: 800px;
margin: 0 auto 20px;
}
.stats {
display: flex;
justify-content: center;
gap: 30px;
flex-wrap: wrap;
margin-top: 20px;
}
.stat-card {
background: #3498db;
color: white;
padding: 15px 25px;
border-radius: 10px;
text-align: center;
min-width: 180px;
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.stat-card:nth-child(2) {
background: var(--green2);
}
.stat-card:nth-child(3) {
background: var(--red);
}
.stat-value {
font-size: 1.8em;
font-weight: bold;
margin: 0 0 0 5px;
}
.stat-title {
font-size: 0.9em;
opacity: 0.9;
}
.bond-container {
border-radius: 12px;
box-shadow: 0 4px 15px rgba(0,0,0,0.08);
padding: 0;
margin-bottom: 25px;
overflow: hidden;
transition: all 0.3s ease;
}
.bond-header {position: relative;
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px;
cursor: pointer;
transition: background-color 0.2s;
}
.bond-header:hover {
background-color: #f8f9fa;
}
.bond-info {
flex: 1;
}
.name-ticker { max-width: 200px; position: relative; } 
.bond-repayment-date { font-size: 12px; color: var(--grey)}
.bond-name {
font-size: 1.4em;
font-weight: 600;
color: #2c3e50;
margin-bottom: 5px;
}
.bond-ticker {
font-size: 1.1em;
font-weight: 500;
color: #7f8c8d;
background: #f1f8ff;
padding: 3px 10px;
border-radius: 20px;
display: inline-block;
}
.bond-yield-real { text-align: center; }
.bond-prices { position: relative;
text-align: right;
min-width: 262px;
}
.bond-price {
font-size: 1.8em;
font-weight: 700;
color: var(--green);
margin-bottom: 5px;
}
.bond-price-nkd { color: var(--grey); font-size: 14px;}
.bond-yield {
font-size: 1.1em;
color: var(--red);
font-weight: 500;
}
.bond-coupon {
font-size: 1.1em;
color: var(--blue);
font-weight: 500;
margin-top: 5px;
}
.bond-arrow, .bond-star, .bond-heart, .bond-skull {
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
margin-left: 15px;
transition: transform 0.3s ease;
}
.bond-arrow svg {
width: 20px;
height: 20px;
fill: #7f8c8d;
}
.bond-container.expanded .bond-arrow {
transform: rotate(180deg);
}
.bond-content {
max-height: 0;
overflow: hidden;
transition: max-height 0.3s ease;
}
.bond-container.expanded .bond-content {
max-height: 1000px;
}
.data-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
gap: 15px;
padding: 0 20px 20px;
}
.data-item {
background: #f9f9f9;
padding: 15px;
border-radius: 8px;
border-left: 4px solid #3498db;
transition: transform 0.2s;
}
.data-item:hover {
transform: translateY(-3px);
box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}
.data-title {
font-weight: 600;
color: #7f8c8d;
margin-bottom: 8px;
font-size: 0.95em;
}
.data-value {
font-size: 1.15em;
color: #2c3e50;
font-weight: 500;
}
.last-update {
text-align: right;
color: #7f8c8d;
font-size: 0.9em;
padding: 10px 20px;
border-top: 1px solid #eee;
margin-top: 10px;
}
.loading {
text-align: center;
padding: 40px;
color: #7f8c8d;
font-size: 1.2em;
}
.error {
color: var(--red);
padding: 15px;
background: #fdecea;
border-radius: 8px;
margin: 15px;
text-align: center;
}
.filters-type {
display: flex;
gap: 15px;
margin-bottom: 25px;
flex-wrap: wrap;
justify-content: center;
}
.filter-btn {
background: white;
border: 1px solid #ddd;
padding: 10px 20px;
border-radius: 30px;
cursor: pointer;
transition: all 0.2s;
font-weight: 500;
}
.filter-btn:hover {
background: #f1f8ff;
border-color: #3498db;
}
.filter-btn.active {
background: #3498db;
color: white;
border-color: #3498db;
}
.summary {
display: flex;
justify-content: space-between;
padding: 0 20px 15px;
font-size: 0.95em;
color: #7f8c8d;
}
.progress-bar {
height: 6px;
background: #eee;
border-radius: 3px;
margin: 15px 0;
overflow: hidden;
}
.progress {
height: 100%;
background: var(--green2);
width: 65%;
}
@media (max-width: 768px) {
.bond-header {
  flex-direction: column;
  align-items: flex-start;
}
.bond-prices {
  text-align: left;
  width: 100%;
  margin-top: 15px;
}
.bond-arrow {
  position: absolute;
  right: 20px;
  top: 25px;
}
}




.financial-card {
border-radius: 12px;
padding: 2px 20px;
color: #e0e0e0;
max-width: 380px;
position: relative;
}

.financial-header { position: absolute; top: 0px; right: 0;
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
font-size: 1.1rem;
font-weight: 600;
color: #ffffff;
}

.financial-stats {
display: flex;
gap: 16px; min-width: 340px;  
flex-wrap: wrap;
justify-content: center;
}
.stat-item-flex, .stat-item-open-v { display: flex; width: 100%; gap: 16px; justify-content: center; }




.stat-item-open-v .volume-value { min-width: 125px;   }
.stat-item-open-v .stat-item-min span { min-width: 6px;   }
.stat-item-min { display: flex; color:var(--blue); font-size: 20px;  justify-content: flex-end;margin-bottom: 8px; }
.stat-item {
display: flex;
flex-direction: column;
font-size: 0.95rem;
}



.stat-label {
font-size: 0.8rem;
color: #aaa;
}

.stat-value {
font-weight: 500;
}

.price-high {
color: var(--green);
}

.price-low {
color: var(--red);
}

.price-open {
color: #9ca3af;
}

.volume-value {
color: var(--blue);
}

.delta, .difPrice  {
font-size: 0.9rem;
margin-left: 6px;
padding: 2px 6px;
border-radius: 4px;
background: rgba(59, 130, 246, 0.15);
color: var(--blue);
}
.difPrice {    background: rgba(239, 68, 68, 0.15);
color: var(--red); }  

.difPrice  { position: absolute; top:-20px; right: 0px; }


.delta.positive, .difPrice.positive {
background: rgba(34, 197, 94, 0.15);
color: var(--green);
}
.yield-container {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 8px 14px;
background: #f1f8ff;
border-radius: 12px;

font-weight: 600;
font-size: 1.2rem;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
position: relative;
}

.tooltip-icon, .tooltip-icon2, .tooltip-icon3 {
display: flex;
align-items: center;
justify-content: center;
width: 18px;
height: 18px;
border-radius: 50%;
background: #64748b;
color: #f1f5f9;
font-size: 0.75rem;
cursor: pointer;
transition: background 0.2s;
}

.tooltip-icon:hover::after, .tooltip-icon2:hover::after,   .tooltip-icon3:hover::after {
content: "Это доходность без реинвестирования купонов ";
position: absolute;
top: -50px;
left: 50%;
transform: translateX(-50%);
width: max-content;
max-width: 340px;
background: #334155;
color: #e2e8f0;
font-size: 0.85rem;
padding: 8px 12px;
border-radius: 8px;
white-space: nowrap;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
z-index: 10;
}
  .tooltip-icon2:hover::after {
content: "Доход с облигации в руб. и процентах к цене(+НКД) ";
}
  .tooltip-icon3:hover::after {
content: "Купон с каждой вложенной 1000р ";
}
.tooltip-icon:hover::before {
content: '';
position: absolute;
top: -10px;
left: 50%;
transform: translateX(-50%);
width: 0;
height: 0;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid #334155;
}    
label {
display: block;
margin-bottom: 5px;
font-weight: bold;
}
.add-bond-box input[type="text"] {
width: 100%;
padding: 10px;
border: 1px solid #ddd;
border-radius: 10px;
box-sizing: border-box;
}
button { font-size: 15px;
background-color: var(--green);
color: white;
padding: 10px 15px;
border: none;
border-radius: 4px;
cursor: pointer;
}
button:hover {
background-color: var(--green);;
}
#message {
margin-top: 15px;
padding: 10px;
border-radius: 10px;
display: none;
}
.success {
background-color: #dff0d8;
color: #3c763d;
display: block;
}
.error {
background-color: #f2dede;
color: #a94442;
display: block;
}


  .add-bond-box { display: flex; justify-content: center; gap:12px; align-items: center; margin-bottom: 24px;  }

  .delete-btn { color:var(--red);}
  .bond-right { display:  flex; flex-direction: column; align-items: center; gap:6px; position: relative; }
  .up-down { position: absolute; left: -35px; bottom: -6px; }
  .bond-arrow { position: absolute; left: -89px; bottom: -7px; }
  .bond-del, .bond-edit { display: flex; align-items: center; margin-left: 15px;} 
  .bond-rating { font-size: 1.1rem; font-weight: 700; padding: 5px 12px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.5px; max-width: max-content; }
  .rating-AAA, .rating-AA {background: linear-gradient(to right, var(--green), var(--green2));    color: white;    box-shadow: 0 2px 5px rgba(245, 124, 0, 0.3);}

  .rating-A {background: linear-gradient(to right, var(--green), var(--blue));    color: white;    box-shadow: 0 2px 5px rgba(245, 124, 0, 0.3);} 
  .rating-BBB { background: linear-gradient(to right, var(--orange), #F57C00);    color: white;    box-shadow: 0 2px 5px rgba(245, 124, 0, 0.3); } 
  .rating-BB { background: linear-gradient(to right, var(--red), var(--red));    color: white;    box-shadow: 0 2px 5px rgba(245, 124, 0, 0.3);}
  
  
  
  

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.filter-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 50px;
    background-color: #fff;
    color: #2c3e50;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.filter-btn.active {
    background-color: #2c3e50;
    color: white;
}

.items-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.item {
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}


@media (max-width: 600px) {
    
    .items-container {
        grid-template-columns: 1fr;
    }
}
  .bond-rating-plan { display: flex; align-items: center; gap:12px;  }
  .none { display: none; } 
  
 
.btn-cancel {
    background-color: var(--red);
}

.btn-cancel:hover {
    background-color: #d32f2f;
}

/* Модальное окно */
.modal {
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

/* Форма */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-group textarea {
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}
.note { position: absolute; bottom: 0px; 
    margin: 10px 0;
    padding: 2px 12px;
    background-color: #f8fdfa;
    border: 1px solid #33B189;
    border-radius: 8px; 
}
#changesBonds {
  display: flex; gap: 8px; flex-wrap: wrap; 
}
#changesBonds div {
  margin-bottom: 12px;
  padding: 10px 20px;
  border: none;
  border-radius: 50px;
  background-color: #fff;
  color: #2c3e50;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  align-items: center;
  
}
.favorites { display: flex; } 
  .heart .fa-heart { font-weight: 900;color: var(--red); } 
  .star .fa-star { font-weight: 900; color: var(--orange); } 
  .skull .fa-skull { font-weight: 900; color: var(--green); } 
  .only-fav { width: 34px; height: 35px; text-align: center;  }
  .only-fav:hover { cursor: pointer;    }

  #only-star:hover {   font-size: 18px;  }
  #only-heart:hover {   font-size: 18px;  }
  #only-skull:hover {  font-size: 18px;  }
  #only-all:hover { font-size: 18px;  }

/* сортировка  */
.sorting-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: #f8f9fa;
            border-radius: 8px;
            padding: 12px 16px;
            margin-bottom: 16px; 
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
        }
        
        .sort-options {
            display: flex;
            gap: 24px;
        }
        
        .sort-item {
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
            font-size: 14px;
            color: #6b7280;
            transition: color 0.2s ease;
            position: relative;
        }
        
        .sort-item:hover {
            color: #1a1d28;
        }
        
        .sort-item.active {
            color: #2563eb;
            font-weight: 500;
        }
        
        .sort-arrows {
            display: flex;
            flex-direction: column;
            margin-left: 4px;
        }
  .arrow {
            width: 0;
            height: 0;
            border-left: 4px solid transparent;
            border-right: 4px solid transparent;
            cursor: pointer;
        }
   .arrow-up {
            border-bottom: 4px solid #d1d5db;
            margin-bottom: 2px;
        }
        
        .arrow-down {
            border-top: 4px solid #d1d5db;
        }
        
        .arrow-up.active {
            border-bottom-color: #2563eb;
        }
        
        .arrow-down.active {
            border-top-color: #2563eb;
        }
   .search-box {
            display: flex;
            align-items: center;
            background: white;
            border-radius: 6px;
            padding: 8px 12px;
            border: 1px solid #e5e7eb;
            width: 240px;
        }
        
        .search-icon {
            margin-right: 8px;
            color: #9ca3af;
        }
        
        .search-input {
            border: none;
            outline: none;
            width: 100%;
            font-size: 14px;
            color: #1a1d28;
        }
        
        .search-input::placeholder {
            color: #9ca3af;
        }
.bond-name-yield { display: flex; }
@media (max-width: 768px) {
	.sorting-bar { flex-direction: column; gap: 12px; align-items: flex-start; }
	.sort-options { width: 100%; justify-content: space-between; }
	.search-box { width: 100%; }
	.financial-card { padding: 0; }
	.financial-header { right:6px;} 
	.stat-item-flex, .stat-item-open-v { margin: 0; justify-content: flex-start; } 
	.note { bottom: -8px; } 
	.financial-stats { gap: 6px; min-width: 320px; }	
	.bond-name, .stat-value { margin-bottom: 0px; } 
	 
	
	.bond-header { padding: 12px 12px 36px 12px; } 
	.bond-price { text-align: center; }
	}

/* сортировка */
@media (max-width: 768px) {
    .sorting-bar {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
        border-radius: 12px;
        margin-bottom: 12px;
    }
    
    .sort-options {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        width: 100%;
    }
    
    .sort-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        font-size: 13px;
        padding: 8px 0;
    }
    
    .sort-arrows {
        flex-direction: row;
        margin-left: 0;
        margin-top: 2px;
    }
    
    .arrow {
        margin: 0 2px;
    }
    
    .arrow-up {
        margin-right: 4px;
        margin-bottom: 0;
    }
    
    .search-box {
        width: 100%;
        padding: 10px 12px;
    }
    
    .search-input {
        font-size: 16px; /* Для лучшего отображения на мобильных */
    }
}

@media (max-width: 480px) {
    .sort-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .sort-item {
        font-size: 12px;
        padding: 6px 0;
    }
    
    .sorting-bar {
        padding: 12px;
        gap: 12px;
        border-radius: 10px;
    }
    
    .search-box {
        padding: 8px 10px;
    }
}


@media (max-width: 360px) {
    .sort-options {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .sort-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 8px 12px;
        background: white;
        border-radius: 6px;
        border: 1px solid #e5e7eb;
    }
    
    .sort-arrows {
        flex-direction: column;
        margin-top: 0;
    }
    
    .arrow-up {
        margin-right: 0;
        margin-bottom: 2px;
    }
}


/* форма добавления */

@media (max-width: 768px) {
    #bondAddForm {
        width: 100%;
    }
    
    .add-bond-box {
        display: flex;
        flex-direction: column;
        gap: 16px;
        padding: 16px;
        background: #f8f9fa;
        border-radius: 12px;
        margin-bottom: 16px;
    }
    
    .add-bond-box label {
        font-size: 16px;
        font-weight: 500;
        color: #1a1d28;
        margin-bottom: 4px;
        display: block;
    }
    
    .add-bond-box input[type="text"] {
        width: 100%;
        padding: 12px 16px;
        font-size: 16px; /* Увеличиваем для удобства на мобильных */
        border: 2px solid #e5e7eb;
        border-radius: 8px;
        background: white;
        box-sizing: border-box;
        height: 48px;
    }
    
    .add-bond-box input[type="text"]:focus {
        border-color: #2563eb;
        outline: none;
    }
    
    .add-bond-box input[type="text"]::placeholder {
        color: #9ca3af;
        font-size: 15px;
    }
    
    .add-bond-box button[type="submit"] {
        width: 100%;
        padding: 14px;
        font-size: 16px;
        font-weight: 600;
        background: #2563eb;
        color: white;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        transition: background-color 0.2s;
        margin-top: 8px;
    }
    
    .add-bond-box button[type="submit"]:hover {
        background: #1d4ed8;
    }
    
    .add-bond-box button[type="submit"]:active {
        background: #1e40af;
    }
    
    .only-fav {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 10px;
        border-radius: 8px;
        background: white;
        border: 1px solid #e5e7eb;
        cursor: pointer;
        transition: all 0.2s;
        height: 44px;
    }
    
    .only-fav:hover {
        border-color: #2563eb;
        background: #f0f7ff;
    }
    
    .only-fav a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        text-decoration: none;
        color: inherit;
        font-size: 14px;
    }
    
    .fa-star, .fa-heart, .fa-skull {
        font-size: 18px;
    }
    
    .only-fav:nth-child(2) { /* Звезда */
        order: 1;
    }
    
    .only-fav:nth-child(3) { /* Сердце */
        order: 2;
    }
    
    .only-fav:nth-child(4) { /* Череп */
        order: 3;
    }
    
    .only-fav:nth-child(5) { /* Все */
        order: 4;
    }
}

@media (max-width: 480px) {
    .add-bond-box {
        padding: 12px;
        gap: 12px;
        border-radius: 10px;
    }
    
    .add-bond-box label {
        font-size: 15px;
    }
    
    .add-bond-box input[type="text"] {
        padding: 10px 14px;
        height: 44px;
        font-size: 15px;
    }
    
    .add-bond-box button[type="submit"] {
        padding: 12px;
        font-size: 15px;
    }
    
    .only-fav {
        height: 40px;
        padding: 8px;
    }
    
    .fa-star, .fa-heart, .fa-skull {
        font-size: 16px;
    }
    
    .only-fav a {
        font-size: 13px;
    }
}

/* Горизонтальная компоновка для кнопок фильтров */
@media (max-width: 768px) {
    .add-bond-box {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }
    
    .add-bond-box > :nth-child(1) { /* label */
        grid-column: 1;
        grid-row: 1;
    }
    
    .add-bond-box > :nth-child(2) { /* input div */
        grid-column: 1;
        grid-row: 2;
    }
    
    .add-bond-box button[type="submit"] {
        grid-column: 1;
        grid-row: 3;
    }
    
    .only-fav {
        display: flex;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 360px) {
    .add-bond-box {
        padding: 10px;
        gap: 10px;
    }
    
    .add-bond-box label {
        font-size: 14px;
    }
    
    .add-bond-box input[type="text"] {
        padding: 8px 12px;
        height: 40px;
        font-size: 14px;
    }
    
    .add-bond-box button[type="submit"] {
        padding: 10px;
        font-size: 14px;
    }
    
    .only-fav {
        height: 36px;
        padding: 6px;
    }
}
