/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: auto;
    height: 100vh;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    position: relative;
}

/* Animated KENNER Background */
.kenner-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, #1a1a2e 0%, #0a0a0a 100%);
}

.kenner-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(8rem, 15vw, 20rem);
    font-weight: 900;
    color: transparent;
    background: linear-gradient(45deg, 
        rgba(255, 255, 255, 0.03) 0%,
        rgba(255, 255, 255, 0.08) 25%,
        rgba(255, 255, 255, 0.03) 50%,
        rgba(255, 255, 255, 0.08) 75%,
        rgba(255, 255, 255, 0.03) 100%
    );
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: kennerGlow 8s ease-in-out infinite;
    letter-spacing: 0.2em;
    user-select: none;
    pointer-events: none;
}

/* Animated rays like x.ai */
.kenner-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, transparent 40%, rgba(0, 212, 255, 0.02) 50%, transparent 60%),
        linear-gradient(-45deg, transparent 40%, rgba(135, 206, 235, 0.02) 50%, transparent 60%),
        linear-gradient(135deg, transparent 40%, rgba(0, 212, 255, 0.01) 50%, transparent 60%),
        linear-gradient(-135deg, transparent 40%, rgba(135, 206, 235, 0.01) 50%, transparent 60%);
    background-size: 200% 200%, 200% 200%, 300% 300%, 300% 300%;
    background-position: 0% 0%, 100% 0%, 0% 100%, 100% 100%;
    animation: rayMove 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes rayMove {
    0%, 100% {
        background-position: 0% 0%, 100% 0%, 0% 100%, 100% 100%;
        opacity: 0.3;
    }
    25% {
        background-position: 100% 100%, 0% 100%, 100% 0%, 0% 0%;
        opacity: 0.6;
    }
    50% {
        background-position: 100% 0%, 0% 0%, 100% 100%, 0% 100%;
        opacity: 0.4;
    }
    75% {
        background-position: 0% 100%, 100% 100%, 0% 0%, 100% 0%;
        opacity: 0.7;
    }
}

@keyframes kennerGlow {
    0%, 100% {
        background-position: 0% 50%;
        opacity: 0.4;
    }
    50% {
        background-position: 100% 50%;
        opacity: 0.7;
    }
}

/* Floating particles animation */
.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

.particle:nth-child(odd) {
    animation-duration: 25s;
    background: rgba(0, 255, 255, 0.1);
}

.particle:nth-child(3n) {
    animation-duration: 30s;
    background: rgba(135, 206, 235, 0.1);
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-spinner.small {
    width: 20px;
    height: 20px;
    border-width: 2px;
    margin: 0 10px 0 0;
}

.loading-text {
    color: white;
    font-size: 16px;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Login Styles */
.login-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0a0a0a;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    background: linear-gradient(45deg, #00d4ff, #87ceeb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(45deg, #00d4ff, #87ceeb);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 35px rgba(0, 212, 255, 0.4);
    background: linear-gradient(45deg, #87ceeb, #00d4ff);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-spinner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.error-message {
    margin-top: 15px;
    padding: 12px;
    background: #fee;
    color: #c53030;
    border-radius: 8px;
    font-size: 14px;
    border-left: 4px solid #c53030;
}

/* Main App Layout */
.main-app {
    display: grid;
    grid-template-areas: 
        "header"
        "main";
    grid-template-rows: 70px 1fr;
    grid-template-columns: 1fr;
    height: 100vh;
    background: transparent;
    position: relative;
    z-index: 1;
}

/* Header */
.app-header {
    grid-area: header;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo i {
    font-size: 20px;
    color: #9ca3af;
    transition: all 0.3s ease;
    padding: 6px;
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.8) 0%, rgba(25, 25, 35, 0.8) 100%);
    border-radius: 10px;
    border: 1px solid rgba(40, 40, 50, 0.8);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.logo i:hover {
    color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 18px;
}

.mobile-menu-btn:hover {
    background: #f1f5f9;
    color: #1a202c;
}

.app-header h1 {
    font-size: 16px;
    font-weight: 600;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.8) 0%, rgba(25, 25, 35, 0.8) 100%);
    border-radius: 12px;
    border: 1px solid rgba(40, 40, 50, 0.8);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.app-header h1:hover {
    color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(25, 25, 35, 0.9) 0%, rgba(30, 30, 40, 0.9) 100%);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.logout-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    transform: translateY(-1px);
}

.refresh-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.refresh-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    transform: translateY(-1px);
}

.refresh-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.refresh-btn i.fa-spin {
    animation: spin 1s linear infinite;
}

.refresh-text {
    font-weight: 500;
}

/* Sidebar - Hidden */
.sidebar {
    display: none;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a202c;
}

.mobile-close-btn {
    display: none;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 16px;
}

.mobile-close-btn:hover {
    background: #f1f5f9;
    color: #1a202c;
}

/* Mobile Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.show {
    opacity: 1;
}

.schemas-list {
    padding: 16px;
}

.schema-item {
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.schema-name {
    flex: 1;
}

.schema-count {
    background: #e2e8f0;
    color: #64748b;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    min-width: 20px;
    text-align: center;
}

.no-schemas {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}

.no-schemas i {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
}

.no-schemas p {
    font-size: 14px;
}

.schema-item:hover {
    background: #f8fafc;
}

.schema-item.active {
    background: #e0e7ff;
    color: #3730a3;
}

.schema-item i {
    width: 16px;
    text-align: center;
}

/* Main Content */
.main-content {
    grid-area: main;
    overflow: hidden;
    position: relative;
    height: calc(100vh - 60px);
}

