* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
.devices-list,
.builds-list,
.modal-body,
.messages-container,
.device-panel,
.device-content {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0a0a0a;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 120, 0, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 140, 0, 0.05) 0%, transparent 50%);
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

/* Мобильная оптимизация - базовые настройки */
@media (max-width: 480px) {
    body {
        padding: 8px;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 1px solid rgba(255, 120, 0, 0.3);
    padding: 20px 30px;
    border-radius: 25px;
    box-shadow: 
        0 15px 50px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 50px rgba(255, 120, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 120, 0, 0.15), transparent);
    animation: shine 4s infinite;
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 120, 0, 0.5) 50%, 
        transparent 100%);
}

@keyframes shine {
    0% { left: -100%; }
    50% { left: 150%; }
    100% { left: 150%; }
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 0 10px rgba(255, 120, 0, 0.5));
}

.navbar-brand h1 {
    font-size: 24px;
    background: linear-gradient(135deg, #ff7800 0%, #ff9d00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    margin: 0;
    letter-spacing: 1px;
    text-transform: uppercase;
    filter: drop-shadow(0 0 15px rgba(255, 120, 0, 0.4));
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        filter: drop-shadow(0 0 15px rgba(255, 120, 0, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 25px rgba(255, 120, 0, 0.7));
    }
}

.navbar-menu {
    display: flex;
    gap: 10px;
    align-items: center;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 120, 0, 0.2);
    border-radius: 15px;
    text-decoration: none;
    color: #999;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 120, 0, 0.3), transparent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.nav-item:hover::before {
    width: 200px;
    height: 200px;
}

.nav-item:hover {
    background: rgba(255, 120, 0, 0.15);
    border-color: rgba(255, 120, 0, 0.5);
    color: #ff9d00;
    transform: translateY(-2px);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(255, 120, 0, 0.2), rgba(255, 157, 0, 0.2));
    border-color: #ff7800;
    color: #ff9d00;
    box-shadow: 
        0 5px 20px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ff7800, transparent);
    border-radius: 3px;
}

.nav-icon {
    font-size: 20px;
    transition: all 0.3s;
    color: #999;
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
    color: #ff9d00;
    transform: scale(1.1);
}

.nav-text {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 30px;
    border: 1px solid rgba(255, 120, 0, 0.2);
    color: #fff;
}

.status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}

.status::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    opacity: 0.3;
}

.status.connected {
    background: #ff7800;
    box-shadow: 0 0 15px rgba(255, 120, 0, 0.8);
    animation: pulse 2s infinite;
}

.status.connected::before {
    background: #ff7800;
    animation: ripple 2s infinite;
}

.status.disconnected {
    background: #555;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.7;
        transform: scale(1.1);
    }
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 1px solid rgba(255, 120, 0, 0.2);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ff7800, transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 120, 0, 0.5);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-value {
    font-size: 42px;
    font-weight: 700;
    background: linear-gradient(135deg, #ff7800 0%, #ff9d00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 14px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

#search {
    flex: 1;
    padding: 15px 20px;
    background: #1a1a1a;
    border: 1px solid rgba(255, 120, 0, 0.2);
    border-radius: 15px;
    font-size: 16px;
    color: #fff;
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    outline: none;
    transition: all 0.3s;
}

#search::placeholder {
    color: #666;
}

#search:focus {
    border-color: #ff7800;
    box-shadow: 
        0 5px 20px rgba(255, 120, 0, 0.3),
        0 0 20px rgba(255, 120, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.btn-danger {
    padding: 15px 30px;
    background: linear-gradient(135deg, #ff4400 0%, #ff6600 100%);
    color: white;
    border: 1px solid rgba(255, 120, 0, 0.3);
    border-radius: 15px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 
        0 5px 15px rgba(255, 68, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn-danger::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn-danger:hover::before {
    width: 300px;
    height: 300px;
}

.btn-danger:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #ff5500 0%, #ff7700 100%);
}

.btn-danger:active {
    transform: translateY(0);
}

.messages-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 1px solid rgba(255, 120, 0, 0.2);
    border-radius: 20px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    padding: 20px;
    max-height: 600px;
    overflow-y: auto;
    position: relative;
}

.messages-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: 
        radial-gradient(circle at 50% 0%, rgba(255, 120, 0, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.no-messages {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-messages p {
    font-size: 24px;
    margin-bottom: 10px;
    color: #999;
}

.hint {
    font-size: 14px !important;
    color: #555 !important;
}

.message-card {
    background: linear-gradient(135deg, #252525 0%, #1f1f1f 100%);
    border-left: 4px solid #ff7800;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.message-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 120, 0, 0.05), transparent);
    transition: left 0.5s;
}

.message-card:hover::before {
    left: 100%;
}

.message-card:hover {
    transform: translateX(3px);
    border-left-color: #ff9d00;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.sender {
    font-weight: bold;
    font-size: 18px;
    background: linear-gradient(135deg, #ff7800 0%, #ff9d00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.time {
    font-size: 14px;
    color: #666;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 120, 0, 0.1);
}

.message-body {
    font-size: 16px;
    line-height: 1.8;
    color: #ccc;
    margin-bottom: 15px;
    word-wrap: break-word;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 120, 0, 0.1);
}

.message-footer {
    display: flex;
    justify-content: flex-end;
}

.device {
    font-size: 12px;
    color: #999;
    background: rgba(255, 120, 0, 0.1);
    border: 1px solid rgba(255, 120, 0, 0.2);
    padding: 6px 15px;
    border-radius: 20px;
    font-weight: 600;
}

/* Scrollbar styling */
.messages-container::-webkit-scrollbar {
    width: 10px;
}

.messages-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(255, 120, 0, 0.1);
}

.messages-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ff7800 0%, #ff9d00 100%);
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 10px rgba(255, 120, 0, 0.5);
}

.messages-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ff9d00 0%, #ffb700 100%);
    box-shadow: 0 0 15px rgba(255, 120, 0, 0.7);
}

/* Страницы */
.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-header {
    margin-bottom: 30px;
}

.page-header h2 {
    font-size: 32px;
    background: linear-gradient(135deg, #ff7800 0%, #ff9d00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    margin-bottom: 10px;
}

.page-subtitle {
    font-size: 16px;
    color: #999;
}

.coming-soon {
    text-align: center;
    padding: 100px 20px;
    color: #666;
}

.coming-soon h3 {
    font-size: 28px;
    color: #999;
    margin-top: 20px;
}

/* Layout устройств */
.devices-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 20px;
    height: calc(100vh - 200px);
}

/* Левая панель - список устройств */
.devices-sidebar {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 1px solid rgba(255, 120, 0, 0.2);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 120, 0, 0.1);
    position: relative;
}

.sidebar-title-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.sidebar-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(255, 120, 0, 0.2), rgba(255, 157, 0, 0.2));
    border: 2px solid rgba(255, 120, 0, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #ff7800;
    position: relative;
    transition: all 0.3s;
}

.sidebar-icon-glow {
    position: absolute;
    inset: -3px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 120, 0, 0.3), rgba(255, 157, 0, 0.3));
    opacity: 0;
    filter: blur(8px);
    z-index: -1;
    animation: sidebar-icon-pulse 2s ease-in-out infinite;
}

@keyframes sidebar-icon-pulse {
    0%, 100% {
        opacity: 0;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

.sidebar-header h3 {
    font-size: 22px;
    background: linear-gradient(135deg, #ff7800 0%, #ff9d00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    margin: 0;
}

.stats-mini {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 15px;
}

.stat-mini-card {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.6) 0%, rgba(45, 45, 45, 0.6) 100%);
    border: 1px solid rgba(255, 120, 0, 0.2);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.stat-mini-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 120, 0, 0.1), transparent);
    transition: left 0.5s;
}

.stat-mini-card:hover::before {
    left: 100%;
}

.stat-mini-card:hover {
    border-color: rgba(255, 120, 0, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 120, 0, 0.2);
}

.stat-mini-card.online-stat {
    border-left: 3px solid #00ff88;
}

.stat-mini-card.total-stat {
    border-left: 3px solid #ff7800;
}

.stat-mini-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.stat-mini-card.online-stat .stat-mini-icon {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 204, 102, 0.2));
    color: #00ff88;
}

.stat-mini-card.total-stat .stat-mini-icon {
    background: linear-gradient(135deg, rgba(255, 120, 0, 0.2), rgba(255, 157, 0, 0.2));
    color: #ff7800;
}

.stat-mini-content {
    flex: 1;
    min-width: 0;
}

.stat-mini-value {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-mini-card.online-stat .stat-mini-value {
    color: #00ff88;
}

.stat-mini-card.total-stat .stat-mini-value {
    background: linear-gradient(135deg, #ff7800, #ff9d00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-mini-label {
    font-size: 10px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.filter-toggle {
    margin-top: 15px;
}

.filter-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.filter-switch input[type="checkbox"] {
    display: none;
}

.filter-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background-color: #333;
    border-radius: 12px;
    transition: background-color 0.3s;
    flex-shrink: 0;
}

.filter-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #fff;
    top: 3px;
    left: 3px;
    transition: transform 0.3s;
}

.filter-switch input[type="checkbox"]:checked + .filter-slider {
    background-color: #ff7800;
}

.filter-switch input[type="checkbox"]:checked + .filter-slider::before {
    transform: translateX(20px);
}

.filter-label {
    font-size: 13px;
    color: #ccc;
    font-weight: 500;
}

.filter-switch:hover .filter-label {
    color: #ff7800;
}

.devices-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.no-devices-mini {
    text-align: center;
    padding: 60px 20px;
    position: relative;
}

.no-devices-mini i {
    font-size: 64px;
    color: #444;
    margin-bottom: 20px;
    display: inline-block;
    animation: device-icon-float 3s ease-in-out infinite;
    position: relative;
}

.no-devices-mini i::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 120, 0, 0.1) 0%, transparent 70%);
    animation: device-icon-glow 2s ease-in-out infinite;
}

@keyframes device-icon-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes device-icon-glow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

.no-devices-mini p {
    font-size: 16px;
    color: #999;
    margin-top: 15px;
}

/* Устройства */
.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

/* Адаптивная сетка для мобильных устройств */
@media (max-width: 768px) {
    .devices-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .devices-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 15px;
    }
}

.device-card {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8) 0%, rgba(45, 45, 45, 0.8) 100%);
    border: 1px solid rgba(255, 120, 0, 0.2);
    border-radius: 20px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: device-card-appear 0.5s ease-out backwards;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    contain: layout style paint;
}

