/* assets/css/style.css - Factory Control единый файл стилей (ПК + Мобильные) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: #f0f4f8;
    color: #1a2a3a;
}

/* ========== LOGIN PAGE ========== */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f2b4f 0%, #1a4a7a 50%, #2a6a9a 100%);
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 28px;
    padding: 40px 32px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    text-align: center;
}

.login-icon {
    font-size: 64px;
    color: #1a4a7a;
    margin-bottom: 20px;
}

.login-header h1 {
    color: #0f2b4f;
    font-size: 28px;
    margin-bottom: 8px;
}

.login-header p {
    color: #6c7a8a;
    margin-bottom: 32px;
}

.error-message {
    background: #fef2f2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 12px 16px;
    transition: all 0.3s;
    background: #f8fafc;
}

.input-group:focus-within {
    border-color: #2a6a9a;
    box-shadow: 0 0 0 3px rgba(42,106,154,0.1);
    background: white;
}

.input-group .material-icons {
    color: #94a3b8;
}

.input-group input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
}

.login-btn {
    background: linear-gradient(135deg, #0f2b4f, #1a4a7a);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.demo-creds {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    font-size: 12px;
    color: #94a3b8;
}

.creds-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 12px;
    font-family: monospace;
    color: #475569;
}

/* ========== MAIN APP LAYOUT ========== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ========== SIDEBAR ========== */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #0a1e2e 0%, #0f2b4f 100%);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
    z-index: 100;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo .material-icons {
    font-size: 32px;
    color: #5dade2;
}

.logo h2 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 1px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.nav-item:hover {
    background: rgba(93,173,226,0.15);
    color: white;
}

.nav-item.active {
    background: rgba(93,173,226,0.25);
    color: #5dade2;
}

.nav-item .material-icons {
    font-size: 24px;
}

.sidebar-footer {
    padding: 20px 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 8px;
    border-radius: 14px;
    background: rgba(255,255,255,0.05);
}

.avatar .material-icons {
    font-size: 40px;
    color: #5dade2;
}

.user-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-role {
    font-size: 11px;
    opacity: 0.7;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 12px;
    color: #f87171;
    text-decoration: none;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: rgba(248,113,113,0.1);
    color: #fecaca;
}

/* ========== MAIN CONTENT ========== */
.main-content {
    flex: 1;
    margin-left: 280px;
    background: #f0f4f8;
    min-height: 100vh;
}

.top-bar {
    background: white;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 99;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.page-title h1 {
    font-size: 24px;
    color: #0f2b4f;
    font-weight: 600;
}

.top-bar-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.notifications {
    position: relative;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.3s;
}

.notifications:hover {
    background: #f1f5f9;
}

.notifications .material-icons {
    font-size: 28px;
    color: #475569;
}

.badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
}

.content-wrapper {
    padding: 32px;
}