/* Welcome Screen */
.welcome-screen {
    padding: 40px;
    background: transparent;
    min-height: calc(100vh - 70px);
    height: calc(100vh - 70px);
    overflow-y: auto;
    overflow-x: auto;
    position: relative;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.welcome-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(135, 206, 235, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(0, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.main-categories-header {
    text-align: center;
    margin-bottom: 40px;
}

.main-categories-header p {
    font-size: 16px;
    color: #9ca3af;
    margin-bottom: 20px;
}

/* AI Chat Strip */
.ai-chat-strip {
    max-width: 1000px;
    margin: 40px auto;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.chat-container {
    padding: 0;
    background: transparent;
    border-radius: 20px;
    border: none;
    backdrop-filter: none;
    box-shadow: none;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 212, 255, 0.05);
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: #e2e8f0;
}

.chat-title i {
    color: #00d4ff;
    font-size: 18px;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fbbf24;
    animation: pulse 2s ease-in-out infinite;
}

.status-dot.sleeping {
    background: #fbbf24;
}

.status-dot.typing {
    background: #3b82f6;
    animation: typing 1.5s ease-in-out infinite;
}

.status-dot.thinking {
    background: #3b82f6;
    animation: pulse 1s ease-in-out infinite;
}

.status-dot.analyzing {
    background: #8b5cf6;
    animation: pulse 0.8s ease-in-out infinite;
}

.status-dot.helping {
    background: #10b981;
    animation: pulse 1.5s ease-in-out infinite;
}

.status-dot.active {
    background: #10b981;
    animation: none;
}

.status-dot.error {
    background: #ef4444;
    animation: pulse 0.5s ease-in-out infinite;
}

/* Анимация печатания */
@keyframes typing {
    0%, 60%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    30% {
        transform: scale(1.3);
        opacity: 1;
    }
}

.chat-messages {
    max-height: 600px;
    min-height: 200px;
    overflow-y: auto;
    padding: 20px 24px;
    transition: max-height 0.3s ease;
}

.message {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.message:last-child {
    margin-bottom: 0;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 212, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.message-avatar i {
    color: #00d4ff;
    font-size: 14px;
}

/* Стильная аватарка для AI */
.ai-message .message-avatar {
    background: linear-gradient(135deg, #667eea, #764ba2);
    position: relative;
}

.ai-message .message-avatar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%);
    animation: shimmer 2s infinite;
}

.ai-message .message-avatar i {
    color: white;
    font-size: 16px;
    position: relative;
    z-index: 1;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.message-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 16px;
    border-radius: 16px 16px 16px 4px;
    color: #e2e8f0;
    font-size: 14px;
    line-height: 1.5;
    max-width: 85%;
    min-width: 200px;
    word-wrap: break-word;
}

/* Markdown styles */
.message-content h1,
.message-content h2,
.message-content h3,
.message-content h4,
.message-content h5,
.message-content h6 {
    color: #00d4ff;
    margin: 12px 0 8px 0;
    font-weight: 600;
}

.message-content h1 { font-size: 1.5em; }
.message-content h2 { font-size: 1.3em; }
.message-content h3 { font-size: 1.2em; }
.message-content h4 { font-size: 1.1em; }

.message-content p {
    margin: 8px 0;
}

.message-content ul,
.message-content ol {
    margin: 8px 0;
    padding-left: 20px;
}

.message-content li {
    margin: 4px 0;
}

.message-content code {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.message-content pre {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin: 12px 0;
    overflow-x: auto;
}

.message-content pre code {
    background: none;
    color: #e2e8f0;
    padding: 0;
    font-size: 0.9em;
}

.message-content blockquote {
    border-left: 4px solid #00d4ff;
    padding-left: 16px;
    margin: 12px 0;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
}

.message-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 12px 0;
    table-layout: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.message-content .table-wrapper {
    overflow-x: auto;
    margin: 12px 0;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.message-content .table-wrapper table {
    margin: 0;
    min-width: 100%;
}

.message-content th,
.message-content td {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    text-align: left;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 0;
    min-width: 120px;
}

.message-content th {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
    font-weight: 600;
}

.message-content a {
    color: #00d4ff;
    text-decoration: underline;
}

.message-content a:hover {
    color: #87ceeb;
}

.message-content strong {
    color: #fff;
    font-weight: 600;
}

.message-content em {
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
}

.ai-message .message-content {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    max-width: 90%;
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-content {
    background: rgba(135, 206, 235, 0.15);
    border-radius: 16px 16px 4px 16px;
    border: 1px solid rgba(135, 206, 235, 0.2);
}

.user-message .message-avatar {
    background: rgba(135, 206, 235, 0.2);
}

.user-message .message-avatar i {
    color: #87ceeb;
}

.chat-input-container {
    display: flex;
    gap: 8px;
    padding: 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    color: #e2e8f0;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.chat-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.chat-input:focus {
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.chat-send-btn {
    margin-left: 12px;
    background: linear-gradient(45deg, #00d4ff, #87ceeb);
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.chat-send-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.chat-send-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.chat-clear-btn {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 12px 16px;
    color: #ef4444;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.chat-clear-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.5);
    transform: translateY(-1px);
}

.chat-clear-btn:active {
    transform: translateY(0);
}

/* Mobile Chat Styles */
@media (max-width: 768px) {
    .ai-chat-strip {
        margin: 16px 12px;
        border-radius: 16px;
    }
    
    .chat-container {
        border-radius: 16px;
    }
    
    .chat-header {
        padding: 16px 20px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .chat-title {
        font-size: 16px;
        gap: 8px;
    }
    
    .chat-title i {
        font-size: 16px;
    }
    
    .chat-status {
        font-size: 12px;
        gap: 6px;
    }
    
    .chat-messages {
        max-height: 450px;
        min-height: 150px;
        padding: 16px 20px;
    }
    
    .message {
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .message-avatar {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .message-content {
        font-size: 14px;
        line-height: 1.4;
    }
    
    .message-content table {
        font-size: 12px;
        margin: 8px 0;
    }
    
    .message-content th,
    .message-content td {
        padding: 6px 8px;
        font-size: 12px;
        min-width: 80px;
        max-width: 200px;
    }
    
    .chat-input-container {
        padding: 16px 20px;
        gap: 6px;
        flex-wrap: nowrap;
    }
    
    .chat-input {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 10px 12px;
        border-radius: 10px;
    }
    
    .chat-send-btn {
        padding: 10px 12px;
        font-size: 12px;
        border-radius: 10px;
        min-width: 44px; /* Minimum touch target */
        margin-left: 6px;
    }
    
    .chat-clear-btn {
        padding: 10px 12px;
        font-size: 12px;
        border-radius: 10px;
        min-width: 44px; /* Minimum touch target */
    }
}

@media (max-width: 480px) {
    .ai-chat-strip {
        margin: 12px 8px;
        border-radius: 12px;
    }
    
    .chat-container {
        border-radius: 12px;
    }
    
    .chat-header {
        padding: 12px 16px;
    }
    
    .chat-title {
        font-size: 14px;
    }
    
    .chat-title i {
        font-size: 14px;
    }
    
    .chat-status {
        font-size: 11px;
    }
    
    .chat-messages {
        max-height: 350px;
        min-height: 120px;
        padding: 12px 16px;
    }
    
    .message {
        gap: 6px;
        margin-bottom: 10px;
    }
    
    .message-avatar {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .message-content {
        font-size: 13px;
        line-height: 1.3;
    }
    
    .message-content table {
        font-size: 11px;
        margin: 6px 0;
    }
    
    .message-content th,
    .message-content td {
        padding: 4px 6px;
        font-size: 11px;
        min-width: 60px;
        max-width: 150px;
    }
    
    .chat-input-container {
        padding: 12px 16px;
        gap: 4px;
    }
    
    .chat-input {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 8px 10px;
        border-radius: 8px;
    }
    
    .chat-send-btn {
        padding: 8px 10px;
        font-size: 11px;
        border-radius: 8px;
        min-width: 40px;
        margin-left: 4px;
    }
    
    .chat-clear-btn {
        padding: 8px 10px;
        font-size: 11px;
        border-radius: 8px;
        min-width: 40px;
    }
}

/* Extra small screens (landscape phones) */
@media (max-width: 360px) {
    .ai-chat-strip {
        margin: 8px 4px;
    }
    
    .chat-header {
        padding: 10px 12px;
    }
    
    .chat-messages {
        padding: 10px 12px;
    }
    
    .chat-input-container {
        padding: 10px 12px;
    }
    
    .chat-send-btn,
    .chat-clear-btn {
        padding: 6px 8px;
        font-size: 10px;
        min-width: 36px;
    }

    .kanban-board {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        height: calc(100vh - 100px);
        gap: 6px;
        padding: 0 4px 8px 4px;
        touch-action: pan-x;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        scrollbar-color: rgba(0, 212, 255, 0.3) transparent;
    }

    .kanban-board::-webkit-scrollbar {
        height: 4px;
    }

    .kanban-board::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 2px;
    }

    .kanban-board::-webkit-scrollbar-thumb {
        background: rgba(0, 212, 255, 0.3);
        border-radius: 2px;
    }

    .kanban-board::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 212, 255, 0.5);
    }

    .kanban-column {
        flex: 0 0 260px;
        min-width: 260px;
        max-width: 260px;
        height: 100%;
        padding: 10px;
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        display: flex;
        flex-direction: column;
        touch-action: pan-x pan-y;
    }

    .column-header {
        padding: 6px;
        margin-bottom: 6px;
    }

    .column-header h3 {
        font-size: 12px;
    }

    .task-count {
        font-size: 9px;
        padding: 1px 4px;
    }

    .task-list {
        min-height: 120px;
        padding: 2px;
    }

    .task-card {
        padding: 10px;
        margin-bottom: 6px;
    }

    .task-title {
        font-size: 12px;
    }

    .task-description {
        font-size: 11px;
    }
}

.main-categories-sidebar {
    position: fixed;
    left: 24px;
    top: 30%;
    transform: translateY(-30%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 50;
}

.main-category-icon {
    width: 56px;
    height: 56px;
    background: rgba(20, 20, 30, 0.8);
    border-radius: 16px;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(40, 40, 50, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.main-category-icon i {
    font-size: 22px;
    color: #9ca3af;
    transition: all 0.3s ease;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
}

.main-category-icon.forms-icon {
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.9) 0%, rgba(25, 25, 35, 0.9) 100%);
}

.main-category-icon.slices-icon {
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.9) 0%, rgba(25, 25, 35, 0.9) 100%);
}

.main-category-icon.tasks-icon {
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.9) 0%, rgba(25, 25, 35, 0.9) 100%);
}

.main-category-icon.dashboards-icon {
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.9) 0%, rgba(25, 25, 35, 0.9) 100%);
}

.main-category-icon.gantt-icon {
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.9) 0%, rgba(25, 25, 35, 0.9) 100%);
}

.main-category-icon:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-color: rgba(60, 60, 70, 0.9);
    background: linear-gradient(135deg, rgba(35, 35, 45, 0.95) 0%, rgba(30, 30, 40, 0.95) 100%);
}

.main-category-icon:hover i {
    color: #d1d5db;
    transform: scale(1.1);
}

.main-category-counter {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, rgba(10, 10, 15, 0.95) 0%, rgba(15, 15, 20, 0.95) 100%);
    color: #f8fafc;
    border-radius: 8px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 800;
    min-width: 16px;
    text-align: center;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(50, 50, 60, 0.8);
    backdrop-filter: blur(8px);
}

.main-category-objects {
    margin-top: 12px;
    padding: 8px;
    background: rgba(20, 20, 30, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(40, 40, 50, 0.6);
    font-size: 12px;
    color: #9ca3af;
    max-height: 120px;
    overflow-y: auto;
}

.main-category-objects:empty {
    display: none;
}

.main-category-expand {
    position: absolute;
    left: 80px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%) translateX(-20px);
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 60;
}

.main-category-icon:hover + .main-category-expand,
.main-category-expand:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.main-category-expand h3 {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.main-category-expand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 12px;
}

.main-category-stats {
    display: flex;
    gap: 12px;
}

.main-category-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.main-category-stat.active {
    color: #00d4ff;
}

.main-category-stat.overdue {
    color: #ff6b6b;
}

.main-category-header {
    padding: 30px;
    border-bottom: 1px solid #f7fafc;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.main-category-info h2 {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.main-category-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
}

.main-category-badge {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 12px 16px;
    min-width: 60px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.main-category-count {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}

.main-category-objects {
    display: none; /* Completely hide template lists on main screen */
}

.main-tasks-summary {
    padding: 20px 30px 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.main-task-status-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.main-task-status-item:hover {
    background: #f7fafc;
}

.main-task-status-item.active {
    background: linear-gradient(135deg, #ebf8ff 0%, #e6fffa 100%);
    border: 1px solid #bee3f8;
}

.main-task-status-item.overdue {
    background: linear-gradient(135deg, #fed7d7 0%, #fbb6ce 100%);
    border: 1px solid #feb2b2;
}

.main-task-status-item.completed {
    background: linear-gradient(135deg, #c6f6d5 0%, #9ae6b4 100%);
    border: 1px solid #9ae6b4;
}

.main-task-status-item i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.main-task-status-item.active i {
    color: #3182ce;
}

.main-task-status-item.overdue i {
    color: #e53e3e;
}

.main-task-status-item.completed i {
    color: #38a169;
}

.welcome-content p {
    color: #64748b;
    font-size: 16px;
}

/* Templates View */
.templates-view {
    height: 100%;
    padding: 24px;
    overflow-y: auto;
}

.templates-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 20px;
}

.templates-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.templates-header h2 {
    font-size: 24px;
    color: #1a202c;
}

.templates-search {
    position: relative;
    width: 300px;
}

.templates-search input {
    width: 100%;
    padding: 10px 40px 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
}

.templates-search i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.templates-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    min-height: 200px; /* Ensure minimum height */
    overflow-y: visible; /* Allow natural scrolling */
}

  .template-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
  }

.template-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #f093fb 100%);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.3s ease;
}

.template-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.template-card:hover::before {
    transform: scaleY(1);
}

  .template-card h3 {
    font-size: 18px;
    color: #ffffff;
    margin-bottom: 8px;
  }

  .template-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 16px;
  }

.template-meta {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    font-size: 12px;
    color: #94a3b8;
}

  .template-category {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(135, 206, 235, 0.2) 100%);
    color: #00d4ff;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(0, 212, 255, 0.3);
  }

/* Data View */
.data-view {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.data-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
}

.back-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    transform: translateY(-1px);
}