@keyframes device-card-appear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.device-card-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #ff7800, #ff9d00);
    border-radius: 20px;
    opacity: 0;
    z-index: -1;
    filter: blur(8px);
    transition: opacity 0.4s;
}

.device-card:hover .device-card-glow {
    opacity: 0.4;
}

.device-card-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 120, 0, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 157, 0, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.device-card:hover .device-card-pattern {
    opacity: 1;
}

.device-card:hover {
    background: linear-gradient(135deg, rgba(255, 120, 0, 0.15) 0%, rgba(255, 157, 0, 0.1) 100%);
    border-color: rgba(255, 120, 0, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 120, 0, 0.3);
}

.device-card.selected {
    background: linear-gradient(135deg, rgba(255, 120, 0, 0.25) 0%, rgba(255, 157, 0, 0.2) 100%);
    border-color: #ff7800;
    box-shadow: 0 0 20px rgba(255, 120, 0, 0.4);
}

.device-card.selected .device-card-glow {
    opacity: 0.6;
}

.device-card.online {
    border-left: 4px solid #00ff88;
}

.device-card.online::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #00ff88, #00cc66);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.device-card.offline {
    border-left: 4px solid #666;
    opacity: 0.7;
}

.device-hover-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 120, 0, 0.15) 0%, transparent 60%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    pointer-events: none;
    z-index: 0;
}

.device-card:hover .device-hover-effect {
    width: 150%;
    height: 150%;
}

.device-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
    overflow: visible;
}

.device-icon-wrapper {
    position: relative;
    flex-shrink: 0;
    overflow: visible;
    width: 60px;
    height: 60px;
}

.device-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(255, 120, 0, 0.2) 0%, rgba(255, 157, 0, 0.2) 100%);
    border: 2px solid rgba(255, 120, 0, 0.3);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ff7800;
    position: relative;
    transition: all 0.3s;
}

.device-card:hover .device-icon {
    background: linear-gradient(135deg, rgba(255, 120, 0, 0.3) 0%, rgba(255, 157, 0, 0.3) 100%);
    border-color: rgba(255, 120, 0, 0.6);
    transform: scale(1.05);
}

.device-icon-ring {
    position: absolute;
    inset: -3px;
    border: 2px solid rgba(255, 120, 0, 0.3);
    border-radius: 18px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.device-icon.pulse-active .device-icon-ring {
    opacity: 1;
    animation: icon-ring-pulse 2s ease-in-out infinite;
}

@keyframes icon-ring-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.15);
        opacity: 0;
    }
}

.device-status-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    border: 2px solid #1a1a1a;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.device-status-badge.online {
    background: linear-gradient(135deg, #00ff88, #00cc66);
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.device-status-badge.offline {
    background: linear-gradient(135deg, #666, #555);
    color: #fff;
}

.device-info {
    flex: 1;
    min-width: 0;
}

.device-brand,
.device-model,
.device-android {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 14px;
}

.device-brand {
    font-weight: 700;
    color: #ff9d00;
    font-size: 16px;
}

.device-brand i {
    color: #ff7800;
    font-size: 14px;
}

.device-model {
    color: #ccc;
    font-size: 13px;
}

.device-model i {
    color: #999;
    font-size: 12px;
}

.device-android {
    font-size: 12px;
    color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
    padding: 4px 10px;
    border-radius: 8px;
    display: inline-flex;
    margin-top: 4px;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.device-android i {
    color: #00ff88;
    font-size: 14px;
}

.device-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    position: relative;
    z-index: 1;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: block;
}

.device-status.online .status-dot {
    background: #00ff88;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.6);
}

.device-status.offline .status-dot {
    background: #666;
}

.status-indicator.pulse-active .status-dot {
    animation: status-pulse 2s ease-in-out infinite;
}

@keyframes status-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

.status-text {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.device-status.online .status-text {
    color: #00ff88;
}

.device-status.offline .status-text {
    color: #666;
}

.device-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.device-worker-id {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 120, 0, 0.05);
    border: 1px solid rgba(255, 120, 0, 0.2);
    border-radius: 12px;
    transition: all 0.3s;
}

.device-card:hover .device-worker-id {
    background: rgba(255, 120, 0, 0.1);
    border-color: rgba(255, 120, 0, 0.4);
}

.worker-id-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, rgba(255, 120, 0, 0.2), rgba(255, 157, 0, 0.2));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff7800;
    font-size: 16px;
    flex-shrink: 0;
}

.worker-id-content {
    flex: 1;
    min-width: 0;
}

.worker-id-label {
    font-size: 10px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    font-weight: 600;
}

.worker-id-value {
    font-size: 13px;
    color: #ff7800;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.fox-id-label {
    margin-top: 8px;
    font-size: 10px;
    color: #6fb8ff;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.fox-id-value {
    font-size: 13px;
    color: #6fb8ff;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.device-sim-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.sim-badge {
    background: rgba(111, 184, 255, 0.08);
    border: 1px solid rgba(111, 184, 255, 0.3);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sim-badge span {
    font-size: 10px;
    letter-spacing: 1px;
    color: #6fb8ff;
}

.sim-badge strong {
    font-size: 13px;
    color: #fff;
}

.sim-badge small {
    font-size: 11px;
    color: #88cfff;
}

.device-app-name {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 10px;
    font-size: 12px;
    color: #00d4ff;
}

.device-app-name i {
    color: #00d4ff;
    font-size: 14px;
}

/* Разрешения устройства */
.device-permissions {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    position: relative;
    cursor: help;
}

.device-permissions.permissions-ok {
    background: linear-gradient(135deg, rgba(0, 200, 83, 0.2) 0%, rgba(0, 200, 83, 0.1) 100%);
    border: 1px solid rgba(0, 200, 83, 0.3);
    color: #00c853;
}

.device-permissions.permissions-warning {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.2) 0%, rgba(255, 152, 0, 0.1) 100%);
    border: 1px solid rgba(255, 152, 0, 0.3);
    color: #ff9800;
}

.device-permissions i {
    font-size: 14px;
}

.permissions-tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 25, 35, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    color: #fff;
    white-space: nowrap;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    margin-bottom: 8px;
}

.permissions-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(20, 25, 35, 0.98);
}

.permissions-tooltip div {
    padding: 3px 0;
    display: flex;
    gap: 8px;
}

.device-permissions:hover .permissions-tooltip {
    display: block;
}

.worker-id-label {
    font-size: 9px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 3px;
}

.worker-id-value {
    font-size: 11px;
    color: #ff9d00;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

/* Правая панель - детали устройства */
.device-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 1px solid rgba(255, 120, 0, 0.2);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow-y: auto;
}

.device-details-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    text-align: center;
    color: #999;
}

.device-details-error i {
    font-size: 64px;
    color: #ff3b30;
    margin-bottom: 20px;
    opacity: 0.7;
}

.device-details-error h3 {
    font-size: 24px;
    color: #fff;
    margin-bottom: 10px;
    font-weight: 600;
}

.device-details-error p {
    font-size: 16px;
    color: #999;
    line-height: 1.5;
}

.device-details-panel {
    height: 100%;
}

.select-device-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
    text-align: center;
}

.select-device-prompt i {
    margin-bottom: 20px;
}

.select-device-prompt h3 {
    font-size: 24px;
    color: #999;
    margin-bottom: 10px;
}

.select-device-prompt p {
    font-size: 14px;
    color: #666;
}

.device-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 120, 0, 0.1);
}

.device-detail-title {
    flex: 1;
}

.device-detail-title h3 {
    font-size: 24px;
    background: linear-gradient(135deg, #ff7800 0%, #ff9d00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    margin-bottom: 5px;
}

.device-detail-subtitle {
    font-size: 14px;
    color: #999;
}

.device-detail-identifiers {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.id-chip {
    background: rgba(255, 120, 0, 0.08);
    border: 1px solid rgba(255, 120, 0, 0.25);
    border-radius: 12px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    min-width: 160px;
}

.id-chip span {
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #888;
}

.id-chip strong {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #fff;
    margin-top: 4px;
}

.device-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.info-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 120, 0, 0.1);
}

.info-label {
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.info-value {
    font-size: 14px;
    color: #ccc;
    font-weight: 600;
}

.sim-section {
    margin-bottom: 25px;
}

.sim-section-header h4 {
    font-size: 16px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sim-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.sim-detail-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(111, 184, 255, 0.2);
    border-radius: 12px;
    padding: 12px;
}

.sim-slot {
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #6fb8ff;
    margin-bottom: 6px;
}

.sim-phone {
    font-size: 15px;
    color: #fff;
    font-weight: 600;
}

.sim-operator {
    font-size: 12px;
    color: #89cfff;
    margin-top: 4px;
}

.sms-section {
    margin-top: 20px;
}

.sms-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.sms-header h4 {
    font-size: 18px;
    color: #ff9d00;
}

.sms-count {
    font-size: 14px;
    color: #999;
}

.no-devices {
    text-align: center;
    padding: 80px 20px;
    color: #666;
    grid-column: 1 / -1;
}

.no-devices p {
    font-size: 20px;
    color: #999;
    margin-top: 10px;
}

/* Установленные приложения */
.apps-section {
    background: linear-gradient(145deg, #1a1a1a, #252525);
    border: 1px solid rgba(255, 120, 0, 0.2);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    animation: slideIn 0.4s ease;
    transition: all 0.3s ease;
}

.apps-section:hover {
    border-color: rgba(255, 120, 0, 0.4);
    box-shadow: 0 5px 20px rgba(255, 120, 0, 0.15);
}

.apps-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    transition: all 0.3s;
}

.apps-header h4 {
    margin: 0;
    font-size: 18px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.apps-header i {
    color: #ff7800;
}

.apps-stats {
    display: flex;
    gap: 20px;
    align-items: center;
}

.apps-count {
    font-size: 14px;
    color: #ccc;
    background: rgba(255, 120, 0, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 120, 0, 0.2);
}

.apps-count i {
    color: #ff7800;
    font-size: 12px;
}

.apps-toggle-btn {
    background: rgba(255, 120, 0, 0.15);
    border: 1px solid rgba(255, 120, 0, 0.3);
    color: #ff9d00;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.apps-toggle-btn:hover {
    background: rgba(255, 120, 0, 0.25);
    border-color: rgba(255, 120, 0, 0.5);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 120, 0, 0.3);
}

.apps-toggle-btn:active {
    transform: scale(0.98);
}

.apps-toggle-btn i {
    font-size: 14px;
    transition: transform 0.3s;
}

/* Анимация иконки при раскрытии */
.apps-section.expanded .apps-toggle-btn i {
    transform: rotate(180deg);
}

.apps-container {
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.apps-container[style*="display: block"] {
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 2000px;
    }
}

.apps-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    animation: fadeIn 0.3s ease;
}