/* ========== CARDS & GRIDS ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.stat-card .material-icons {
    font-size: 44px;
    color: #2a6a9a;
    margin-bottom: 12px;
}

.stat-card h3 {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #0f2b4f;
}

/* ========== BUTTONS ========== */
.btn-primary {
    background: linear-gradient(135deg, #0f2b4f, #1a4a7a);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(15,43,79,0.3);
}

.btn-danger {
    background: #ef4444;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

/* ========== MODALS ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 24px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.close {
    font-size: 28px;
    cursor: pointer;
    color: #94a3b8;
}

/* ========== ALERTS ========== */
.alert {
    padding: 14px 20px;
    border-radius: 14px;
    margin-bottom: 24px;
}

.alert.success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.alert.error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* ========== FORM GROUPS ========== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #2a6a9a;
    box-shadow: 0 0 0 3px rgba(42,106,154,0.1);
}

/* ========== BADGES ========== */
.role-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.role-director { background: #e0f2fe; color: #0369a1; }
.role-brigadier { background: #dcfce7; color: #15803d; }
.role-storekeeper { background: #fef3c7; color: #b45309; }
.role-executor { background: #fce7f3; color: #be185d; }
.role-tech { background: #e9d5ff; color: #6b21a5; }

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.empty-state .material-icons {
    font-size: 64px;
    margin-bottom: 16px;
}

/* ========== NOTIFICATIONS MODAL ========== */
.notifications-modal {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    z-index: 1001;
    flex-direction: column;
    overflow: hidden;
}

.notifications-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #0f2b4f;
    color: white;
}

.close-notif {
    cursor: pointer;
    font-size: 24px;
}

.notifications-list {
    flex: 1;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
}

.notification-item.unread {
    background: #e0f2fe;
}

.notification-item.read {
    background: white;
    opacity: 0.7;
}

.notif-icon .material-icons {
    font-size: 24px;
    color: #2a6a9a;
}

.notif-content {
    flex: 1;
}

.notif-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.notif-message {
    font-size: 13px;
    color: #475569;
}

.notif-time {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
}

.no-notifications {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
}

/* ========== МОБИЛЬНАЯ НАВИГАЦИЯ ========== */
.mobile-bottom-nav {
    display: none;
}

/* ========== ПК СТИЛИ ДЛЯ ДАШБОРДА ========== */
.welcome-card-pc {
    background: linear-gradient(135deg, #0f2b4f, #1a4a7a);
    border-radius: 20px;
    padding: 25px 30px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.welcome-icon-pc .material-icons {
    font-size: 56px;
    color: #5dade2;
}

.welcome-text-pc h2 {
    font-size: 24px;
    margin-bottom: 5px;
}

.welcome-text-pc p {
    font-size: 14px;
    opacity: 0.85;
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #f1f5f9;
    border-radius: 12px;
    text-decoration: none;
    color: #1e293b;
    font-weight: 500;
    transition: all 0.3s;
}

.action-btn:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.action-btn .material-icons {
    font-size: 20px;
    color: #2a6a9a;
}

/* ========== СКЛАД ПК ========== */
.warehouse-page {
    background: #f8fafc;
    border-radius: 20px;
    padding: 20px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-header h2 {
    font-size: 24px;
    color: #0f2b4f;
}

.search-box-pc {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid #e2e8f0;
}

.search-box-pc input {
    border: none;
    outline: none;
    font-size: 14px;
    width: 250px;
}

.items-grid-pc {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.item-card-pc {
    background: white;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.item-card-pc:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.item-icon-pc .material-icons {
    font-size: 48px;
    color: #2a6a9a;
}

.item-info-pc {
    flex: 1;
}

.item-name-pc {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

.item-location-pc {
    font-size: 13px;
    color: #64748b;
}

/* ========== ИНВЕНТАРЬ ПК ========== */
.inventory-page {
    background: #f8fafc;
    border-radius: 20px;
    padding: 20px;
}

.inventory-stats-pc {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
}

.inventory-grid-pc {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.inventory-card-pc {
    background: white;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.inventory-card-pc:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.inventory-icon-pc .material-icons {
    font-size: 48px;
    color: #2a6a9a;
}

.inventory-info-pc {
    flex: 1;
}

.inventory-name-pc {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

.inventory-cell-pc {
    font-size: 13px;
    color: #64748b;
}

.return-form-pc .btn-danger {
    padding: 10px 18px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ========== ПРОФИЛЬ ПК ========== */
.profile-page {
    max-width: 600px;
    margin: 0 auto;
}

.profile-card-pc {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.profile-header-pc {
    background: linear-gradient(135deg, #0f2b4f, #1a4a7a);
    padding: 40px 30px;
    text-align: center;
    color: white;
    position: relative;
}

.profile-avatar-pc {
    position: relative;
    display: inline-block;
}

.profile-avatar-pc .material-icons {
    font-size: 100px;
    color: #5dade2;
}

.avatar-img-pc {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
}

.edit-avatar-btn {
    position: absolute;
    bottom: 0;
    right: -10px;
    background: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2a6a9a;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.profile-name-pc h3 {
    font-size: 24px;
    margin-top: 15px;
    margin-bottom: 8px;
}

.profile-info-pc {
    padding: 24px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.info-row .material-icons {
    color: #2a6a9a;
    width: 24px;
}

.shift-status-pc {
    padding: 20px 24px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.status-indicator.active {
    background: #dcfce7;
    color: #15803d;
}

.status-indicator.inactive {
    background: #fee2e2;
    color: #dc2626;
}

.shift-times-pc {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.shift-time {
    flex: 1;
    text-align: center;
}

.shift-time .label {
    display: block;
    font-size: 12px;
    color: #64748b;
}

.shift-time .value {
    font-weight: 500;
}

.shift-actions-pc {
    padding: 20px 24px;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

/* ========== ЯЧЕЙКИ ========== */
.cells-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.cell-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.cell-number {
    font-size: 24px;
    font-weight: bold;
    color: #0f2b4f;
    margin-bottom: 12px;
}

.cell-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    color: #64748b;
}

/* ========== РОЛИ ========== */
.role-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.role-card {
    background: white;
    padding: 28px 20px;
    border-radius: 20px;
    text-decoration: none;
    color: #1e293b;
    transition: all 0.3s;
    border: 1px solid #e2e8f0;
    text-align: center;
}

.role-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 30px rgba(0,0,0,0.1);
    border-color: #2a6a9a;
}

.role-card .material-icons {
    font-size: 52px;
    color: #2a6a9a;
    margin-bottom: 16px;
}

.role-card h4 {
    font-size: 20px;
    margin-bottom: 8px;
}

/* ========== ТАБЛИЦЫ ========== */
.data-table {
    width: 100%;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    border-collapse: collapse;
}

.data-table th, .data-table td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.data-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
    font-size: 13px;
}

/* ========== МОБИЛЬНАЯ ВЕРСИЯ (< 768px) ========== */
@media (max-width: 768px) {
    
    /* Скрываем сайдбар на мобильных */
    .sidebar {
        display: none !important;
    }
    
    /* Основной контент на всю ширину */
    .main-content {
        margin-left: 0 !important;
        padding-bottom: 70px;
    }
    
    /* Топ бар */
    .top-bar {
        padding: 12px 16px;
    }
    
    .page-title h1 {
        font-size: 18px;
    }
    
    .content-wrapper {
        padding: 16px;
    }
    
    /* Показываем мобильную навигацию */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.96);
        backdrop-filter: blur(10px);
        justify-content: space-around;
        align-items: center;
        padding: 8px 0 20px;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        z-index: 1000;
        border-top: 0.5px solid #e2e8f0;
    }
    
    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        background: none;
        border: none;
        color: #94a3b8;
        font-size: 10px;
        cursor: pointer;
        padding: 6px 12px;
        border-radius: 12px;
        text-decoration: none;
        position: relative;
    }
    
    .mobile-nav-item .material-icons {
        font-size: 24px;
    }
    
    .mobile-nav-item.active {
        color: #2a6a9a;
    }
    
    .mobile-nav-item span:last-child {
        font-size: 10px;
        font-weight: 500;
    }
    
    .mobile-nav-item .nav-badge {
        position: absolute;
        top: -2px;
        right: 6px;
        background: #ef4444;
        color: white;
        border-radius: 20px;
        padding: 2px 6px;
        font-size: 10px;
    }
    
    /* Всплывающее меню */
    .mobile-more-menu {
        position: fixed;
        bottom: 80px;
        right: 20px;
        background: white;
        border-radius: 20px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.15);
        padding: 8px 0;
        min-width: 200px;
        z-index: 1001;
        display: none;
    }
    
    .mobile-more-menu.show {
        display: block;
    }
    
    .mobile-more-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 20px;
        text-decoration: none;
        color: #1e293b;
        font-size: 14px;
    }
    
    .mobile-more-item .material-icons {
        font-size: 20px;
        color: #2a6a9a;
    }
    
    /* Карточки статистики */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-number {
        font-size: 26px;
    }
    
    /* Быстрые действия */
    .quick-actions-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        margin-bottom: 24px;
    }
    
    .quick-action-card {
        background: white;
        padding: 16px 8px;
        border-radius: 16px;
        text-align: center;
        text-decoration: none;
        color: #1e293b;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }
    
    .quick-action-card .material-icons {
        font-size: 28px;
        color: #2a6a9a;
        margin-bottom: 6px;
    }
    
    .quick-action-card span:last-child {
        font-size: 11px;
        font-weight: 500;
    }
    
    /* Приветственная карточка */
    .welcome-card-pc {
        padding: 16px;
    }
    
    .welcome-icon-pc .material-icons {
        font-size: 40px;
    }
    
    .welcome-text-pc h2 {
        font-size: 16px;
    }
    
    .welcome-text-pc p {
        font-size: 12px;
    }
    
    /* Кнопки */
    .btn-primary, .btn-danger {
        padding: 12px 18px;
        width: 100%;
        justify-content: center;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    /* Модальные окна */
    .modal-content {
        width: 95%;
        border-radius: 20px;
    }
    
    /* Уведомления */
    .notifications-modal {
        width: calc(100% - 32px);
        right: 16px;
        left: 16px;
        height: 70vh;
        bottom: 80px;
    }
    
    /* Склад */
    .warehouse-page {
        padding: 0;
    }
    
    .items-grid-pc {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .item-card-pc {
        padding: 12px;
    }
    
    .item-icon-pc .material-icons {
        font-size: 36px;
    }
    
    /* Инвентарь */
    .inventory-grid-pc {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .inventory-card-pc {
        padding: 12px;
    }
    
    .inventory-icon-pc .material-icons {
        font-size: 36px;
    }
    
    /* Профиль */
    .profile-header-pc {
        padding: 30px 20px;
    }
    
    .profile-avatar-pc .material-icons {
        font-size: 80px;
    }
    
    .profile-name-pc h3 {
        font-size: 20px;
    }
    
    /* Ячейки */
    .cells-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .cell-card {
        padding: 16px;
    }
    
    .cell-number {
        font-size: 18px;
    }
    
    /* Роли */
    .role-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .role-card {
        padding: 16px;
        display: flex;
        align-items: center;
        gap: 16px;
        text-align: left;
    }
    
    .role-card .material-icons {
        margin-bottom: 0;
        font-size: 36px;
    }
    
    /* Таблицы */
    .data-table {
        display: block;
        overflow-x: auto;
    }
    
    table {
        min-width: 600px;
    }
    
    /* Хедер страницы */
    .page-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .page-header .btn-primary {
        width: 100%;
    }
    
    /* Анимации */
    @keyframes slideUp {
        from {
            transform: translateY(20px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
}

/* Планшеты */
@media (min-width: 769px) and (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .items-grid-pc {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .inventory-grid-pc {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cells-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .role-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Очень маленькие экраны */
@media (max-width: 380px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cells-grid {
        grid-template-columns: 1fr;
    }
}

/* Безопасная зона для iPhone X и выше */
@supports (padding: max(0px)) {
    .mobile-bottom-nav {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
    
    .main-content {
        padding-bottom: max(70px, env(safe-area-inset-bottom));
    }
}