.data-header h2 {
    flex: 1;
    font-size: 20px;
    color: #ffffff;
}

.data-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    background: #1a202c;
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: #00d4ff;
    cursor: pointer;
    padding: 10px 16px;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.2);
}

.action-btn:hover {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(0, 212, 255, 0.2) 100%);
    border-color: rgba(0, 212, 255, 0.6);
    color: #00d4ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

/* Parameters Form */
.parameters-form {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 24px;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.form-header h3 {
    font-size: 16px;
    color: #ffffff;
}

.execute-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.execute-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.execute-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.execute-btn:hover::before {
    left: 100%;
}

.parameters-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.parameter-input {
    display: flex;
    flex-direction: column;
}

.parameter-input label {
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.parameter-input input {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    transition: border-color 0.2s ease;
}

.parameter-input input:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

/* Data Table */
.data-table-container {
    flex: 1;
    background: transparent;
    overflow: auto;
    position: relative;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling */
}

/* Force proper text in table elements - light theme */
.data-table *,
.data-table td *,
.data-table tr,
.data-table tbody,
.data-table thead,
.data-table input,
.data-table select,
.data-table textarea,
.data-table button {
    color: #000000 !important;
    background: #f0f0f0 !important;
}

/* Headers should have proper styling - light theme */
.data-table th {
    color: #000000 !important;
    background: #d0d0d0 !important;
    border: 1px solid #999999 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.data-table th * {
    color: #000000 !important;
    background: transparent !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure table headers are always visible - light theme */
.data-table thead th {
    color: #000000 !important;
    background: #d0d0d0 !important;
    border: 1px solid #cccccc !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.table-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 12px;
    color: #64748b;
    font-size: 14px;
}

.data-table-wrapper {
    height: 100%;
    overflow: auto;
    min-width: fit-content;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling */
}

.data-table {
    width: auto;
    min-width: 100%;
    min-height: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: auto;
    border: 1px solid #cccccc;
}

.data-table th {
    background: #d0d0d0 !important;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #000000 !important;
    border: 1px solid #cccccc !important;
    position: sticky;
    top: 0;
    z-index: 15;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.data-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.data-table th.sortable:hover {
    background: #c0c0c0;
    border-color: #666666;
}

.data-table th .sort-icon {
    margin-left: 8px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    color: #333333 !important;
}

.data-table th.sorted .sort-icon {
    opacity: 1;
}

.column-filter {
    width: 100%;
    padding: 4px 8px;
    margin-top: 4px;
    border: 1px solid #999999;
    border-radius: 4px;
    font-size: 12px;
    background: #ffffff;
    color: #000000;
    transition: all 0.2s ease;
}

.column-filter:focus {
    outline: none;
    border-color: #666666;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
    background: #ffffff;
}

.data-table td {
    padding: 12px 16px;
    border: 1px solid #cccccc;
    vertical-align: top;
    min-width: 120px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    color: #000000 !important;
    background: #f0f0f0;
    position: relative;
    z-index: 2;
}

.data-table tr:hover {
    background: #e0e0e0;
}

.data-table td.editable {
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    background: #e8e8e8;
    color: #000000 !important;
}

.data-table td.editable::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(100, 100, 100, 0.2) 0%, rgba(120, 120, 120, 0.2) 100%);
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 1;
}

.data-table td.editable:hover {
    background: #d0d0d0;
    transform: scale(1.02);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    color: #000000 !important;
}

.data-table td.editable:hover::before {
    opacity: 1;
}

.data-table td.editing {
    background: linear-gradient(135deg, rgba(255, 200, 0, 0.3) 0%, rgba(255, 220, 100, 0.3) 100%);
    border: 2px solid #ffcc00;
    animation: pulse 0.3s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(255, 200, 0, 0.4);
    transform: scale(1.02);
    color: #000000 !important;
}

.data-table td.success {
    background: linear-gradient(135deg, rgba(100, 200, 100, 0.3) 0%, rgba(150, 220, 150, 0.3) 100%);
    border: 2px solid #4CAF50;
    animation: flash-success 0.5s ease-in-out;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.4);
    color: #000000 !important;
}

.data-table td.error {
    background: linear-gradient(135deg, rgba(200, 50, 50, 0.3) 0%, rgba(220, 100, 100, 0.3) 100%);
    border: 2px solid #f44336;
    animation: flash-error 0.5s ease-in-out;
    box-shadow: 0 0 15px rgba(244, 67, 54, 0.4);
    color: #000000 !important;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes flash-success {
    0% { background: #d1fae5; }
    100% { background: transparent; }
}

@keyframes flash-error {
    0% { background: #fee2e2; }
    100% { background: transparent; }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    font-size: 18px;
    color: #ffffff;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 16px;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.modal-body {
    padding: 20px;
}

.cell-edit-input {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.cell-edit-input:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.save-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.save-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.cancel-btn {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: white;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #10b981;
    min-width: 300px;
    animation: toastSlideIn 0.3s ease-out;
}

.toast.error {
    border-left-color: #ef4444;
}

.toast.warning {
    border-left-color: #f59e0b;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fullscreen Table Mode */
.fullscreen-table {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: white;
    z-index: 9999;
    display: flex;
    flex-direction: column;
}

.fullscreen-table .data-table-container {
    flex: 1;
    overflow: auto;
}

.fullscreen-table .data-table-wrapper {
    height: 100%;
    overflow: auto;
    min-width: fit-content;
}

.fullscreen-table .data-header {
    padding: 16px 24px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.fullscreen-table .data-table th {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.fullscreen-table .back-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
}

.fullscreen-table .back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    transform: translateY(-1px);
}

/* Inline Cell Editing */
.cell-edit-input {
    width: 100%;
    height: 100%;
    border: 2px solid #00d4ff;
    padding: 4px 8px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border-radius: 4px;
    outline: none;
}

.cell-edit-input:focus {
    border-color: #00d4ff;
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.25);
    background: rgba(255, 255, 255, 0.1);
}

/* Categories View */
.categories-view {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.categories-header {
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.categories-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.categories-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0;
}

.categories-stats {
    color: #718096;
    font-size: 16px;
}

.categories-stats strong {
    color: #4299e1;
    font-weight: 600;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.category-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    min-height: 320px;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: #cbd5e0;
}

.category-header {
    padding: 24px;
    border-bottom: 1px solid #f7fafc;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.category-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: relative;
}

.main-category-card:hover .main-category-icon {
    transform: scale(1.1) rotate(5deg);
}

.main-category-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: relative;
}

.forms-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.slices-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 8px 20px rgba(240, 147, 251, 0.3);
}

.tasks-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 8px 20px rgba(79, 172, 254, 0.3);
}

.gantt-icon {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    box-shadow: 0 8px 20px rgba(255, 154, 158, 0.3);
}

.photos-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.docs-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 8px 20px rgba(240, 147, 251, 0.3);
}

.dashboards-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 8px 20px rgba(79, 172, 254, 0.3);
}