.app-card {
    background: linear-gradient(145deg, #1e1e1e, #2a2a2a);
    border: 1px solid #333;
    border-left: 3px solid #ff7800;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    transition: all 0.3s ease;
    cursor: pointer;
}

.app-card:hover {
    border-color: #ff7800;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 120, 0, 0.2);
}

.app-icon {
    font-size: 36px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    border-radius: 12px;
    flex-shrink: 0;
}

.app-info {
    flex: 1;
    min-width: 0;
}

.app-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-package {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'Courier New', monospace;
}

.app-meta {
    display: flex;
    gap: 15px;
    font-size: 11px;
    color: #666;
}

.app-version {
    background: #222;
    padding: 2px 8px;
    border-radius: 4px;
    color: #ff7800;
}

.app-date {
    color: #888;
}

/* Responsive */
@media (max-width: 1200px) {
    .navbar {
        flex-wrap: wrap;
        gap: 15px;
    }

    .navbar-menu {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 15px;
    }

    .navbar-brand h1 {
        font-size: 20px;
    }

    .nav-item {
        padding: 10px 15px;
    }

    .nav-icon {
        font-size: 20px;
    }

    .nav-text {
        font-size: 10px;
    }

    .stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
        min-height: auto;
    }

    .controls {
        flex-direction: column;
        gap: 12px;
    }
    
    #search {
        width: 100%;
        padding: 14px 18px;
        font-size: 15px;
    }
    
    #filter-select {
        width: 100%;
        padding: 14px 18px;
        font-size: 15px;
    }
    
    #refresh-btn {
        width: 100%;
        padding: 14px 18px;
        font-size: 15px;
        justify-content: center;
    }

    .stat-value {
        font-size: 32px;
    }
    
    .stat-label {
        font-size: 12px;
    }

    .connection-status {
        font-size: 12px;
        padding: 10px 16px;
    }
}

/* USSD Section */
.ussd-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
    border: 1px solid rgba(255, 120, 0, 0.2);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.ussd-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.ussd-header h4 {
    font-size: 18px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ussd-header i {
    color: #ff7800;
    font-size: 20px;
}

.ussd-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ussd-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 15px;
    align-items: end;
}

.ussd-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ussd-input-group label {
    font-size: 13px;
    color: #aaa;
    font-weight: 500;
}

.ussd-input {
    background: #0f0f0f;
    border: 1px solid rgba(255, 120, 0, 0.3);
    border-radius: 8px;
    padding: 12px 15px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 100%;
}

.ussd-input:focus {
    outline: none;
    border-color: #ff7800;
    box-shadow: 0 0 15px rgba(255, 120, 0, 0.3);
}

.ussd-input::placeholder {
    color: #555;
}

.ussd-select {
    background: #0f0f0f;
    border: 1px solid rgba(255, 120, 0, 0.3);
    border-radius: 8px;
    padding: 12px 15px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.ussd-select:focus {
    outline: none;
    border-color: #ff7800;
    box-shadow: 0 0 15px rgba(255, 120, 0, 0.3);
}

.ussd-select option {
    background: #1a1a1a;
    color: #fff;
}

.ussd-refresh-btn {
    background: rgba(255, 120, 0, 0.15);
    border: 1px solid rgba(255, 120, 0, 0.4);
    border-radius: 8px;
    padding: 12px 15px;
    color: #ff7800;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
}

.ussd-refresh-btn:hover {
    background: rgba(255, 120, 0, 0.25);
    border-color: #ff7800;
    transform: scale(1.05);
}

.ussd-refresh-btn i {
    font-size: 14px;
}

.ussd-execute-btn {
    background: linear-gradient(135deg, #ff7800 0%, #ff9d00 100%);
    border: none;
    border-radius: 8px;
    padding: 12px 30px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(255, 120, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.ussd-execute-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 120, 0, 0.5);
}

.ussd-execute-btn:active {
    transform: translateY(0);
}

.ussd-result {
    background: #0f0f0f;
    border: 1px solid rgba(255, 120, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-top: 10px;
}

.ussd-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #aaa;
    font-size: 13px;
    font-weight: 600;
}

.ussd-close-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
    font-size: 16px;
}

.ussd-close-btn:hover {
    color: #ff7800;
}

.ussd-result-text {
    color: #fff;
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: 'Courier New', monospace;
    background: #1a1a1a;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #ff7800;
    max-height: 300px;
    overflow-y: auto;
}

.ussd-result-text.ussd-error {
    color: #ff4444;
    border-left-color: #ff4444;
}

.ussd-result-text::-webkit-scrollbar {
    width: 6px;
}

.ussd-result-text::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.ussd-result-text::-webkit-scrollbar-thumb {
    background: #ff7800;
    border-radius: 3px;
}

.ussd-result-text::-webkit-scrollbar-thumb:hover {
    background: #ff9d00;
}

/* USSD Подсказки */
.ussd-hint-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255, 120, 0, 0.1);
    border: 1px solid rgba(255, 120, 0, 0.3);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 13px;
    font-family: inherit;
}

.ussd-hint-btn:hover {
    background: rgba(255, 120, 0, 0.2);
    border-color: rgba(255, 120, 0, 0.5);
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(255, 120, 0, 0.2);
}

.ussd-hint-btn:active {
    transform: translateX(1px);
}

/* Responsive для USSD */
@media (max-width: 768px) {
    .ussd-form {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .ussd-execute-btn {
        width: 100%;
        justify-content: center;
    }
    
    .ussd-hint-btn {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px;
    }
    
    /* Секция приложений на мобильных */
    .apps-section {
        padding: 16px;
        border-radius: 12px;
    }
    
    .apps-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .apps-header h4 {
        font-size: 16px;
    }
    
    .apps-stats {
        width: 100%;
        justify-content: space-between;
    }
    
    .apps-toggle-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .apps-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* ========== ADMIN PANEL STYLES ========== */

.admin-container {
    max-width: 1200px;
}

.admin-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 1px solid rgba(255, 120, 0, 0.2);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 120, 0, 0.1);
}

