* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: #f0f2f5;
    color: #1a1a2e;
    line-height: 1.5;
}

/* АВТОРИЗАЦИЯ */
.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.login-card h1 {
    font-size: 24px;
    color: #1a1a2e;
    margin-bottom: 8px;
    text-align: center;
}

.login-card h2 {
    font-size: 14px;
    color: #666;
    margin-bottom: 32px;
    text-align: center;
    font-weight: normal;
}

.login-form .form-group {
    margin-bottom: 16px;
}

.login-form input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-block {
    width: 100%;
    text-align: center;
    justify-content: center;
}

/* Кнопка "Совместимые картриджи для принтеров" */
.btn-cartridges-info {
    display: block;
    width: 100%;
    background: #f5f5f5;
    border: 1px solid #ddd;
    color: #667eea;
    cursor: pointer;
    font-size: 14px;
    margin-top: 20px;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.2s;
    text-align: center;
    font-weight: 500;
}

.btn-cartridges-info:hover {
    background: #e8e8e8;
    border-color: #667eea;
}

.btn-cartridges-info i {
    margin-right: 8px;
    font-size: 14px;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e8e8e8;
    background: #f8f9fa;
}

.modal-header h2 {
    font-size: 18px;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h2 i {
    color: #388e3c;
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: all 0.2s;
}

.modal-close:hover {
    color: #c62828;
}

.modal-body {
    padding: 20px 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.printers-table {
    width: 100%;
    border-collapse: collapse;
}

.printers-table th,
.printers-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.printers-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
    font-size: 13px;
}

.printers-table td {
    font-size: 14px;
    color: #333;
}

.printers-table tr:hover {
    background: #f8f9fa;
}

.printer-name {
    font-weight: 500;
    color: #1a1a2e;
}

.cartridges-list {
    color: #666;
    font-size: 13px;
}

.cartridges-list i {
    margin-right: 6px;
    color: #388e3c;
}

.empty-cartridges {
    color: #999;
    font-style: italic;
}

.empty-cartridges i {
    color: #ddd;
}

.no-printers {
    text-align: center;
    padding: 40px;
    color: #999;
}

.no-printers i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #ddd;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e8e8e8;
    text-align: right;
    background: #f8f9fa;
}

.btn-modal-close {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-modal-close:hover {
    background: #5a67d8;
}

/* Отключение автозаполнения */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: #333 !important;
}

input::-ms-clear,
input::-ms-reveal {
    display: none;
}

/* ОСНОВНОЙ МАКЕТ */
.app {
    display: flex;
    min-height: 100vh;
}

/* САЙДБАР */
.sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid #e8e8e8;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-logo {
    display: block;
    text-decoration: none;
    text-align: center;
    padding: 20px;
    border-bottom: 1px solid #e8e8e8;
    transition: all 0.2s;
}

.sidebar-logo:hover {
    background: #f8f9fa;
}

.logo-icon {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 10px;
}

.logo-icon i {
    font-size: 32px;
}

.logo-text {
    font-size: 16px;
    font-weight: bold;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.logo-sub {
    font-size: 11px;
    color: #999;
}

.nav-menu {
    list-style: none;
    padding: 16px 0;
}

.nav-menu li {
    margin: 4px 12px;
}

.nav-menu li a {
    display: block;
    padding: 10px 16px;
    color: #555;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 14px;
}

.nav-menu li a i {
    width: 20px;
    margin-right: 10px;
    font-size: 14px;
}

.nav-menu li a:hover {
    background: #f5f5f5;
}

.nav-menu li.active a {
    background: #667eea;
    color: white;
}

/* ОСНОВНОЙ КОНТЕНТ */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 24px 32px;
    transition: margin-left 0.3s ease;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8e8e8;
}

.top-bar h1 {
    font-size: 24px;
    color: #1a1a2e;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 14px;
    color: #555;
}