.category-icon i {
    font-size: 24px;
    color: white;
}

.category-info {
    flex: 1;
}

.category-info h3 {
    font-size: 20px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 6px;
}

.category-info p {
    color: #718096;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
}

.category-badge {
    background: #f7fafc;
    border-radius: 12px;
    padding: 8px 12px;
    min-width: 44px;
    text-align: center;
}

.category-count {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
}

.category-objects {
    padding: 0 24px 24px;
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: rgba(102, 126, 234, 0.3) transparent; /* Firefox */
}

.object-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f7fafc;
    min-height: 32px; /* Ensure minimum touch target */
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.object-item:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

.object-item:last-child {
    border-bottom: none;
}

.object-name {
    font-size: 14px;
    color: #4a5568;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.object-schema {
    font-size: 12px;
    color: #94a3b8;
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: 8px;
    flex-shrink: 0;
}

.no-objects {
    text-align: center;
    padding: 20px 10px;
    color: #94a3b8;
    font-size: 14px;
    font-style: italic;
}

.object-count {
    background: #edf2f7;
    color: #4a5568;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.tasks-summary {
    padding: 16px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-status-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.task-status-item:hover {
    background: #f7fafc;
}

.task-status-item.active {
    background: linear-gradient(135deg, #ebf8ff 0%, #e6fffa 100%);
    border: 1px solid #bee3f8;
}

.task-status-item.overdue {
    background: linear-gradient(135deg, #fed7d7 0%, #fbb6ce 100%);
    border: 1px solid #feb2b2;
}

.task-status-item.completed {
    background: linear-gradient(135deg, #c6f6d5 0%, #9ae6b4 100%);
    border: 1px solid #9ae6b4;
}

.task-status-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.task-status-item.active i {
    color: #3182ce;
}

.task-status-item.overdue i {
    color: #e53e3e;
}

.task-status-item.completed i {
    color: #38a169;
}

.status-label {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #2d3748;
}

.status-count {
    background: white;
    color: #2d3748;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    min-width: 32px;
    text-align: center;
}

/* Development notice */
.development-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    color: #718096;
    font-size: 14px;
    font-style: italic;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 8px;
    margin: 10px 0;
}

.development-notice i {
    font-size: 16px;
    color: #a0aec0;
}

/* Kanban Board */
.kanban-view {
    padding: 20px;
    height: calc(100vh - 80px);
    overflow: hidden;
}

.kanban-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.kanban-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #1a202c;
}

.kanban-actions {
    display: flex;
    gap: 10px;
}

.action-btn.primary {
    background: #4299e1;
    color: white;
}

.action-btn.primary:hover {
    background: #3182ce;
}

.action-btn.secondary {
    background: #2d3748;
    color: #a0aec0;
    border-color: rgba(160, 174, 192, 0.3);
}

.action-btn.secondary:hover {
    background: #4a5568;
    color: #e2e8f0;
    border-color: rgba(160, 174, 192, 0.6);
}

/* Kanban Filters */
.kanban-filters {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 500;
    color: #000000;
    white-space: nowrap;
}

.filter-select, .filter-input {
    padding: 8px 12px;
    border: 1px solid #cccccc;
    border-radius: 6px;
    font-size: 14px;
    background: #ffffff;
    color: #000000;
    min-width: 120px;
}

.filter-select option {
    background: #ffffff;
    color: #000000;
    padding: 8px 12px;
}

.filter-select:focus, .filter-input:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
}

.custom-period {
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-period span {
    font-size: 14px;
    color: #718096;
}

/* Task User Toggle Switch */
.task-user-toggle {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-label {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #4a5568 !important;
    white-space: nowrap;
}

.toggle-switch {
    position: relative;
    display: flex;
    background: #f7fafc;
    border-radius: 25px;
    padding: 3px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.toggle-input {
    display: none;
}

.toggle-option {
    position: relative;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #a0aec0;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 2;
    min-width: 110px;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.toggle-option.active {
    color: #1a202c;
    background: linear-gradient(135deg, #00d4ff 0%, #00a8cc 100%);
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.4);
    transform: translateY(-1px);
}

.toggle-option:hover:not(.active) {
    color: #e2e8f0;
    background: rgba(0, 212, 255, 0.1);
}

.toggle-switch:hover {
    border-color: #cbd5e0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.kanban-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #718096;
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    height: calc(100% - 100px);
}

.kanban-column {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    touch-action: pan-x pan-y;
}

.column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    touch-action: pan-x pan-y;
}

.column-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.task-count {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.task-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 100px;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.task-list.drag-over {
    background-color: rgba(0, 212, 255, 0.1);
    border: 2px dashed #00d4ff;
}

/* Allow natural scrolling on task-list when not touching tasks */
.task-list {
    touch-action: pan-x pan-y;
}

.task-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.task-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
}

.task-card.priority-срочно::before {
    background: linear-gradient(180deg, #e53e3e 0%, #c53030 100%);
}

.task-card.priority-высокий::before {
    background: linear-gradient(180deg, #ed8936 0%, #dd6b20 100%);
}

.task-card.priority-средний::before {
    background: linear-gradient(180deg, #4299e1 0%, #3182ce 100%);
}

.task-card.priority-низкий::before {
    background: linear-gradient(180deg, #48bb78 0%, #38a169 100%);
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
}

.task-card.dragging {
    opacity: 0.9;
    transform: rotate(2deg) scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.4);
    z-index: 1000;
    border-color: #00d4ff;
}

/* Add visual feedback for long press preparation */
.task-card.long-press-feedback {
    animation: longPressPulse 0.6s ease-in-out;
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

@keyframes longPressPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.task-card.overdue {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.2);
}

.task-card.overdue .task-title {
    color: #ff6b6b;
}

.task-card.due-soon {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.2);
}

.task-card.due-soon .task-title {
    color: #fbbf24;
}

.task-card.completed {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.4);
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.2);
    opacity: 0.8;
}

.task-card.completed .task-title {
    color: #4ade80;
    text-decoration: line-through;
}

.task-title {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1.3;
}

.task-description {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.task-priority {
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
}

.task-priority.низкий {
    background: #c6f6d5;
    color: #276749;
}

.task-priority.средний {
    background: #fed7d7;
    color: #c53030;
}

.task-priority.высокий {
    background: #fbb6ce;
    color: #b83280;
}

.task-priority.срочно {
    background: #feb2b2;
    color: #e53e3e;
}

.task-author {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.task-due-date {
    color: rgba(255, 255, 255, 0.7);
}

.task-due-date.overdue {
    color: #e53e3e;
    font-weight: 600;
}

/* Task Modal */
.task-modal .modal-content {
    width: 100%;
    max-width: 600px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 6px;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.form-group select option {
    background: #1a202c;
    color: #ffffff;
    padding: 8px 12px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Responsive Design for Kanban */
@media (max-width: 1200px) {
    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .kanban-view {
        padding: 8px;
        height: 100vh;
        overflow: hidden;
    }
    
    .kanban-header {
        padding: 8px 12px;
        margin-bottom: 8px;
        gap: 8px;
    }
    
    .kanban-header h2 {
        font-size: 18px;
        margin: 0;
    }
    
    .kanban-actions {
        gap: 6px;
    }
    
    .action-btn {
        padding: 6px 12px;
        font-size: 12px;
        min-width: 80px;
    }
    
    .kanban-filters {
        padding: 8px 12px;
        gap: 8px;
        margin-bottom: 8px;
    }
    
    .filter-group {
        min-width: 100px;
    }
    
    .filter-group label {
        font-size: 12px;
    }
    
    .filter-select, .filter-input {
        padding: 4px 8px;
        font-size: 12px;
        min-width: 80px;
    }
    
    .kanban-board {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 12px;
        height: calc(100vh - 140px);
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        padding: 0 8px 10px 8px;
        touch-action: pan-x;
        scrollbar-width: thin;
        scrollbar-color: rgba(0, 212, 255, 0.3) transparent;
    }
    
    .kanban-board::-webkit-scrollbar {
        height: 4px;
    }
    
    .kanban-board::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 2px;
    }
    
    .kanban-board::-webkit-scrollbar-thumb {
        background: rgba(0, 212, 255, 0.3);
        border-radius: 2px;
    }
    
    .kanban-board::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 212, 255, 0.5);
    }
    
    .kanban-column {
        flex: 0 0 300px;
        min-width: 300px;
        max-width: 300px;
        height: 100%;
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        padding: 12px;
        display: flex;
        flex-direction: column;
        touch-action: pan-x pan-y;
    }
    
    .task-list {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        min-height: 200px;
        touch-action: pan-x pan-y;
        scrollbar-width: thin;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Photos Gallery */
.photos-view {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.photos-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: white;
}

.photos-header h2 {
    flex: 1;
    font-size: 20px;
    color: #1a202c;
}

.photos-actions {
    display: flex;
    gap: 8px;
}

.photos-gallery {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.photo-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8fafc;
    border: 2px solid transparent;
    aspect-ratio: 4/3;
}

.photo-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-item:hover .photo-overlay {
    opacity: 1;
}

.photo-overlay i {
    font-size: 24px;
    color: white;
}

/* Photo Modal */
.photo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.photo-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.photo-modal-header {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
}

.photo-modal-close {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
}

.photo-modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.photo-modal-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.photo-modal-body img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Mobile Photos Styles */
@media (max-width: 768px) {
    .photos-gallery {
        padding: 16px;
    }

    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 16px;
    }

    .photo-item {
        aspect-ratio: 3/4;
    }
}

@media (max-width: 480px) {
    .photos-header {
        padding: 16px;
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .photos-header h2 {
        text-align: center;
        font-size: 18px;
    }

    .photos-gallery {
        padding: 12px;
    }

    .photo-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .photo-item {
        aspect-ratio: 4/5;
        max-width: 100%;
    }

    .photo-modal-body img {
        max-height: 70vh;
    }
}

/* Custom Scrollbar Styles for Form Objects */
.main-category-objects::-webkit-scrollbar,
.category-objects::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.main-category-objects::-webkit-scrollbar-track,
.category-objects::-webkit-scrollbar-track {
    background: rgba(247, 250, 252, 0.5);
    border-radius: 3px;
}

.main-category-objects::-webkit-scrollbar-thumb,
.category-objects::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.4);
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.main-category-objects::-webkit-scrollbar-thumb:hover,
.category-objects::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.6);
}

/* Ensure proper scrolling behavior for touch devices */
@media (hover: none) and (pointer: coarse) {
    .main-category-objects,
    .category-objects {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: auto; /* Disable smooth scrolling on touch devices for better performance */
    }
}

/* Navigation Menu */
.nav-menu {
    position: fixed;
    top: 70px;
    right: -300px;
    width: 280px;
    height: calc(100vh - 70px);
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    transition: right 0.3s ease;
    z-index: 99;
    padding: 20px;
    overflow-y: auto;
}

.nav-menu.open {
    right: 0;
}

.nav-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: translateX(5px);
}

.nav-menu-item i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.menu-toggle {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    transform: translateY(-1px);
}

/* Gantt Charts Section */
.gantt-section {
    padding: 8px;
    width: 100vw;
    margin: 0;
    height: calc(100vh - 70px);
    min-height: calc(100vh - 70px);
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f0f0f0;
}

.gantt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
    padding: 6px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.gantt-header h1 {
    font-size: 1.5rem;
    color: #000000;
    margin: 0;
}

.gantt-actions {
    display: flex;
    gap: 12px;
}

.gantt-controls {
    background: #e0e0e0;
    border: 1px solid #cccccc;
    border-radius: 8px;
    padding: 8px 16px;
    margin: 0 8px 4px 8px;
    flex-shrink: 0;
}

.gantt-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 150px;
}

.filter-group label {
    color: #000000;
    font-size: 0.9rem;
    font-weight: 500;
}

.filter-select,
.filter-input {
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 8px;
    padding: 8px 12px;
    color: #000000;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.filter-select option {
    background: #ffffff;
    color: #000000;
}

.apply-filters-btn,
.reset-filters-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    height: fit-content;
}

.apply-filters-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.apply-filters-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.reset-filters-btn {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.reset-filters-btn:hover {
    background: #e9ecef;
    color: #495057;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gantt-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: #666666;
}

.gantt-chart-container {
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 8px;
    padding: 8px;
    flex: 1;
    min-height: 400px;
    margin: 0 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.gantt-chart {
    width: 100%;
    flex: 1;
    overflow-x: auto;
    overflow-y: auto;
    border-radius: 4px;
    min-height: 0;
}

/* Custom scrollbar styles for Gantt chart */
.gantt-chart::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.gantt-chart::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 6px;
}

.gantt-chart::-webkit-scrollbar-thumb {
    background: #cccccc;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
}

.gantt-chart::-webkit-scrollbar-thumb:hover {
    background: #999999;
}

.gantt-chart::-webkit-scrollbar-corner {
    background: #e0e0e0;
}

.gantt-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

.gantt-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Gantt Chart Styles */
.gantt-timeline {
    display: flex;
    flex-direction: column;
    min-width: 1200px;
    width: max-content;
}

.gantt-header-row {
    display: flex;
    background: #d0d0d0;
    border-bottom: 3px solid #999999;
    border-top: 2px solid #999999;
    position: sticky;
    top: 0;
    z-index: 30;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gantt-info-columns {
    display: flex;
    background: #d0d0d0;
    border-right: 3px solid #999999;
    border-top: 2px solid #999999;
    border-bottom: 3px solid #999999;
    width: 560px;
    flex-shrink: 0;
    position: sticky;
    left: 0;
    top: 0;
    z-index: 35;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gantt-info-header {
    padding: 6px 4px;
    font-weight: 700;
    color: #000000;
    border-right: 2px solid #999999;
    font-size: 0.8rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    min-height: 80px;
    box-sizing: border-box;
    overflow: hidden;
}

.gantt-info-cell.gantt-number,
.gantt-info-header.gantt-number {
    width: 60px;
    flex: 0 0 60px;
    justify-content: center !important;
    text-align: center !important;
}

.gantt-info-cell.gantt-task-name,
.gantt-info-header.gantt-task-name {
    width: 200px;
    flex: 0 0 200px;
    justify-content: flex-start !important;
    text-align: left !important;
}

.gantt-responsible {
    width: 100px;
    flex: 0 0 100px;
}

.gantt-unit {
    width: 80px;
    flex: 0 0 80px;
}

.gantt-working-space {
    width: 120px;
    flex: 0 0 120px;
}

.gantt-comment {
    display: none;
}

.gantt-dates {
    display: flex;
    flex: 1;
    min-width: 0;
    background: #f0f0f0;
}

.gantt-date-cell {
    min-width: 50px;
    width: 50px;
    flex-shrink: 0;
    padding: 8px 4px;
    text-align: center;
    font-size: 0.8rem;
    color: #000000;
    border-right: 1px solid #999999;
    border-top: 2px solid #999999;
    border-bottom: 3px solid #999999;
    font-weight: 700;
    background: #d0d0d0;
}

.gantt-row {
    display: flex;
    border-bottom: 1px solid #cccccc;
    transition: background-color 0.2s ease;
    min-height: 60px;
    align-items: stretch;
    background: #ffffff;
}

.gantt-row:hover {
    background: #e0e0e0;
}

.gantt-row:hover .gantt-info-cells {
    background: #d0d0d0;
}

.gantt-info-cells {
    display: flex;
    background: #f0f0f0;
    border-right: 2px solid #cccccc;
    width: 560px;
    flex-shrink: 0;
    position: sticky;
    left: 0;
    z-index: 20;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

/* Enhanced border for fixed columns */
.gantt-info-columns::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.6;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

.gantt-info-cells::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.4;
}

.gantt-info-cell {
    padding: 6px 4px;
    color: #000000;
    border-right: 1px solid #cccccc;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.2;
    overflow: visible;
    box-sizing: border-box;
    min-height: 60px;
}

.gantt-timeline-cell {
    min-width: 50px;
    width: 50px;
    flex-shrink: 0;
    min-height: 60px;
    border-right: 1px solid #cccccc;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: #ffffff;
    z-index: 1;
}

.gantt-bar {
    height: 20px;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 30px;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    left: 0;
    right: 0;
    z-index: 10;
    position: relative;
}

.gantt-bar.plan {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: absolute;
    top: 8px;
    z-index: 15;
}

.gantt-bar.fact {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    position: absolute;
    bottom: 8px;
    z-index: 20;
}

.gantt-bar:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Editing disabled - cursor style removed */

.gantt-bar.dragging {
    opacity: 0.7;
    z-index: 100;
}

.gantt-empty-cell {
    width: 100%;
    height: 20px;
    border: 1px solid transparent;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    position: absolute;
    top: 8px;
}

/* Editing disabled - hover effects for empty cells removed */

/* Header filters and sorting */
.gantt-header-filter {
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 4px;
    padding: 2px 4px;
    color: #000000;
    font-size: 0.7rem;
    width: 100%;
    margin-top: 2px;
}

.gantt-header-filter:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 1px rgba(102, 126, 234, 0.3);
}

.gantt-sort-btn {
    background: none;
    border: none;
    color: #666666;
    cursor: pointer;
    padding: 2px;
    font-size: 0.7rem;
    transition: color 0.2s ease;
}

.gantt-sort-btn:hover {
    color: #000000;
}

.gantt-sort-btn.active {
    color: #667eea;
}

.gantt-sort-btn.sort-asc {
    color: #28a745;
    font-weight: bold;
}

.gantt-sort-btn.sort-desc {
    color: #dc3545;
    font-weight: bold;
}

.gantt-legend {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    padding: 12px;
    background: #e0e0e0;
    border-radius: 8px;
    align-items: center;
    border: 1px solid #cccccc;
}

.gantt-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #000000;
    font-size: 0.9rem;
}

.gantt-legend-color {
    width: 20px;
    height: 12px;
    border-radius: 6px;
}


/* Gantt Pagination Styles */
.gantt-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 16px;
    background: #e0e0e0;
    border: 1px solid #cccccc;
    border-radius: 12px;
    margin-bottom: 16px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(102, 126, 234, 0.3);
    border-color: #667eea;
    transform: translateY(-1px);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

#pagination-pages {
    color: #ffffff;
    font-weight: 500;
    margin: 0 12px;
    font-size: 0.9rem;
}

/* Schema with inline statistics */
.schema-with-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
}