.admin-section-header h3 {
    font-size: 22px;
    background: linear-gradient(135deg, #ff7800 0%, #ff9d00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-btn-primary {
    background: linear-gradient(135deg, #ff7800 0%, #ff9d00 100%);
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(255, 120, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 120, 0, 0.5);
}

.users-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 20px;
}

.no-users {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    grid-column: 1 / -1;
}

.no-users i {
    font-size: 64px;
    color: #444;
    margin-bottom: 15px;
}

.no-users p {
    font-size: 16px;
    color: #999;
}

.user-card {
    background: linear-gradient(135deg, #252525 0%, #1f1f1f 100%);
    border: 1px solid rgba(255, 120, 0, 0.2);
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.user-card:hover {
    border-color: rgba(255, 120, 0, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.user-info {
    flex: 1;
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.user-name {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-role {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.user-id {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 120, 0, 0.2);
    border-radius: 8px;
    padding: 10px;
    font-size: 13px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-id span {
    color: #ff9d00;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.user-actions {
    display: flex;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 120, 0, 0.1);
}

.btn-edit,
.btn-delete {
    flex: 1;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-edit {
    background: rgba(52, 152, 219, 0.2);
    border: 1px solid rgba(52, 152, 219, 0.4);
    color: #3498db;
}

.btn-edit:hover {
    background: rgba(52, 152, 219, 0.3);
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-delete {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.4);
    color: #e74c3c;
}

.btn-delete:hover {
    background: rgba(231, 76, 60, 0.3);
    border-color: #e74c3c;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 1px solid rgba(255, 120, 0, 0.3);
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid rgba(255, 120, 0, 0.1);
}

.modal-header h3 {
    font-size: 22px;
    background: linear-gradient(135deg, #ff7800 0%, #ff9d00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    margin: 0;
}

.modal-close {
    background: rgba(255, 59, 48, 0.2);
    border: 1px solid rgba(255, 59, 48, 0.4);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff3b30;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 59, 48, 0.3);
    border-color: #ff3b30;
    transform: scale(1.1);
}

.modal-body {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: #aaa;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    background: #0f0f0f;
    border: 1px solid rgba(255, 120, 0, 0.3);
    border-radius: 10px;
    padding: 12px 15px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #ff7800;
    box-shadow: 0 0 20px rgba(255, 120, 0, 0.3);
}

.form-input::placeholder {
    color: #555;
}

.form-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

select.form-input {
    cursor: pointer;
}

select.form-input option {
    background: #1a1a1a;
    color: #fff;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 120, 0, 0.1);
}

.btn-secondary,
.btn-primary {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #999;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-primary {
    background: linear-gradient(135deg, #ff7800 0%, #ff9d00 100%);
    color: #fff;
    box-shadow: 0 5px 20px rgba(255, 120, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 120, 0, 0.5);
}

/* Responsive для админ панели */
@media (max-width: 768px) {
    .users-list {
        grid-template-columns: 1fr;
    }

    .admin-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .admin-btn-primary {
        width: 100%;
        justify-content: center;
    }

    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .modal-header,
    .modal-body {
        padding: 20px;
    }

    .form-actions {
        flex-direction: column;
    }

    .user-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ========== APK BUILDER STYLES ========== */

.build-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.build-section,
.builds-history-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 1px solid rgba(255, 120, 0, 0.2);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.build-section-header,
.builds-history-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 120, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.build-section-header h3,
.builds-history-header h3 {
    font-size: 20px;
    background: linear-gradient(135deg, #ff7800 0%, #ff9d00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.build-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.icon-upload-container {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.icon-upload-btn {
    background: rgba(255, 120, 0, 0.15);
    border: 2px dashed rgba(255, 120, 0, 0.4);
    border-radius: 10px;
    padding: 40px 30px;
    color: #ff7800;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 1;
    font-size: 14px;
    font-weight: 600;
}

.icon-upload-btn:hover {
    background: rgba(255, 120, 0, 0.25);
    border-color: #ff7800;
    transform: translateY(-2px);
}

.icon-upload-btn i {
    font-size: 32px;
}

.icon-preview {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid rgba(255, 120, 0, 0.3);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.icon-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.icon-remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 30px;
    height: 30px;
    background: rgba(255, 59, 48, 0.9);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.icon-remove-btn:hover {
    background: #ff3b30;
    transform: scale(1.1);
}

.build-submit-btn {
    background: linear-gradient(135deg, #ff7800 0%, #ff9d00 100%);
    border: none;
    border-radius: 12px;
    padding: 18px 40px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(255, 120, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.build-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(255, 120, 0, 0.6);
}

.build-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.build-status {
    padding: 15px 20px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.6;
}

.build-status.success {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.4);
    color: #4caf50;
}

.build-status.error {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.4);
    color: #f44336;
}

.build-status.info {
    background: rgba(33, 150, 243, 0.2);
    border: 1px solid rgba(33, 150, 243, 0.4);
    color: #2196f3;
}

.refresh-btn {
    background: rgba(255, 120, 0, 0.15);
    border: 1px solid rgba(255, 120, 0, 0.3);
    border-radius: 8px;
    padding: 8px 16px;
    color: #ff7800;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
}

.refresh-btn:hover {
    background: rgba(255, 120, 0, 0.25);
    border-color: #ff7800;
    transform: scale(1.05);
}

.builds-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 600px;
    overflow-y: auto;
}

.build-card {
    background: linear-gradient(135deg, #252525 0%, #1f1f1f 100%);
    border: 1px solid rgba(255, 120, 0, 0.2);
    border-left: 4px solid #ff7800;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.build-card:hover {
    border-color: rgba(255, 120, 0, 0.5);
    transform: translateX(3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.build-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.build-card-title {
    flex: 1;
}

.build-app-name {
    font-size: 18px;
    font-weight: 700;
    color: #ff9d00;
    margin-bottom: 5px;
}

.build-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: #888;
}

.build-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 10px;
    border-radius: 5px;
}

.build-meta-item i {
    color: #ff7800;
}

.build-status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.build-status-badge.success {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.4);
    color: #4caf50;
}

.build-status-badge.building {
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid rgba(255, 193, 7, 0.4);
    color: #ffc107;
}

.build-status-badge.failed {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.4);
    color: #f44336;
}

.build-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.build-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #ccc;
}

.build-info-row i {
    color: #ff7800;
    width: 20px;
}

.build-info-row a {
    color: #2196f3;
    text-decoration: none;
    transition: color 0.3s;
}

.build-info-row a:hover {
    color: #64b5f6;
    text-decoration: underline;
}

.build-card-actions {
    display: flex;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 120, 0, 0.1);
}

.build-download-btn {
    flex: 1;
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.4);
    border-radius: 8px;
    padding: 10px 20px;
    color: #4caf50;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.build-download-btn:hover {
    background: rgba(76, 175, 80, 0.3);
    border-color: #4caf50;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.build-delete-btn {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.4);
    border-radius: 8px;
    padding: 10px 20px;
    color: #f44336;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.build-delete-btn:hover {
    background: rgba(244, 67, 54, 0.3);
    border-color: #f44336;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.3);
}

.no-builds {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-builds i {
    font-size: 64px;
    color: #444;
    margin-bottom: 15px;
}

.no-builds p {
    font-size: 16px;
    color: #999;
}

/* Responsive для билдера */
@media (max-width: 1024px) {
    .build-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .icon-upload-container {
        flex-direction: column;
    }

    .build-card-header {
        flex-direction: column;
        gap: 10px;
    }

    .build-card-actions {
        flex-direction: column;
    }
}

/* ============================================
   СТАТИСТИКА ВОРКЕРОВ
   ============================================ */

/* Кнопка обновления статистики */
.refresh-stats-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #ff7800 0%, #ff9d00 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 120, 0, 0.3);
}

.refresh-stats-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 120, 0, 0.4);
}

.refresh-stats-btn i {
    transition: transform 0.3s;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Общая статистика */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.overview-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 1px solid rgba(255, 120, 0, 0.2);
    border-radius: 20px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.overview-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 120, 0, 0.1), transparent);
    transition: left 0.5s;
}

.overview-card:hover::before {
    left: 100%;
}

.overview-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 120, 0, 0.5);
    box-shadow: 0 15px 40px rgba(255, 120, 0, 0.3);
}

.overview-icon {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.overview-content {
    flex: 1;
}

.overview-value {
    font-size: 42px;
    font-weight: 700;
    background: linear-gradient(135deg, #ff7800 0%, #ff9d00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 8px;
}

.overview-label {
    font-size: 14px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Секция воркеров */
.workers-section {
    margin-top: 30px;
}

.section-title {
    font-size: 24px;
    color: #fff;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.section-title i {
    color: #ff7800;
}

.workers-list {
    display: grid;
    gap: 20px;
}

/* Карточка воркера */
.worker-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 1px solid rgba(255, 120, 0, 0.2);
    border-radius: 20px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.worker-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(255, 120, 0, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.worker-card:hover::before {
    opacity: 1;
}

.worker-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 120, 0, 0.5);
    box-shadow: 0 15px 40px rgba(255, 120, 0, 0.3);
}

/* Градиенты для топ-3 */
.worker-card.gradient-gold {
    border-color: rgba(255, 215, 0, 0.4);
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.worker-card.gradient-gold::before {
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.6), transparent);
}

.worker-card.gradient-silver {
    border-color: rgba(192, 192, 192, 0.4);
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.worker-card.gradient-silver::before {
    background: linear-gradient(90deg, transparent, rgba(192, 192, 192, 0.6), transparent);
}

.worker-card.gradient-bronze {
    border-color: rgba(205, 127, 50, 0.4);
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.worker-card.gradient-bronze::before {
    background: linear-gradient(90deg, transparent, rgba(205, 127, 50, 0.6), transparent);
}

.worker-card-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.worker-rank {
    flex-shrink: 0;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    width: 50px;
    height: 50px;
}

.rank-badge i {
    font-size: 32px;
    animation: rank-pulse 2s ease-in-out infinite;
}

.rank-number {
    font-size: 24px;
    font-weight: 700;
    color: #999;
    background: linear-gradient(135deg, #333, #555);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes rank-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.worker-info {
    flex: 1;
    min-width: 0;
}

.worker-id {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 10px;
}

.worker-id i {
    color: #ff7800;
    font-size: 16px;
}

.worker-stats-mini {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-badge.online {
    color: #00ff88;
}

.stat-badge.online i {
    color: #00ff88;
    font-size: 8px;
}

.stat-badge.offline {
    color: #999;
}

.stat-badge.offline i {
    color: #999;
    font-size: 8px;
}

.worker-total {
    text-align: right;
    flex-shrink: 0;
}

.total-number {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, #ff7800 0%, #ff9d00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 5px;
}

.total-label {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Прогресс-бар */
.worker-progress {
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff7800 0%, #ff9d00 100%);
    border-radius: 10px;
    transition: width 0.8s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    font-size: 12px;
    color: #666;
    text-align: right;
}

/* Превью устройств */
.worker-devices-preview {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.device-mini {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.device-mini.online {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2) 0%, rgba(0, 204, 102, 0.2) 100%);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: #00ff88;
}

.device-mini.offline {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #666;
}

.device-mini.more {
    background: rgba(255, 120, 0, 0.1);
    border: 1px solid rgba(255, 120, 0, 0.3);
    color: #ff7800;
    font-weight: 600;
    font-size: 12px;
}

.device-mini:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Нет воркеров */
.no-workers {
    text-align: center;
    padding: 80px 20px;
    color: #666;
}

.no-workers i {
    font-size: 64px;
    color: #444;
    margin-bottom: 15px;
}

.no-workers p {
    font-size: 16px;
    color: #999;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-overview {
        grid-template-columns: 1fr;
    }

    .worker-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .worker-total {
        text-align: left;
        width: 100%;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* ============================================
   УЛУЧШЕННАЯ СТАТИСТИКА ВОРКЕРОВ
   ============================================ */

/* Фоновые частицы */
.particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.3;
}

#page-stats {
    position: relative;
    z-index: 1;
}

#particles-canvas {
    width: 100%;
    height: 100%;
}

/* Улучшенный заголовок */
.page-header {
    position: relative;
    z-index: 1;
}

.header-content h2 {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.title-icon {
    font-size: 36px;
    animation: pulse-glow 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(255, 120, 0, 0.6));
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ff7800;
}

.title-icon i {
    font-size: inherit;
}

.title-text {
    background: linear-gradient(135deg, #ff7800 0%, #ff9d00 50%, #ff7800 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
    font-size: 32px;
    font-weight: 700;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 20px rgba(255, 120, 0, 0.3);
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes pulse-glow {
    0%, 100% { 
        transform: scale(1); 
        filter: drop-shadow(0 0 15px rgba(255, 120, 0, 0.6)) drop-shadow(0 0 30px rgba(255, 120, 0, 0.3));
    }
    50% { 
        transform: scale(1.05); 
        filter: drop-shadow(0 0 25px rgba(255, 120, 0, 0.9)) drop-shadow(0 0 50px rgba(255, 120, 0, 0.5));
    }
}

.title-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    height: 150%;
    background: radial-gradient(ellipse at center, rgba(255, 120, 0, 0.4) 0%, rgba(255, 120, 0, 0.2) 30%, transparent 70%);
    animation: glow-pulse 2s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
    border-radius: 50%;
    filter: blur(20px);
}

@keyframes glow-pulse {
    0%, 100% { 
        opacity: 0.4; 
        transform: translate(-50%, -50%) scale(1);
    }
    50% { 
        opacity: 0.7; 
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.header-subtitle {
    color: #999;
    font-size: 14px;
    margin-top: 5px;
}

/* Улучшенные карточки статистики */
.overview-card {
    position: relative;
    overflow: hidden;
}

.card-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 120, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 157, 0, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.overview-card:hover .card-bg-pattern {
    opacity: 1;
}

.card-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: rotate(45deg);
    transition: left 0.5s, top 0.5s;
    pointer-events: none;
}

.overview-card:hover .card-shine {
    left: 100%;
    top: 100%;
}

.card-glow-1:hover { box-shadow: 0 15px 40px rgba(255, 120, 0, 0.4); }
.card-glow-2:hover { box-shadow: 0 15px 40px rgba(0, 212, 255, 0.4); }
.card-glow-3:hover { box-shadow: 0 15px 40px rgba(0, 255, 136, 0.4); }
.card-glow-4:hover { box-shadow: 0 15px 40px rgba(255, 107, 107, 0.4); }

.icon-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 18px;
    background: inherit;
    opacity: 0;
    animation: icon-pulse 2s ease-in-out infinite;
}

@keyframes icon-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.3; }
}

.overview-trend {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 12px;
    color: #00ff88;
    font-weight: 600;
}

.overview-trend i {
    animation: bounce-up 1s ease-in-out infinite;
}

@keyframes bounce-up {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* График распределения */
.chart-section {
    margin: 40px 0;
}

.chart-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 1px solid rgba(255, 120, 0, 0.2);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.chart-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ff7800, transparent);
}

.chart-header {
    margin-bottom: 20px;
}

.chart-header h3 {
    font-size: 20px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-header i {
    color: #ff7800;
}

.chart-container {
    position: relative;
    height: 300px;
}

#distribution-chart {
    width: 100%;
    height: 100%;
}

/* Улучшенные карточки воркеров */
.worker-card {
    position: relative;
}

.worker-card-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #ff7800, #ff9d00);
    border-radius: 22px;
    opacity: 0;
    z-index: -1;
    filter: blur(10px);
    transition: opacity 0.3s;
}

.worker-card:hover .worker-card-glow {
    opacity: 0.5;
}

.rank-crown {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
    animation: crown-rotate 3s linear infinite;
}

.rank-crown i {
    font-size: 16px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes crown-rotate {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.progress-online {
    font-size: 11px;
    color: #00ff88;
    font-weight: 600;
}

.progress-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
    pointer-events: none;
}

.worker-chart-mini {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 80px;
    height: 80px;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.worker-card:hover .worker-chart-mini {
    opacity: 1;
}

.worker-chart {
    width: 100%;
    height: 100%;
}

.device-status-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 6px currentColor;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

.device-mini {
    animation: device-appear 0.5s ease-out backwards;
}

@keyframes device-appear {
    from {
        opacity: 0;
        transform: scale(0) rotate(180deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Улучшенный заголовок секции */
.section-title {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 10px;
}

.title-icon-animated {
    font-size: 28px;
    animation: icon-bounce 2s ease-in-out infinite;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ff7800;
}

.title-icon-animated i {
    font-size: inherit;
}

@keyframes icon-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.title-underline {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff7800, #ff9d00, #ff7800);
    background-size: 200% 100%;
    animation: underline-flow 3s linear infinite;
    border-radius: 2px;
}

@keyframes underline-flow {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

/* Улучшенное "нет воркеров" */
.no-workers-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, rgba(255, 120, 0, 0.1), rgba(255, 157, 0, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.no-workers-icon::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid rgba(255, 120, 0, 0.3);
    animation: rotate-border 3s linear infinite;
}

@keyframes rotate-border {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.no-workers-icon i {
    font-size: 48px;
    color: #ff7800;
    position: relative;
    z-index: 1;
}

/* ========== READONLY DEVICES STYLES (для WORKER) ========== */

/* Карточки устройств только для просмотра (WORKER) */
.device-card.readonly {
    cursor: default;
    opacity: 0.85;
}

.device-card.readonly:hover {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8) 0%, rgba(45, 45, 45, 0.8) 100%);
    border-color: rgba(255, 120, 0, 0.2);
    transform: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.device-card.readonly:hover .device-card-glow {
    opacity: 0;
}

.device-card.readonly:hover .device-card-pattern {
    opacity: 0;
}

.device-card.readonly:hover .device-hover-effect {
    opacity: 0;
}

.device-card.readonly:hover .device-icon {
    transform: none;
}

.device-card.readonly:hover .device-worker-id {
    transform: none;
}

/* ========== TAKEN DEVICES STYLES ========== */

/* Взятое устройство - другой цвет */
.device-card.taken {
    border: 2px solid #4a90e2;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1) 0%, rgba(74, 144, 226, 0.05) 100%);
}

.device-card.taken .device-card-glow {
    background: radial-gradient(circle, rgba(74, 144, 226, 0.3) 0%, transparent 70%);
}

.device-card.taken:hover .device-card-glow {
    background: radial-gradient(circle, rgba(74, 144, 226, 0.5) 0%, transparent 70%);
}

/* Тег воркера в карточке устройства */
.device-taken-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.2) 0%, rgba(74, 144, 226, 0.1) 100%);
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 8px;
    margin-top: 8px;
    font-size: 12px;
    color: #4a90e2;
    font-weight: 600;
}

.device-taken-badge i {
    font-size: 14px;
}

.device-last-release {
    margin-top: 8px;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.15) 0%, rgba(100, 181, 246, 0.05) 100%);
    border: 1px solid rgba(100, 181, 246, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
}

.device-last-release i {
    color: #64b5f6;
    font-size: 14px;
    margin-top: 2px;
    flex-shrink: 0;
}

.last-release-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.last-release-label {
    color: #64b5f6;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.last-release-reason {
    color: #ccc;
    font-size: 12px;
    line-height: 1.4;
    word-wrap: break-word;
}

.last-release-date {
    color: #999;
    font-size: 10px;
    margin-top: 2px;
}

/* Информация о взятом устройстве в деталях */
.device-taken-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.15) 0%, rgba(74, 144, 226, 0.05) 100%);
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 8px;
    font-size: 13px;
    color: #4a90e2;
}

.device-taken-info i {
    font-size: 16px;
}

.device-taken-info strong {
    color: #2c5aa0;
}

/* Кнопка отпустить устройство */
.device-detail-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-release-device {
    position: relative;
    padding: 12px 28px;
    background: linear-gradient(135deg, #ff4d4f 0%, #ff8a00 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    box-shadow: 0 12px 25px rgba(255, 77, 79, 0.35);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.btn-release-device::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.35), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-release-device::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.3);
    opacity: 0.4;
    pointer-events: none;
}

.btn-release-device:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 35px rgba(255, 77, 79, 0.45);
    border-color: rgba(255, 255, 255, 0.35);
}

.btn-release-device:hover::before {
    opacity: 1;
}

.btn-release-device:active {
    transform: translateY(0);
    box-shadow: 0 8px 18px rgba(255, 77, 79, 0.35);
}

.btn-release-device i {
    font-size: 16px;
}

.btn-disconnect-device {
    position: relative;
    padding: 10px 24px;
    background: rgba(255, 80, 80, 0.15);
    border: 1px solid rgba(255, 80, 80, 0.4);
    border-radius: 12px;
    color: #ff6161;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.btn-disconnect-device::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-disconnect-device:hover {
    border-color: rgba(255, 97, 97, 0.8);
    color: #fff;
    background: rgba(255, 80, 80, 0.35);
}

.btn-disconnect-device:hover::before {
    opacity: 1;
}

.btn-disconnect-device i {
    font-size: 16px;
}

.alert-warning {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(255, 153, 0, 0.1);
    border: 1px solid rgba(255, 153, 0, 0.3);
    color: #ffba55;
    font-size: 13px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.alert-warning i {
    color: #ff9b00;
    font-size: 16px;
}

/* ========== TELEGRAM PAGE ========== */

#page-telegram {
    position: relative;
    overflow: hidden;
    background: transparent;
}

.telegram-snow {
    display: none;
}

.winter-header {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.9), rgba(32, 22, 12, 0.95));
    border: 1px solid rgba(255, 120, 0, 0.15);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border-radius: 18px;
    margin-bottom: 30px;
}