.top-avatar {
    width: 36px;
    height: 36px;
    border-radius: 5px;
    object-fit: cover;
    border: 1px solid #e0e0e0;
    background: white;
}

.user-info i {
    margin-right: 8px;
}

/* КНОПКИ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.btn i {
    font-size: 14px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #e0e0e0;
    color: #555;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    width: 36px;
    height: 36px;
    font-size: 16px;
    background: #f5f5f5;
    color: #555;
}

.btn-icon:hover {
    background: #e8e8e8;
}

/* ФОРМЫ */
.form-container {
    max-width: 800px;
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: #333;
}

.form-group label i {
    margin-right: 6px;
    color: #667eea;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
    font-family: monospace;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Группа для IP с фиксированным префиксом */
.ip-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ip-prefix {
    display: inline-flex;
    align-items: center;
    padding: 10px 12px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: monospace;
    font-size: 14px;
    color: #555;
    white-space: nowrap;
}

.ip-input-group input {
    flex: 1;
    max-width: 100px;
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #999;
}

.form-hint i {
    margin-right: 4px;
    font-size: 11px;
}

.type-badge-display {
    padding: 10px 12px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #555;
}

.type-badge-display i {
    margin-right: 8px;
    color: #667eea;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.dynamic-fields {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e8e8e8;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e8e8e8;
}

/* КАРТОЧКИ ОБОРУДОВАНИЯ */
.actions-bar {
    margin-bottom: 24px;
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
}

.equipment-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.equipment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.card-header h3 {
    font-size: 18px;
    color: #1a1a2e;
}

.card-header h3 i {
    margin-right: 8px;
    color: #667eea;
    font-size: 16px;
}

.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.badge i {
    margin-right: 5px;
    font-size: 11px;
}

.badge-computer {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-label_printer {
    background: #fff3e0;
    color: #e65100;
}

.badge-printer {
    background: #e8f5e9;
    color: #388e3c;
}

.card-body {
    margin-bottom: 16px;
}

.info-row {
    display: flex;
    margin-bottom: 8px;
    font-size: 13px;
}

.info-row:last-child {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #f0f0f0;
}

.info-label {
    width: 140px;
    color: #999;
}

.info-label i {
    width: 18px;
    margin-right: 6px;
    font-size: 12px;
}

.info-value {
    flex: 1;
    color: #333;
    font-family: monospace;
}

.info-empty {
    color: #bbb;
    font-style: italic;
}

.card-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

/* ПРОФИЛЬ */
.profile-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.card h3 {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e8e8e8;
    font-size: 18px;
    color: #1a1a2e;
}

.card h3 i {
    margin-right: 8px;
    color: #667eea;
}

/* Статистика */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.stat-card i {
    font-size: 40px;
    color: #667eea;
}

.stat-info {
    flex: 1;
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 13px;
    color: #999;
    margin-top: 4px;
}

/* Активность */
.activity-stats {
    margin-bottom: 24px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item i {
    width: 32px;
    font-size: 18px;
    color: #667eea;
}

.activity-info {
    flex: 1;
}

.activity-label {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 2px;
}

.activity-value {
    display: block;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* Опасная зона */
.danger-zone {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid #ffebee;
}

.danger-zone h4 {
    font-size: 14px;
    color: #c62828;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.danger-zone h4 i {
    font-size: 14px;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffebee;
    color: #c62828;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    width: 100%;
    justify-content: center;
}

.btn-logout:hover {
    background: #ffcdd2;
}

/* АЛЕРТЫ */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
}

.alert i {
    margin-right: 8px;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* EMPTY STATE */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    color: #999;
}

.empty-state i {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state p {
    margin-bottom: 8px;
}

.empty-state .hint {
    font-size: 13px;
    color: #bbb;
}

/* ========== ФИЛЬТРЫ ========== */
.filters-section {
    background: white;
    border-radius: 12px;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e8e8e8;
    font-weight: 600;
    font-size: 14px;
    color: #555;
}

.filters-header i {
    margin-right: 8px;
    color: #667eea;
}

.reset-filter {
    font-size: 13px;
    font-weight: normal;
    color: #999;
    text-decoration: none;
    transition: all 0.2s;
}

.reset-filter i {
    margin-right: 4px;
    font-size: 11px;
    color: #999;
}

.reset-filter:hover {
    color: #667eea;
}

.reset-filter:hover i {
    color: #667eea;
}

.reset-filter.active {
    opacity: 0.5;
    pointer-events: none;
}

.filters-body {
    padding: 16px 20px;
}

.filter-group {
    margin-bottom: 16px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
    font-weight: 500;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #f5f5f5;
    color: #555;
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.2s;
}

.filter-btn i {
    font-size: 12px;
}

.filter-btn:hover {
    background: #e0e0e0;
}

.filter-btn.active {
    background: #667eea;
    color: white;
}

.filter-btn.active i {
    color: white;
}

/* ========== ГРУППИРОВКА ========== */
.group-section {
    margin-bottom: 32px;
}

.group-section:last-child {
    margin-bottom: 0;
}

.group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    margin-bottom: 16px;
    border-bottom: 2px solid #e8e8e8;
}

.group-header i {
    font-size: 18px;
    color: #667eea;
}

.group-header span {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
}

.group-count {
    background: #f0f2f5;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: normal;
    color: #666;
}

/* ========== НИЖНЕЕ МОБИЛЬНОЕ МЕНЮ ========== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-top: 1px solid #e8e8e8;
}

.mobile-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 60px;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    color: #999;
    font-size: 11px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
    flex: 1;
    text-align: center;
    height: 52px;
}

.mobile-nav-item i {
    font-size: 20px;
    margin-bottom: 2px;
}

.mobile-nav-item span {
    font-size: 10px;
    font-weight: 500;
}

.mobile-nav-item.active {
    color: #667eea;
    background: #f0f2f5;
}

.mobile-nav-item:hover {
    background: #f5f5f5;
}

/* ========== КАРТРИДЖИ ПРИНТЕРОВ ========== */
.cartridges-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid #e8e8e8;
}

.cartridges-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.cartridges-header h3 {
    font-size: 16px;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.cartridges-header h3 i {
    color: #388e3c;
}

.btn-add-cartridge {
    background: #e8f5e9;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    color: #388e3c;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-add-cartridge:hover {
    background: #c8e6c9;
    transform: translateY(-1px);
}

.cartridge-form {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e8e8e8;
}

.cartridge-form h4 {
    margin-bottom: 16px;
    font-size: 14px;
    color: #333;
}

.cartridge-form h4 i {
    margin-right: 6px;
    color: #667eea;
}

.empty-cartridges {
    text-align: center;
    padding: 30px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    color: #999;
}

.empty-cartridges i {
    font-size: 40px;
    color: #ddd;
    margin-bottom: 10px;
}

.empty-cartridges p {
    margin-bottom: 4px;
}

.empty-cartridges .hint {
    font-size: 12px;
}

.cartridges-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cartridge-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    transition: all 0.2s;
}

.cartridge-item:hover {
    background: #f0f2f5;
}

.cartridge-info {
    flex: 1;
}

.cartridge-name {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.cartridge-name i {
    color: #388e3c;
    font-size: 14px;
}

.cartridge-name strong {
    font-size: 14px;
    color: #1a1a2e;
}

.cartridge-name-input,
.cartridge-compatible-input,
.cartridge-resource-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s;
    background: white;
}

.cartridge-name-input:focus,
.cartridge-compatible-input:focus,
.cartridge-resource-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.cartridge-name-input {
    font-weight: 500;
}

.cartridge-compatible,
.cartridge-resource {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.cartridge-compatible i,
.cartridge-resource i {
    margin-right: 4px;
    font-size: 10px;
    color: #999;
}

.cartridge-actions {
    display: flex;
    gap: 6px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.main-actions {
    margin-top: 24px;
}

/* Для полей ввода картриджей */
.cartridge-name-input {
    width: 100%;
    max-width: 250px;
}

.cartridge-compatible-input {
    width: 100%;
    max-width: 300px;
}

.cartridge-resource-input {
    width: 100%;
    max-width: 120px;
}

@media (max-width: 768px) {
    .cartridge-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cartridge-actions {
        align-self: flex-end;
    }
    
    .cartridges-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cartridge-name-input,
    .cartridge-compatible-input,
    .cartridge-resource-input {
        max-width: 100%;
    }
}

/* ========== УЧЁТНЫЕ ДАННЫЕ ========== */
.credentials-form {
    margin-bottom: 32px;
}

.credentials-form h3 {
    margin-bottom: 20px;
    font-size: 18px;
    color: #1a1a2e;
}

.credentials-form h3 i {
    margin-right: 8px;
    color: #667eea;
}

.credentials-section {
    margin-top: 32px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8e8e8;
}

.section-header h3 {
    font-size: 18px;
    color: #1a1a2e;
}

.section-header h3 i {
    margin-right: 8px;
    color: #667eea;
}

.section-count {
    background: #f0f2f5;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    color: #666;
}

.credentials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.credential-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.credential-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.credential-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.credential-header i {
    font-size: 20px;
    color: #667eea;
}

.credential-header h3 {
    flex: 1;
    font-size: 16px;
    color: #1a1a2e;
}

.credential-actions {
    display: flex;
    gap: 8px;
}

.credential-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.credential-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.credential-label {
    width: 100px;
    font-size: 13px;
    color: #999;
}

.credential-label i {
    width: 18px;
    margin-right: 6px;
    font-size: 12px;
}

.credential-value {
    flex: 1;
    font-size: 14px;
    color: #333;
    word-break: break-all;
}

.credential-value a {
    color: #667eea;
    text-decoration: none;
}

.credential-value a:hover {
    text-decoration: underline;
}

.credential-value.password-value {
    font-family: monospace;
}

.credential-value.password-value.visible {
    font-family: monospace;
}

.toggle-password, .copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 14px;
}

.toggle-password:hover, .copy-btn:hover {
    background: #f0f2f5;
    color: #667eea;
}

/* ========== СТИЛИ ДЛЯ ПЕЧАТИ ЭТИКЕТОК ========== */
@page {
    size: 58mm 40mm;
    margin: 0;
}

@media print {
    .print-page {
        margin: 0;
        padding: 0;
        background: white;
    }
    
    .print-container {
        width: 58mm;
        height: 40mm;
        page-break-after: avoid;
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    .print-controls,
    .print-controls *,
    .no-print,
    .no-print *,
    button,
    .btn-print,
    .btn-close,
    .btn-print *,
    .btn-close * {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        width: 0 !important;
        height: 0 !important;
        position: absolute !important;
        top: -9999px !important;
        left: -9999px !important;
    }
    
    body.print-page {
        padding: 0;
        margin: 0;
        background: white;
    }
    
    * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

.print-page {
    font-family: 'Courier New', 'Consolas', monospace;
    background: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.print-container {
    width: 58mm;
    height: 40mm;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

/* Стиль для КОМПЬЮТЕРА */
.label-computer {
    width: 100%;
    height: 100%;
    padding: 2mm;
    background: white;
    display: flex;
    flex-direction: column;
}

.label-computer .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2mm;
}

.label-computer .type-badge {
    font-size: 8pt;
    font-weight: bold;
    background: #1a1a2e;
    color: white;
    padding: 1mm 2mm;
    border-radius: 2px;
}

.label-computer .type-badge i {
    margin-right: 2px;
    font-size: 8pt;
}

.label-computer .qr-area {
    display: flex;
    gap: 3mm;
    flex: 1;
}

.label-computer .info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.label-computer .info .name {
    font-size: 10pt;
    font-weight: bold;
    margin-bottom: 2mm;
    word-break: break-word;
    line-height: 1.2;
}

.label-computer .info .name i {
    margin-right: 3px;
    font-size: 9pt;
    color: #667eea;
}

.label-computer .info .user {
    font-size: 8pt;
    margin-bottom: 1mm;
}

.label-computer .info .user i {
    margin-right: 3px;
    font-size: 7pt;
    color: #667eea;
}

.label-computer .info .user-label {
    color: #666;
}

.label-computer .info .user-value {
    font-weight: bold;
    font-family: monospace;
}

.label-computer .qr-wrapper {
    width: 18mm;
    height: 18mm;
    border: 1px solid #ddd;
    padding: 1mm;
}

.label-computer .qr-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.label-computer .password-hint {
    font-size: 6pt;
    color: #999;
    text-align: center;
    margin-top: 1mm;
}

.label-computer .password-hint i {
    margin-right: 2px;
    font-size: 6pt;
}

/* Стиль для ПРИНТЕРА ЭТИКЕТОК */
.label-printer {
    width: 100%;
    height: 100%;
    padding: 2mm;
    background: white;
    display: flex;
    flex-direction: column;
}

.label-printer .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2mm;
}

.label-printer .type-badge {
    font-size: 8pt;
    font-weight: bold;
    background: #e65100;
    color: white;
    padding: 1mm 2mm;
    border-radius: 2px;
}

.label-printer .type-badge i {
    margin-right: 2px;
    font-size: 8pt;
}

.label-printer .content {
    display: flex;
    gap: 3mm;
    flex: 1;
    align-items: center;
}

.label-printer .info {
    flex: 1;
}

.label-printer .info .name {
    font-size: 10pt;
    font-weight: bold;
    margin-bottom: 2mm;
    word-break: break-word;
}

.label-printer .info .name i {
    margin-right: 3px;
    font-size: 9pt;
    color: #e65100;
}

.label-printer .info .format {
    font-size: 8pt;
    color: #666;
}

.label-printer .info .format i {
    margin-right: 3px;
    font-size: 7pt;
}

.label-printer .qr-wrapper {
    width: 18mm;
    height: 18mm;
    border: 1px solid #ddd;
    padding: 1mm;
}

.label-printer .qr-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.label-printer .ip-hint {
    font-size: 6pt;
    color: #999;
    text-align: center;
    margin-top: 1mm;
}

.label-printer .ip-hint i {
    margin-right: 2px;
    font-size: 6pt;
}

/* Стиль для ОБЫЧНОГО ПРИНТЕРА */
.label-printer-regular {
    width: 100%;
    height: 100%;
    padding: 2mm;
    background: white;
    display: flex;
    flex-direction: column;
}

.label-printer-regular .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2mm;
}

.label-printer-regular .type-badge {
    font-size: 8pt;
    font-weight: bold;
    background: #388e3c;
    color: white;
    padding: 1mm 2mm;
    border-radius: 2px;
}

.label-printer-regular .type-badge i {
    margin-right: 2px;
    font-size: 8pt;
}

.label-printer-regular .content {
    display: flex;
    gap: 3mm;
    flex: 1;
    align-items: center;
}

.label-printer-regular .info {
    flex: 1;
}

.label-printer-regular .info .name {
    font-size: 10pt;
    font-weight: bold;
    margin-bottom: 2mm;
    word-break: break-word;
}

.label-printer-regular .info .name i {
    margin-right: 3px;
    font-size: 9pt;
    color: #388e3c;
}

.label-printer-regular .qr-wrapper {
    width: 18mm;
    height: 18mm;
    border: 1px solid #ddd;
    padding: 1mm;
}

.label-printer-regular .qr-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.label-printer-regular .ip-hint {
    font-size: 6pt;
    color: #999;
    text-align: center;
    margin-top: 1mm;
}

.label-printer-regular .ip-hint i {
    margin-right: 2px;
    font-size: 6pt;
}

/* Кнопки управления печатью */
.print-controls {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: white;
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.print-controls button {
    padding: 8px 16px;
    font-size: 14px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-family: inherit;
}

.print-controls button i {
    margin-right: 6px;
}

.btn-print {
    background: #667eea;
    color: white;
}

.btn-print:hover {
    background: #5a67d8;
}

.btn-close {
    background: #e0e0e0;
    color: #333;
}

.btn-close:hover {
    background: #d0d0d0;
}

/* ========== АДАПТИВ ========== */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        padding: 16px 16px 80px 16px;
    }
    
    .mobile-bottom-nav {
        display: block;
    }
    
    .top-bar {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .top-bar h1 {
        font-size: 20px;
    }
    
    .user-info {
        align-self: flex-end;
    }
    
    .equipment-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .profile-sections {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-card i {
        font-size: 28px;
    }
    
    .stat-value {
        font-size: 22px;
    }
    
    .filters-body {
        padding: 12px 16px;
    }
    
    .filter-buttons {
        gap: 6px;
    }
    
    .filter-btn {
        padding: 4px 10px;
        font-size: 12px;
    }
    
    .group-header {
        margin-bottom: 12px;
    }
    
    .group-header i {
        font-size: 16px;
    }
    
    .group-header span {
        font-size: 14px;
    }
    
    .card-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .badge {
        align-self: flex-start;
    }
    
    .cartridge-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cartridge-actions {
        align-self: flex-end;
    }
    
    .cartridges-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .credentials-grid {
        grid-template-columns: 1fr;
    }
    
    .credential-row {
        flex-wrap: wrap;
    }
    
    .credential-label {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .mobile-nav-items {
        height: 56px;
    }
    
    .mobile-nav-item {
        height: 48px;
        padding: 6px 8px;
    }
    
    .mobile-nav-item i {
        font-size: 18px;
    }
    
    .mobile-nav-item span {
        font-size: 9px;
    }
    
    .main-content {
        padding-bottom: 72px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-buttons {
        flex-direction: column;
    }
    
    .filter-btn {
        width: 100%;
        justify-content: center;
    }
    
    .filter-group {
        margin-bottom: 12px;
    }
    
    .login-card {
        padding: 24px;
    }
}

/* ========== ПОЛЬЗОВАТЕЛИ ========== */
.users-form {
    margin-bottom: 32px;
}

.users-form h3 {
    margin-bottom: 20px;
    font-size: 18px;
    color: #1a1a2e;
}

.users-form h3 i {
    margin-right: 8px;
    color: #667eea;
}

.users-section {
    margin-top: 32px;
}

.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.user-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.user-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.user-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.user-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar i {
    font-size: 28px;
    color: white;
}

.user-info-header {
    flex: 1;
}

.user-info-header h4 {
    font-size: 16px;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.user-login {
    font-size: 12px;
    color: #999;
}

.user-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
}

.user-detail i {
    width: 20px;
    color: #667eea;
}

.user-group-badge {
    background: #e8f5e9;
    color: #388e3c;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.user-card-actions {
    display: flex;
    gap: 4px;
}

/* ========== ГРУППЫ ========== */
.groups-form {
    margin-bottom: 32px;
}

.groups-form h3 {
    margin-bottom: 20px;
    font-size: 18px;
    color: #1a1a2e;
}

.groups-form h3 i {
    margin-right: 8px;
    color: #667eea;
}

.groups-section {
    margin-top: 32px;
}

.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.group-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.group-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.group-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.group-icon {
    width: 45px;
    height: 45px;
    background: #f0f2f5;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.group-icon i {
    font-size: 22px;
    color: #667eea;
}

.group-info-header {
    flex: 1;
}

.group-info-header h4 {
    font-size: 16px;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.group-desc {
    font-size: 12px;
    color: #999;
}

.group-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.group-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
}

.group-stat i {
    width: 20px;
    color: #667eea;
}

.group-permissions {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #666;
    flex-wrap: wrap;
}

.group-permissions i {
    margin-top: 2px;
    color: #667eea;
}

.permissions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.permission-tag {
    background: #f0f2f5;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    color: #555;
    font-family: monospace;
}

.group-card-actions {
    display: flex;
    gap: 4px;
}

/* Права доступа - чекбоксы */
.permissions-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}

.permission-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background 0.2s;
}

.permission-checkbox:hover {
    background: #e8e8e8;
}

.permission-checkbox input {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.permission-checkbox span {
    color: #333;
    font-family: monospace;
    font-size: 12px;
}

/* Секция с заголовком */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8e8e8;
}

.section-header h3 {
    font-size: 18px;
    color: #1a1a2e;
    margin: 0;
}

.section-header h3 i {
    margin-right: 8px;
    color: #667eea;
}

.section-count {
    background: #f0f2f5;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    color: #666;
}

/* Отключение автозаполнения */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: #333 !important;
}

input::-ms-clear,
input::-ms-reveal {
    display: none;
}

/* Модальное окно (если нет в основном CSS) */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e8e8e8;
    background: #f8f9fa;
}

.modal-header h2 {
    font-size: 18px;
    color: #1a1a2e;
    margin: 0;
}

.modal-header h2 i {
    margin-right: 8px;
    color: #667eea;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: all 0.2s;
}

.modal-close:hover {
    color: #c62828;
}

.modal-body {
    padding: 20px 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e8e8e8;
    text-align: right;
    background: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Адаптив для пользователей и групп */
@media (max-width: 768px) {
    .users-grid,
    .groups-grid {
        grid-template-columns: 1fr;
    }
    
    .permissions-checkbox-group {
        grid-template-columns: 1fr;
        max-height: 250px;
    }
    
    .group-card-header,
    .user-card-header {
        flex-wrap: wrap;
    }
    
    .group-card-actions,
    .user-card-actions {
        margin-left: auto;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
}

/* ========== СТРАНИЦА ДОСТУП ЗАПРЕЩЁН ========== */
.access-denied-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.access-denied-card {
    background: white;
    border-radius: 20px;
    padding: 48px 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.access-denied-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 10px 25px -5px rgba(238, 90, 36, 0.3);
}

.access-denied-icon i {
    font-size: 48px;
    color: white;
}

.access-denied-card h1 {
    font-size: 28px;
    color: #1a1a2e;
    margin-bottom: 12px;
}

.access-denied-card .error-code {
    font-size: 14px;
    color: #999;
    margin-bottom: 20px;
    font-family: monospace;
}

.access-denied-card .error-code i {
    margin-right: 6px;
}

.access-denied-card .message {
    font-size: 16px;
    color: #666;
    margin-bottom: 32px;
    line-height: 1.6;
}

.access-denied-card .message i {
    margin-right: 8px;
    color: #ff6b6b;
}

.access-denied-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #667eea;
    color: white;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-back:hover {
    background: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(102, 126, 234, 0.4);
}

.btn-back i {
    font-size: 14px;
}

.help-text {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e8e8e8;
    font-size: 12px;
    color: #999;
}

.help-text i {
    margin-right: 6px;
}

@media (max-width: 480px) {
    .access-denied-card {
        padding: 32px 24px;
    }
    
    .access-denied-icon {
        width: 80px;
        height: 80px;
    }
    
    .access-denied-icon i {
        font-size: 36px;
    }
    
    .access-denied-card h1 {
        font-size: 24px;
    }
    
    .access-denied-card .message {
        font-size: 14px;
    }
    
    .btn-back {
        padding: 10px 24px;
        font-size: 13px;
    }
}

/* ========== СТАТУСЫ ========== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-inactive {
    background: #ffebee;
    color: #c62828;
}

.comment-text {
    font-style: italic;
    color: #666;
    background: #f8f9fa;
    padding: 6px 10px;
    border-radius: 8px;
    display: inline-block;
    width: auto;
    max-width: 100%;
    word-break: break-word;
}