.schema-inline-stats {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    margin-top: 4px;
}

.schema-inline-stats.visible {
    opacity: 1;
}

.inline-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #666666;
    white-space: nowrap;
}

.inline-stat i {
    font-size: 0.7rem;
    color: #667eea;
}

.inline-stat span {
    font-weight: 600;
    color: #000000;
}


.pagination-stat {
    color: #666666;
}

.pagination-stat i {
    color: #28a745;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Gantt Row Grouping Styles */
.gantt-row {
    position: relative;
}


/* Responsive adjustments for Gantt */
@media (max-width: 768px) {
    
    /* Adjust fixed columns width for mobile */
    .gantt-info-columns,
    .gantt-info-cells {
        width: 410px;
    }
    
    .gantt-info-cell.gantt-task-name,
    .gantt-info-header.gantt-task-name {
        width: 150px;
        flex: 0 0 150px;
        justify-content: flex-start !important;
        text-align: left !important;
    }
    
    .gantt-responsible {
        width: 80px;
        flex: 0 0 80px;
    }
    
    .gantt-unit {
        width: 60px;
        flex: 0 0 60px;
    }
    
    .gantt-working-space {
        width: 60px;
        flex: 0 0 60px;
    }
    
    /* Adjust section height for mobile */
    .gantt-section {
        height: calc(100vh - 60px);
        min-height: calc(100vh - 60px);
    }
    
    .gantt-chart-container {
        min-height: 300px;
    }
}

/* Modal positioning fix for Gantt */
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.8) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10000 !important;
}