/* Информационный блок */
.telegram-info-section {
    margin-bottom: 30px;
}

.info-card {
    background: linear-gradient(135deg, rgba(255, 120, 0, 0.08), rgba(255, 120, 0, 0.03));
    border: 1px solid rgba(255, 120, 0, 0.2);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    gap: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.info-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #ff7800, #ffac3d);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2b1300;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(255, 120, 0, 0.3);
}

.info-content h3 {
    margin: 0 0 16px 0;
    color: #ffe3c4;
    font-size: 18px;
    font-weight: 600;
}

.info-content ul {
    margin: 0;
    padding-left: 20px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.8;
}

.info-content li {
    margin-bottom: 8px;
}

.info-content a {
    color: #ff9d00;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.info-content a:hover {
    color: #ffac3d;
    text-decoration: underline;
}

/* Секции */
.telegram-wrapper {
    padding: 0 20px 60px;
}

.telegram-form {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.telegram-section {
    background: rgba(20, 20, 20, 0.4);
    border: 1px solid rgba(255, 120, 0, 0.1);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.section-header {
    display: flex;
    gap: 20px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 120, 0, 0.15);
}

.section-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(255, 120, 0, 0.2), rgba(255, 120, 0, 0.1));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff9d00;
    font-size: 28px;
    border: 1px solid rgba(255, 120, 0, 0.2);
}

.section-title-group {
    flex: 1;
}

.section-title {
    margin: 0 0 6px 0;
    color: #ffe3c4;
    font-size: 22px;
    font-weight: 700;
}

.section-subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    line-height: 1.5;
}

.telegram-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.telegram-card {
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(255, 120, 0, 0.15);
    background: linear-gradient(135deg, rgba(27, 17, 9, 0.9), rgba(11, 8, 5, 0.95));
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.telegram-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 120, 0, 0.3);
}

.glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.glass-card:hover::before {
    opacity: 1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    color: #ffe3c4;
    font-weight: 600;
    flex: 1;
}

.card-title i {
    color: #ff9d00;
    font-size: 20px;
}

.card-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.badge-primary {
    background: linear-gradient(135deg, rgba(255, 120, 0, 0.3), rgba(255, 120, 0, 0.2));
    color: #ffac3d;
    border: 1px solid rgba(255, 120, 0, 0.4);
}

.badge-secondary {
    background: linear-gradient(135deg, rgba(100, 100, 100, 0.3), rgba(100, 100, 100, 0.2));
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 16px;
    line-height: 1.6;
}

.card-description strong {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.card-example {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 3px solid #ff9d00;
}

.card-example i {
    color: #ff9d00;
    font-size: 14px;
}

.card-example span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Courier New', monospace;
}

.card-example code {
    background: rgba(255, 120, 0, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    color: #ffac3d;
    font-family: 'Courier New', monospace;
}

.winter-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f5f5f5;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    width: 100%;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.winter-input:focus {
    outline: none;
    border-color: rgba(255, 120, 0, 0.5);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 120, 0, 0.1);
}

.winter-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.telegram-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 120, 0, 0.1);
}