.modal-content {
    position: relative !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
}

/* News Section */
.news-section {
    padding: 40px;
    background: transparent;
    min-height: calc(100vh - 70px);
    position: relative;
}

.news-header {
    text-align: center;
    margin-bottom: 40px;
}

.news-header h1 {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(45deg, #00d4ff, #87ceeb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.news-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.3);
}

.news-card h3 {
    color: #ffffff;
    font-size: 20px;
    margin-bottom: 12px;
}

.news-card p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 16px;
}

.news-date {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

/* Contact Section */
.contact-section {
    padding: 40px;
    background: transparent;
    min-height: calc(100vh - 70px);
    position: relative;
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
}

.contact-info h2 {
    color: #ffffff;
    font-size: 24px;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #00d4ff, #87ceeb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.8);
}

.contact-item i {
    font-size: 20px;
    color: #00d4ff;
    width: 25px;
}

/* Feedback Form */
.feedback-form {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
}

.feedback-form h2 {
    color: #ffffff;
    font-size: 24px;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #00d4ff, #87ceeb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.feedback-form .form-group {
    margin-bottom: 20px;
}

.feedback-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.feedback-form input,
.feedback-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    transition: all 0.3s ease;
}

.feedback-form input:focus,
.feedback-form textarea:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.feedback-form textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    background: linear-gradient(45deg, #00d4ff, #87ceeb);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 212, 255, 0.3);
}

/* Notification System */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    color: #ffffff;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    min-width: 300px;
    animation: slideInRight 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification.success {
    border-color: rgba(0, 255, 0, 0.3);
}

.notification.error {
    border-color: rgba(255, 0, 0, 0.3);
}

.notification.warning {
    border-color: rgba(255, 255, 0, 0.3);
}

.notification i {
    font-size: 20px;
    color: #00d4ff;
}

.notification.success i {
    color: #00ff00;
}

.notification.error i {
    color: #ff0000;
}

.notification.warning i {
    color: #ffff00;
}

.notification-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 4px;
    margin-left: auto;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.notification-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 16px;
}

.mt-4 {
    margin-top: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-app {
        grid-template-areas: 
            "header"
            "main";
        grid-template-rows: 70px 1fr;
        grid-template-columns: 1fr;
    }
    
    .kenner-text {
        font-size: clamp(4rem, 12vw, 8rem);
    }
    
    .nav-menu {
        width: 100%;
        right: -100%;
        top: 70px;
        height: calc(100vh - 70px);
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .welcome-screen {
        padding: 16px;
        height: calc(100vh - 70px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .news-section {
        padding: 20px;
        min-height: calc(100vh - 70px);
    }
    
    .contact-section {
        padding: 20px;
        min-height: calc(100vh - 70px);
    }
    
    .main-categories-header {
        text-align: center;
        margin-bottom: 24px;
    }
    
    .main-categories-header h1 {
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .main-categories-header p {
        font-size: 14px;
    }
    
    .main-categories-sidebar {
        position: static;
        transform: none;
        flex-direction: row;
        justify-content: center;
        margin: 20px;
        gap: 12px;
        flex-wrap: wrap;
    }

    .main-category-expand {
        display: none;
    }

    .ai-chat-strip {
        margin: 20px 12px;
        max-width: none;
        width: calc(100% - 24px);
        box-sizing: border-box;
    }
    
    .main-category-card {
        min-height: 140px;
        max-height: 160px;
    }
    
    .main-category-header {
        padding: 16px;
        gap: 12px;
        justify-content: space-between;
        align-items: flex-start;
    }
    
    .main-category-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }
    
    .main-category-icon i {
        font-size: 18px;
    }
    
    .main-category-info h2 {
        font-size: 18px;
        margin-bottom: 4px;
    }
    
    .main-category-info p {
        font-size: 12px;
        line-height: 1.3;
    }
    
    .main-category-badge {
        padding: 8px 12px;
        margin-left: auto;
        align-self: flex-start;
    }
    
    .main-category-count {
        font-size: 18px;
    }
    
    .main-category-objects {
        display: none; /* Hide template lists on mobile to save space */
    }
    
    .main-tasks-summary {
        display: none; /* Hide task summary on mobile to save space */
    }
    
    .main-task-status-item {
        padding: 12px;
        border-radius: 8px;
    }
    
    .development-notice {
        padding: 12px;
        font-size: 12px;
        margin: 8px 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .mobile-close-btn {
        display: block;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        z-index: 100;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .templates-list {
        grid-template-columns: 1fr;
    }
    
    .templates-search {
        width: 100%;
        margin-top: 16px;
    }
    
    .templates-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .templates-view {
        padding: 16px;
    }
    
    .data-header {
        padding: 16px;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .data-header h2 {
        font-size: 18px;
    }
    
    .parameters-form {
        padding: 16px;
    }
    
    .parameters-inputs {
        grid-template-columns: 1fr;
    }
    
    .logout-text {
        display: none;
    }
    
    .user-info {
        display: none;
    }
    
    .data-table {
        font-size: 12px;
        width: 100%;
        min-width: auto;
        table-layout: auto;
    }
    
    .data-table th {
        position: sticky;
        top: 0;
        z-index: 15;
        background: #d0d0d0 !important;
        border: 1px solid #cccccc !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .data-table th,
    .data-table td {
        padding: 8px 12px;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        min-width: 80px;
        border: 1px solid #cccccc;
    }

    .data-table-wrapper {
        overflow-x: auto !important;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    body {
        overflow-x: auto;
    }
    
    .app-header {
        padding: 0 12px;
        height: 70px;
    }
    
    .kenner-text {
        font-size: clamp(3rem, 10vw, 6rem);
        letter-spacing: 0.1em;
    }
    
    .app-header h1 {
        font-size: 16px;
    }
    
    .welcome-screen {
        padding: 12px;
        height: calc(100vh - 70px);
    }
    
    .ai-chat-strip {
        margin: 12px 4px;
        width: calc(100% - 8px);
        border-radius: 12px;
    }
    
    .chat-input-container {
        padding: 8px 12px;
        gap: 4px;
    }
    
    .chat-send-btn,
    .chat-clear-btn {
        padding: 8px 10px;
        font-size: 11px;
        min-width: 36px;
    }
    
    .news-section {
        padding: 12px;
        min-height: calc(100vh - 70px);
    }
    
    .news-header h1 {
        font-size: 28px;
    }
    
    .contact-section {
        padding: 12px;
        min-height: calc(100vh - 70px);
    }
    
    .contact-info,
    .feedback-form {
        padding: 20px;
    }
    
    .contact-info h2,
    .feedback-form h2 {
        font-size: 20px;
    }
    
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
    }
    
    .main-categories-header {
        margin-bottom: 16px;
    }
    
    .main-categories-header h1 {
        font-size: 20px;
    }
    
    .main-categories-header p {
        font-size: 13px;
    }
    
    .main-categories-grid {
        gap: 12px;
    }
    
    .main-category-card {
        min-height: 120px;
        max-height: 140px;
        border-radius: 16px;
    }
    
    .main-category-header {
        padding: 12px;
        gap: 10px;
    }
    
    .main-category-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }
    
    .main-category-icon i {
        font-size: 16px;
    }
    
    .main-category-info h2 {
        font-size: 16px;
        margin-bottom: 2px;
    }
    
    .main-category-info p {
        font-size: 11px;
    }
    
    .main-category-badge {
        padding: 6px 10px;
        min-width: 40px;
        margin-left: auto;
        align-self: flex-start;
    }
    
    .main-category-count {
        font-size: 16px;
    }
    
    .main-category-objects {
        display: none; /* Hide template lists on small mobile screens */
    }
    
    .main-tasks-summary {
        display: none; /* Hide task summary on small mobile screens */
    }
    
    .main-task-status-item {
        padding: 8px;
        border-radius: 6px;
    }
    
    .development-notice {
        padding: 8px;
        font-size: 11px;
        margin: 4px 0;
    }
    
    .development-notice i {
        font-size: 14px;
    }
    
    /* Kanban optimizations for small screens */
    .kanban-view {
        padding: 4px;
        height: 100vh;
    }
    
    .kanban-header {
        padding: 4px 6px;
        margin-bottom: 4px;
    }
    
    .kanban-header h2 {
        display: none;
    }
    
    .action-btn {
        padding: 4px 8px;
        font-size: 11px;
        min-width: 70px;
    }
    
    .kanban-filters {
        padding: 6px 8px;
        margin-bottom: 6px;
    }
    
    .filter-select, .filter-input {
        padding: 3px 6px;
        font-size: 11px;
        min-width: 70px;
    }
    
    /* Mobile toggle switch styles */
    .toggle-option {
        padding: 6px 12px !important;
        font-size: 11px !important;
        min-width: 90px !important;
    }
    
    .toggle-label {
        font-size: 12px !important;
    }
    
    .task-user-toggle {
        gap: 8px !important;
    }
    
    .kanban-board {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        height: calc(100vh - 100px);
        gap: 8px;
        padding: 0 8px 8px 8px;
        touch-action: pan-x;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        scrollbar-color: rgba(0, 212, 255, 0.3) transparent;
    }

    .kanban-board::-webkit-scrollbar {
        height: 4px;
    }

    .kanban-board::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 2px;
    }

    .kanban-board::-webkit-scrollbar-thumb {
        background: rgba(0, 212, 255, 0.3);
        border-radius: 2px;
    }

    .kanban-board::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 212, 255, 0.5);
    }
    
    .kanban-column {
        flex: 0 0 280px;
        min-width: 280px;
        max-width: 280px;
        height: 100%;
        padding: 12px;
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        display: flex;
        flex-direction: column;
        touch-action: pan-x pan-y;
    }
    
    .task-list {
        min-height: 150px;
        padding: 4px;
    }
    
    .column-header {
        padding: 8px;
        margin-bottom: 8px;
    }
    
    .column-header h3 {
        font-size: 13px;
    }
    
    .task-count {
        font-size: 10px;
        padding: 2px 5px;
    }
    
    .task-card {
        padding: 12px;
        margin-bottom: 8px;
        touch-action: auto;
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    .task-title {
        font-size: 13px;
    }
    
    .task-description {
        font-size: 11px;
    }
    
    .task-meta {
        font-size: 10px;
    }
    
    .templates-view {
        padding: 12px;
    }
    
    .data-header {
        padding: 12px;
    }
    
    .parameters-form {
        padding: 12px;
    }
    
    .data-table {
        width: 100%;
        min-width: auto;
        table-layout: auto;
    }

    .data-table th {
        position: sticky;
        top: 0;
        z-index: 15;
        background: #d0d0d0 !important;
        border: 1px solid #cccccc !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
        color: #000000 !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .data-table th,
    .data-table td {
        padding: 6px 8px;
        font-size: 11px;
        min-width: 70px;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        color: #000000 !important;
        background: #f0f0f0 !important;
        border: 1px solid #cccccc;
    }
    
    .template-card {
        padding: 16px;
    }
    
    .template-card h3 {
        font-size: 16px;
    }
    
    .login-card {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .login-header p {
        font-size: 14px;
    }
    
    .form-group input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .login-btn {
        font-size: 16px;
    }
}