.btn-telegram-save {
    background: linear-gradient(135deg, #ff7800 0%, #ffac3d 100%);
    border: none;
    border-radius: 999px;
    padding: 16px 32px;
    color: #2b1300;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 15px 35px rgba(255, 120, 0, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-telegram-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(255, 120, 0, 0.45);
}

.btn-telegram-save:active {
    transform: translateY(0);
}

.telegram-status {
    min-height: 22px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
}

.telegram-status.success {
    color: #c5ffdf;
}

.telegram-status.error {
    color: #ff8b8b;
}

/* Адаптивность */
@media (max-width: 768px) {
    .telegram-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        gap: 16px;
    }
    
    .info-card {
        flex-direction: column;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ========== MODAL DIALOGS STYLES ========== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.modal-dialog {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 500px;
    border: 1px solid rgba(255, 120, 0, 0.3);
    overflow: hidden;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(255, 120, 0, 0.1) 0%, transparent 100%);
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h3 i {
    color: #ff7800;
}

.modal-close {
    background: transparent;
    border: none;
    color: #999;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 24px;
    color: #ccc;
}

.modal-body p {
    margin: 0 0 16px 0;
    font-size: 14px;
    line-height: 1.5;
}

.device-info-preview {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
}

.device-info-preview div {
    margin-bottom: 8px;
    font-size: 14px;
}

.device-info-preview div:last-child {
    margin-bottom: 0;
}

.device-info-preview strong {
    color: #ff7800;
    margin-right: 8px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: rgba(0, 0, 0, 0.2);
}

.btn-cancel,
.btn-confirm {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.btn-confirm {
    background: linear-gradient(135deg, #ff7800 0%, #ff9d00 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 120, 0, 0.3);
}

.btn-confirm:hover {
    background: linear-gradient(135deg, #ff9d00 0%, #ff7800 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 120, 0, 0.4);
}

.btn-confirm:active {
    transform: translateY(0);
}

#release-reason {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

#release-reason:focus {
    outline: none;
    border-color: #ff7800;
    background: rgba(255, 255, 255, 0.08);
}

#release-reason::placeholder {
    color: #666;
}

/* ========== RELEASE HISTORY STYLES ========== */

.release-history-section {
    margin-top: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
}

.release-history-section .sms-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.btn-refresh-history {
    padding: 6px 12px;
    background: rgba(255, 120, 0, 0.2);
    border: 1px solid rgba(255, 120, 0, 0.3);
    border-radius: 6px;
    color: #ff7800;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-refresh-history:hover {
    background: rgba(255, 120, 0, 0.3);
    border-color: rgba(255, 120, 0, 0.5);
}

.btn-refresh-history i {
    font-size: 12px;
}

.release-history-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.loading-history {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
}

.release-history-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s ease;
}

.release-history-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 120, 0, 0.3);
}

.release-history-header {
    margin-bottom: 12px;
}

.release-history-info {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    font-size: 13px;
}

.release-vbiv-id {
    color: #4a90e2;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.release-vbiv-id i {
    font-size: 14px;
}

.release-date {
    color: #999;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.release-date i {
    font-size: 12px;
    color: #666;
}

.release-history-reason {
    padding: 12px;
    background: rgba(255, 120, 0, 0.1);
    border-left: 3px solid #ff7800;
    border-radius: 4px;
    color: #ccc;
    font-size: 13px;
    line-height: 1.5;
}

.release-history-reason strong {
    color: #ff7800;
    margin-right: 8px;
}

/* ============================================
   КОМПЛЕКСНАЯ ОПТИМИЗАЦИЯ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ
   ============================================ */

/* Базовые настройки для маленьких экранов - объединено ниже */

/* Оптимизация лейаута устройств для мобильных */
@media (max-width: 768px) {
    .devices-layout {
        grid-template-columns: 1fr;
        gap: 15px;
        height: auto;
        min-height: calc(100vh - 180px);
    }
    
    .devices-sidebar {
        padding: 16px;
        border-radius: 15px;
        overflow-x: hidden;
    }
    
    .device-content {
        overflow-x: hidden;
    }
}

/* Оптимизация навигации для мобильных */
@media (max-width: 768px) {
    .navbar {
        padding: 12px 15px;
        border-radius: 15px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .navbar-brand {
        flex: 1;
        min-width: 0;
    }
    
    .navbar-brand h1 {
        font-size: 16px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 200px;
    }
    
    .logo-icon {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }
    
    .navbar-menu {
        order: 3;
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 10px;
    }
    
    .nav-item {
        padding: 10px 8px;
        font-size: 11px;
        flex: 1 1 auto;
        min-width: 80px;
        max-width: 120px;
        justify-content: center;
        text-align: center;
    }
    
    .nav-icon {
        font-size: 18px;
    }
    
    .nav-text {
        font-size: 10px;
        margin-top: 4px;
    }
    
    .connection-status {
        order: 2;
        width: 100%;
        justify-content: space-between;
        padding: 8px 12px;
        font-size: 11px;
        margin-top: 10px;
    }
    
    #logout-btn {
        padding: 6px 12px;
        font-size: 11px;
        margin-left: 10px;
    }
}

/* Оптимизация layout устройств для мобильных */
@media (max-width: 1024px) {
    .devices-layout {
        grid-template-columns: 1fr;
        height: auto;
        gap: 15px;
    }
    
    .devices-sidebar {
        max-height: none;
        overflow-y: auto;
        order: 1;
    }
    
    .device-details {
        order: 2;
    }
}

@media (max-width: 768px) {
    .devices-sidebar {
        max-height: none;
        padding: 15px;
        border-radius: 15px;
    }
    
    .sidebar-header {
        padding-bottom: 15px;
        margin-bottom: 15px;
    }
    
    .sidebar-title-wrapper {
        margin-bottom: 12px;
    }
    
    .sidebar-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .sidebar-header h3 {
        font-size: 18px;
    }
    
    .stats-mini {
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .stat-mini-card {
        padding: 10px;
    }
    
    .stat-mini-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .stat-mini-value {
        font-size: 18px;
    }
    
    .stat-mini-label {
        font-size: 10px;
    }
    
    .devices-list {
        gap: 12px;
    }
}

/* Оптимизация карточек устройств для мобильных - ПОЛНАЯ ВЕРСИЯ КАК НА ПК */
@media (max-width: 768px) {
    .device-card {
        padding: 18px;
        border-radius: 18px;
    }
    
    .device-header {
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
        flex-wrap: nowrap;
    }
    
    .device-icon-wrapper {
        width: 55px;
        height: 55px;
        flex-shrink: 0;
    }
    
    .device-icon {
        width: 55px;
        height: 55px;
        font-size: 22px;
        border-radius: 13px;
    }
    
    .device-icon-ring {
        inset: -2px;
        border-radius: 16px;
    }
    
    .device-status-badge {
        width: 20px;
        height: 20px;
        font-size: 10px;
        top: -2px;
        right: -2px;
    }
    
    .device-info {
        flex: 1;
        min-width: 0;
    }
    
    .device-brand {
        font-size: 15px;
        font-weight: 700;
    }
    
    .device-brand i {
        font-size: 13px;
    }
    
    .device-model {
        font-size: 13px;
    }
    
    .device-model i {
        font-size: 11px;
    }
    
    .device-android {
        font-size: 12px;
        padding: 4px 8px;
        margin-top: 4px;
    }
    
    .device-android i {
        font-size: 13px;
    }
    
    .device-status {
        align-items: flex-end;
        align-self: flex-start;
    }
    
    .status-indicator {
        gap: 5px;
    }
    
    .status-dot {
        width: 9px;
        height: 9px;
    }
    
    .status-text {
        font-size: 10px;
    }
    
    .device-footer {
        margin-top: 15px;
        gap: 10px;
    }
    
    .device-worker-id {
        padding: 12px;
        gap: 10px;
        border-radius: 12px;
    }
    
    .worker-id-icon {
        width: 34px;
        height: 34px;
        font-size: 15px;
        border-radius: 9px;
    }
    
    .worker-id-content {
        gap: 4px;
    }
    
    .worker-id-label,
    .fox-id-label {
        font-size: 10px;
    }
    
    .worker-id-value,
    .fox-id-value {
        font-size: 14px;
        font-weight: 600;
    }
    
    .device-sim-info {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .sim-badge {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .sim-badge i {
        font-size: 11px;
    }
    
    .device-app-name {
        font-size: 12px;
        padding: 8px 10px;
    }
    
    .device-app-name i {
        font-size: 13px;
    }
    
    .device-taken-badge {
        font-size: 11px;
        padding: 6px 10px;
    }
    
    .device-last-release {
        font-size: 11px;
        padding: 8px 10px;
    }
    
    .device-last-release i {
        font-size: 12px;
    }
}

/* Оптимизация деталей устройства для мобильных - ВСЁ В СТОЛБИК */
@media (max-width: 768px) {
    .device-content {
        padding: 16px;
        border-radius: 15px;
        overflow-x: hidden;
        width: 100%;
    }
    
    .device-details {
        padding: 15px;
        border-radius: 15px;
        width: 100%;
        overflow-x: hidden;
    }
    
    .device-detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding-bottom: 15px;
        margin-bottom: 15px;
    }
    
    .device-detail-title h3 {
        font-size: 20px;
        word-break: break-word;
    }
    
    .device-detail-subtitle {
        font-size: 13px;
        word-break: break-word;
    }
    
    /* ID чипы в столбик */
    .device-detail-identifiers {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    
    .id-chip {
        width: 100%;
        min-width: unset;
        box-sizing: border-box;
    }
    
    .id-chip strong {
        word-break: break-all;
        font-size: 13px;
    }
    
    /* Сетка информации в 1 колонку */
    .device-info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        width: 100%;
    }
    
    .info-item {
        padding: 12px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .info-label {
        font-size: 10px;
    }
    
    .info-value {
        font-size: 13px;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    /* SIM карты в столбик */
    .sim-details {
        grid-template-columns: 1fr;
        gap: 12px;
        width: 100%;
    }
    
    .sim-detail-card {
        width: 100%;
        box-sizing: border-box;
        padding: 12px;
    }
    
    .sim-phone {
        font-size: 14px;
        word-break: break-word;
    }
    
    .sim-operator {
        font-size: 11px;
        word-break: break-word;
    }
    
    /* Секции деталей */
    .device-details-actions {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }
    
    .device-details-btn {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
    
    .device-details-content {
        gap: 15px;
        width: 100%;
    }
    
    .detail-section {
        padding: 15px;
        border-radius: 12px;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    .detail-section h4 {
        font-size: 16px;
        margin-bottom: 12px;
        word-break: break-word;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        width: 100%;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        width: 100%;
        word-break: break-word;
    }
    
    .detail-label {
        font-size: 12px;
    }
    
    .detail-value {
        font-size: 14px;
        word-break: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
    
    /* SMS секция */
    .sms-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .sms-header h4 {
        font-size: 16px;
    }
    
    /* Ошибка деталей */
    .device-details-error {
        padding: 40px 20px;
    }
    
    .device-details-error i {
        font-size: 48px;
    }
    
    .device-details-error h3 {
        font-size: 20px;
        word-break: break-word;
    }
    
    .device-details-error p {
        font-size: 14px;
        word-break: break-word;
    }
    
    /* Промпт выбора устройства */
    .select-device-prompt {
        padding: 40px 20px;
    }
    
    .select-device-prompt h3 {
        font-size: 20px;
        word-break: break-word;
    }
    
    .select-device-prompt p {
        font-size: 13px;
        word-break: break-word;
    }
}

/* Оптимизация форм и модальных окон для мобильных - УЛУЧШЕННАЯ ВЕРСИЯ */
@media (max-width: 768px) {
    .modal-dialog {
        width: calc(100% - 20px);
        max-width: 100%;
        margin: 10px;
        border-radius: 15px;
        max-height: calc(100vh - 20px);
        display: flex;
        flex-direction: column;
    }
    
    .modal-header {
        padding: 16px;
        flex-shrink: 0;
    }
    
    .modal-header h3 {
        font-size: 18px;
        font-weight: 600;
        line-height: 1.3;
    }
    
    .modal-body {
        padding: 16px;
        max-height: calc(100vh - 180px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        flex: 1;
    }
    
    .modal-footer {
        padding: 16px;
        flex-shrink: 0;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-group label {
        font-size: 13px;
        margin-bottom: 8px;
        font-weight: 500;
        display: block;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 14px;
        font-size: 15px;
        border-radius: 10px;
        width: 100%;
        min-height: 44px;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }
    
    .form-group textarea {
        min-height: 100px;
        resize: vertical;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 12px;
        margin-top: 20px;
    }
    
    .form-actions button {
        width: 100%;
        padding: 14px;
        font-size: 15px;
        font-weight: 600;
        min-height: 48px;
    }
}

/* Оптимизация билдера для мобильных */
@media (max-width: 768px) {
    .build-layout {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .build-section,
    .builds-history-section {
        padding: 20px;
        border-radius: 15px;
    }
    
    .build-section-header,
    .builds-history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding-bottom: 15px;
        margin-bottom: 20px;
    }
    
    .build-section-header h3,
    .builds-history-header h3 {
        font-size: 18px;
    }
    
    .build-form {
        gap: 15px;
    }
    
    .icon-upload-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .icon-upload-btn {
        padding: 30px 20px;
        width: 100%;
    }
    
    .icon-preview {
        width: 100%;
        max-width: 100%;
    }
    
    .build-card {
        padding: 15px;
        border-radius: 12px;
    }
    
    .build-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .build-card-actions {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }
    
    .build-card-btn {
        width: 100%;
        padding: 10px;
        font-size: 13px;
    }
}

/* Оптимизация админ панели для мобильных */
@media (max-width: 768px) {
    .admin-section {
        padding: 15px;
        border-radius: 15px;
    }
    
    .admin-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .admin-section-header h2 {
        font-size: 20px;
    }
    
    .admin-btn-primary {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
    
    .users-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .user-card {
        padding: 15px;
        border-radius: 12px;
    }
    
    .user-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .user-actions {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }
    
    .user-action-btn {
        width: 100%;
        padding: 10px;
        font-size: 13px;
    }
}

/* Оптимизация статистики для мобильных */
@media (max-width: 768px) {
    .stats-overview {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .overview-card {
        padding: 20px;
        border-radius: 15px;
    }
    
    .worker-card {
        padding: 15px;
        border-radius: 12px;
    }
    
    .worker-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .worker-total {
        width: 100%;
        text-align: left;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .header-content h2 {
        font-size: 24px;
    }
    
    .title-icon {
        font-size: 28px;
    }
    
    .title-text {
        font-size: 24px;
    }
}

/* Оптимизация USSD секции для мобильных */
@media (max-width: 768px) {
    .ussd-section {
        padding: 15px;
        border-radius: 12px;
    }
    
    .ussd-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 15px;
    }
    
    .ussd-header h4 {
        font-size: 16px;
    }
    
    .ussd-form {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .ussd-execute-btn {
        width: 100%;
        padding: 12px;
        justify-content: center;
    }
}

/* Оптимизация массовой рассылки SMS для мобильных */
@media (max-width: 768px) {
    .bulk-sms-section {
        margin-bottom: 20px;
    }
    
    .bulk-sms-card {
        padding: 15px;
        border-radius: 12px;
    }
    
    .bulk-sms-form {
        gap: 12px;
    }
    
    .bulk-sms-form-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .bulk-sms-form-group > * {
        width: 100%;
    }
    
    #bulk-sms-send-btn {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
    
    .bulk-sms-progress {
        margin-top: 15px;
    }
}

/* Оптимизация для очень маленьких экранов (до 480px) - ПОЛНАЯ ВЕРСИЯ */
@media (max-width: 480px) {
    body {
        padding: 8px;
        overflow-x: hidden;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
        overflow-x: hidden;
    }
    
    .navbar {
        padding: 12px;
        border-radius: 15px;
    }
    
    .navbar-brand {
        gap: 10px;
    }
    
    .navbar-brand h1 {
        font-size: 15px;
        max-width: 160px;
        letter-spacing: 0.5px;
    }
    
    .logo-icon {
        width: 30px;
        height: 30px;
    }
    
    .nav-item {
        padding: 10px 8px;
        min-width: 65px;
        font-size: 10px;
    }
    
    .nav-icon {
        font-size: 17px;
    }
    
    .nav-text {
        font-size: 9px;
        letter-spacing: 0.3px;
    }
    
    .stats {
        gap: 12px;
    }
    
    .stat-card {
        padding: 18px;
        border-radius: 15px;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .stat-label {
        font-size: 11px;
        letter-spacing: 1px;
    }
    
    .controls {
        gap: 10px;
    }
    
    #search,
    #filter-select,
    #refresh-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .device-card {
        padding: 14px;
        border-radius: 15px;
    }
    
    .device-icon-wrapper {
        width: 48px;
        height: 48px;
    }
    
    .device-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
        border-radius: 12px;
    }
    
    .device-brand {
        font-size: 14px;
    }
    
    .device-model {
        font-size: 12px;
    }
    
    .device-android {
        font-size: 11px;
        padding: 3px 7px;
    }
    
    .status-text {
        font-size: 9px;
    }
    
    .worker-id-label,
    .fox-id-label {
        font-size: 9px;
    }
    
    .worker-id-value,
    .fox-id-value {
        font-size: 13px;
    }
    
    /* Детали устройства на очень маленьких экранах */
    .device-content {
        padding: 12px;
    }
    
    .device-detail-header {
        padding-bottom: 12px;
        margin-bottom: 12px;
    }
    
    .device-detail-title h3 {
        font-size: 18px;
    }
    
    .id-chip {
        padding: 8px 10px;
    }
    
    .id-chip span {
        font-size: 9px;
    }
    
    .id-chip strong {
        font-size: 12px;
    }
    
    .info-item {
        padding: 10px;
    }
    
    .info-value {
        font-size: 12px;
    }
    
    .sim-detail-card {
        padding: 10px;
    }
    
    .sim-phone {
        font-size: 13px;
    }
    
    /* Секция приложений на очень маленьких экранах */
    .apps-section {
        padding: 14px;
    }
    
    .apps-header h4 {
        font-size: 15px;
    }
    
    .apps-count {
        font-size: 12px;
        padding: 5px 10px;
    }
    
    .apps-toggle-btn {
        padding: 9px 14px;
        font-size: 13px;
    }
    
    .modal-dialog {
        width: calc(100% - 12px);
        margin: 6px;
        border-radius: 12px;
        max-height: calc(100vh - 12px);
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 14px;
    }
    
    .modal-header h3 {
        font-size: 16px;
    }
    
    .modal-body {
        max-height: calc(100vh - 140px);
    }
    
    .build-section,
    .builds-history-section,
    .admin-section {
        padding: 14px;
        border-radius: 12px;
    }
    
    .build-card,
    .user-card {
        padding: 14px;
        border-radius: 12px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 14px;
        padding: 12px;
    }
}

/* Оптимизация сообщений для мобильных устройств */
@media (max-width: 768px) {
    .messages-container {
        padding: 16px;
        border-radius: 15px;
        max-height: 500px;
    }
    
    .message-card {
        padding: 16px;
        border-radius: 12px;
        margin-bottom: 12px;
    }
    
    .message-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .sender {
        font-size: 16px;
    }
    
    .time {
        font-size: 12px;
        padding: 4px 10px;
    }
    
    .message-body {
        font-size: 14px;
        padding: 12px;
        line-height: 1.6;
        margin-bottom: 12px;
    }
    
    .device {
        font-size: 11px;
        padding: 5px 12px;
    }
}

/* Исправление проблем с горизонтальной прокруткой - УЛУЧШЕННАЯ ВЕРСИЯ */
@media (max-width: 768px) {
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    html, body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }
    
    .container {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
    }
    
    img {
        max-width: 100%;
        height: auto;
    }
    
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        max-width: 100%;
    }
    
    /* Предотвращение выхода текста за границы */
    p, span, div, h1, h2, h3, h4, h5, h6 {
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
    }
    
    /* Длинные URL и коды */
    code, pre {
        word-break: break-all;
        overflow-wrap: break-word;
        white-space: pre-wrap;
    }
    
    /* Все контейнеры не должны вылезать */
    .page,
    .page-content,
    .main-content,
    .devices-container,
    .device-details-panel {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
    }
}

/* Оптимизация скроллбаров для мобильных */
@media (max-width: 768px) {
    .devices-list::-webkit-scrollbar,
    .modal-body::-webkit-scrollbar,
    .devices-sidebar::-webkit-scrollbar,
    .messages-container::-webkit-scrollbar,
    .builds-list::-webkit-scrollbar {
        width: 4px;
    }
    
    .devices-list::-webkit-scrollbar-track,
    .modal-body::-webkit-scrollbar-track,
    .devices-sidebar::-webkit-scrollbar-track,
    .messages-container::-webkit-scrollbar-track,
    .builds-list::-webkit-scrollbar-track {
        background: rgba(255, 120, 0, 0.1);
        border-radius: 2px;
    }
    
    .devices-list::-webkit-scrollbar-thumb,
    .modal-body::-webkit-scrollbar-thumb,
    .devices-sidebar::-webkit-scrollbar-thumb,
    .messages-container::-webkit-scrollbar-thumb,
    .builds-list::-webkit-scrollbar-thumb {
        background: rgba(255, 120, 0, 0.3);
        border-radius: 2px;
    }
}

/* Улучшение touch-событий для мобильных */
@media (max-width: 768px) {
    button,
    .nav-item,
    .device-card,
    .build-card-btn,
    .user-action-btn,
    .message-card,
    .btn-danger,
    .btn-primary {
        -webkit-tap-highlight-color: rgba(255, 120, 0, 0.2);
        touch-action: manipulation;
    }
    
    input,
    select,
    textarea {
        font-size: 16px; /* Предотвращает зум на iOS */
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }
    
    /* Улучшенные размеры для кнопок на мобильных */
    button:not(.close-btn):not(.modal-close),
    .btn,
    .btn-primary,
    .btn-danger,
    .btn-secondary {
        min-height: 44px;
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* Оптимизация анимаций для мобильных (улучшение производительности) */
@media (max-width: 768px) {
    .device-card,
    .build-card,
    .user-card,
    .overview-card {
        will-change: transform;
    }
    
    .device-card:hover,
    .build-card:hover,
    .user-card:hover {
        transform: none; /* Отключаем transform на мобильных для лучшей производительности */
    }
}

/* Глобальные улучшения размеров шрифтов для мобильных */
@media (max-width: 768px) {
    /* Заголовки */
    h1 {
        font-size: 24px;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 20px;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 18px;
        line-height: 1.3;
    }
    
    h4 {
        font-size: 16px;
        line-height: 1.4;
    }
    
    h5 {
        font-size: 14px;
        line-height: 1.4;
    }
    
    /* Заголовки секций */
    .section-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .page-title {
        font-size: 22px;
    }
    
    /* Основной текст */
    p {
        font-size: 14px;
        line-height: 1.6;
    }
    
    /* Ссылки */
    a:not(.btn):not(.nav-item) {
        font-size: inherit;
        padding: 8px 0;
    }
    
    /* Списки */
    li {
        font-size: 14px;
        line-height: 1.6;
    }
    
    /* Таблицы */
    table {
        font-size: 13px;
    }
    
    th, td {
        padding: 10px 8px;
        font-size: 13px;
    }
    
    /* Метки и бейджи */
    .badge,
    .label,
    .tag {
        font-size: 11px;
        padding: 4px 10px;
    }
}

/* Дополнительные улучшения для очень маленьких экранов */
@media (max-width: 480px) {
    h1 {
        font-size: 22px;
    }
    
    h2 {
        font-size: 18px;
    }
    
    h3 {
        font-size: 16px;
    }
    
    h4 {
        font-size: 15px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    p, li {
        font-size: 13px;
        line-height: 1.5;
    }
    
    table, th, td {
        font-size: 12px;
    }
    
    .badge,
    .label,
    .tag {
        font-size: 10px;
        padding: 3px 8px;
    }
}

/* ========== УЛУЧШЕННЫЕ МОБИЛЬНЫЕ СТИЛИ ДЛЯ ДИАЛОГОВ ========== */
@media (max-width: 768px) {
    /* Кнопки диалогов - достаточно большие для пальцев */
    .btn-cancel,
    .btn-confirm {
        min-height: 48px;
        padding: 14px 20px;
        font-size: 15px;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .modal-footer {
        flex-direction: column-reverse;
        gap: 10px;
    }
    
    .modal-footer .btn-cancel,
    .modal-footer .btn-confirm {
        width: 100%;
    }
    
    /* Текстовое поле причины отпускания */
    #release-reason {
        min-height: 120px;
        font-size: 16px;
        padding: 14px;
    }
    
    /* Улучшение превью устройства в диалоге */
    .device-info-preview {
        padding: 16px;
        font-size: 14px;
    }
    
    .device-info-preview div {
        padding: 8px 0;
    }
}

/* ========== УЛУЧШЕННЫЙ NAVBAR ДЛЯ МАЛЕНЬКИХ ЭКРАНОВ ========== */
@media (max-width: 400px) {
    .navbar {
        padding: 10px;
        border-radius: 12px;
    }
    
    .navbar-brand {
        gap: 8px;
    }
    
    .navbar-brand h1 {
        font-size: 13px;
        max-width: 120px;
    }
    
    .logo-icon {
        width: 28px;
        height: 28px;
    }
    
    .nav-item {
        padding: 8px 6px;
        min-width: 55px;
        border-radius: 10px;
    }
    
    .nav-icon {
        font-size: 16px;
    }
    
    .nav-text {
        font-size: 8px;
        letter-spacing: 0;
    }
    
    .connection-status {
        padding: 6px 10px;
        font-size: 10px;
        border-radius: 20px;
    }
    
    #status-text {
        display: none;
    }
    
    #logout-btn {
        padding: 5px 10px;
        font-size: 10px;
        margin-left: 5px;
    }
}

/* ========== УЛУЧШЕННАЯ БОКОВАЯ ПАНЕЛЬ УСТРОЙСТВ ========== */
@media (max-width: 480px) {
    .devices-sidebar {
        max-height: none;
        padding: 12px;
        border-radius: 12px;
    }
    
    .sidebar-header {
        padding-bottom: 10px;
        margin-bottom: 10px;
    }
    
    .sidebar-header h3 {
        font-size: 16px;
    }
    
    .sidebar-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .stats-mini {
        gap: 6px;
    }
    
    .stat-mini-card {
        padding: 8px;
    }
    
    .stat-mini-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .stat-mini-value {
        font-size: 16px;
    }
    
    .stat-mini-label {
        font-size: 9px;
    }
    
    .devices-list {
        gap: 10px;
        max-height: none;
    }
    
    /* Полные карточки устройств как на ПК */
    .device-card {
        padding: 14px;
        border-radius: 14px;
    }
    
    .device-icon-wrapper,
    .device-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .device-brand {
        font-size: 14px;
    }
    
    .device-model {
        font-size: 12px;
    }
    
    .device-android {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .device-footer {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 12px;
    }
    
    .device-worker-id {
        padding: 10px;
        display: flex;
    }
    
    .worker-id-icon {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }
    
    .worker-id-label,
    .fox-id-label {
        font-size: 9px;
    }
    
    .worker-id-value,
    .fox-id-value {
        font-size: 12px;
    }
    
    .device-sim-info {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .sim-badge {
        padding: 8px;
        font-size: 11px;
    }
}

/* ========== УЛУЧШЕННАЯ ПАНЕЛЬ ДЕТАЛЕЙ УСТРОЙСТВА ========== */
@media (max-width: 480px) {
    .device-content {
        padding: 12px;
    }
    
    .device-details {
        padding: 12px;
        border-radius: 12px;
    }
    
    .device-detail-header {
        gap: 10px;
        padding-bottom: 12px;
        margin-bottom: 12px;
    }
    
    .device-detail-title h3 {
        font-size: 16px;
    }
    
    .device-detail-subtitle {
        font-size: 11px;
    }
    
    .id-chip {
        padding: 10px;
        border-radius: 8px;
    }
    
    .id-chip strong {
        font-size: 11px;
    }
    
    .info-item {
        padding: 10px;
        border-radius: 8px;
    }
    
    .info-label {
        font-size: 9px;
    }
    
    .info-value {
        font-size: 12px;
    }
    
    /* SIM карты */
    .sim-detail-card {
        padding: 10px;
    }
    
    .sim-phone {
        font-size: 13px;
    }
    
    .sim-operator {
        font-size: 10px;
    }
    
    /* Кнопки действий */
    .btn-release-device,
    .btn-disconnect-device {
        padding: 12px;
        font-size: 13px;
        min-height: 48px;
    }
    
    /* Сообщения SMS */
    .message-card {
        padding: 12px;
    }
    
    .sender {
        font-size: 14px;
    }
    
    .time {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .message-body {
        font-size: 13px;
        padding: 10px;
    }
    
    /* USSD секция */
    .ussd-section {
        padding: 12px;
    }
    
    .ussd-header h4 {
        font-size: 14px;
    }
    
    .ussd-input-group label {
        font-size: 11px;
    }
    
    .ussd-select,
    .ussd-input {
        font-size: 14px;
        padding: 10px;
        min-height: 44px;
    }
    
    .ussd-execute-btn {
        min-height: 44px;
        padding: 10px;
        font-size: 13px;
    }
}

/* ========== ФИКС ГОРИЗОНТАЛЬНОГО СКРОЛЛА ========== */
@media (max-width: 480px) {
    .device-detail-identifiers {
        overflow-x: hidden;
    }
    
    .device-info-grid {
        overflow-x: hidden;
    }
    
    .sim-details {
        overflow-x: hidden;
    }
    
    /* Длинный текст обрезаем */
    .worker-id-value,
    .fox-id-value,
    .info-value {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100%;
    }
    
    /* Но при клике можно увидеть полный текст */
    .worker-id-value:active,
    .fox-id-value:active,
    .info-value:active {
        white-space: normal;
        word-break: break-all;
    }
}

/* ========== УЛУЧШЕННЫЙ ФИЛЬТР И ПОИСК ========== */
@media (max-width: 480px) {
    .filter-toggle {
        margin-top: 8px;
    }
    
    .filter-switch {
        font-size: 12px;
    }
    
    .filter-slider {
        width: 40px;
        height: 22px;
    }
    
    .filter-slider::before {
        width: 18px;
        height: 18px;
    }
    
    input:checked + .filter-slider::before {
        transform: translateX(18px);
    }
}

/* ========== ПЛАВНАЯ ПРОКРУТКА ДЛЯ TOUCH ========== */
@media (max-width: 768px) {
    .devices-list,
    .messages-container,
    .modal-body,
    .builds-list {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* Скрываем скроллбар на мобильных для чистого вида */
    .devices-list::-webkit-scrollbar,
    .messages-container::-webkit-scrollbar {
        width: 3px;
    }
}

