:root {
    --primary-blue: #2E3B82;
    --secondary-blue: #4A5FA8;
    --accent-cyan: #A3D5E8;
    --accent-red: #E74C3C;
    --white: #FFFFFF;
    --gray-light: #F4F6F9;
    --gray-dark: #6C757D;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    height: 100vh;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* Hide scrollbars */
body::-webkit-scrollbar {
    display: none;
}

body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.header {
    background: #E3F2FD;
    padding: 0.8rem 1.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    height: 55px;
    width: auto;
    flex-shrink: 0;
    border-radius: 8px;
    object-fit: cover;
}

.header-text {
    flex: 1;
    text-align: center;
    margin-left: -40px;
}

.company-name {
    color: var(--primary-blue);
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.hero {
    text-align: center;
    padding: 1.5rem 1rem;
    color: var(--primary-blue);
}

.hero-title {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 0;
}

.hero-image img {
    max-width: 600px;
    width: 100%;
    height: auto;
}

.modules {
    max-width: 700px;
    margin: 2rem auto;
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.module-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.module-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.coal-card {
    border-top: 3px solid #34495E;
}

.cotton-card {
    border-top: 3px solid var(--accent-cyan);
}

.unified-card {
    border-top: 3px solid #27ae60;
    grid-column: 1 / -1;
    max-width: 400px;
    margin: 0 auto;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #27ae60;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.2);
}

.unified-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.3);
}

.combined-card {
    border-top: 3px solid #9b59b6;
}

.module-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: var(--gray-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.module-icon img {
    width: 50px;
    height: 50px;
}

.module-title {
    font-size: 1.3rem;
    color: var(--primary-blue);
    margin-bottom: 0.3rem;
}

.module-desc {
    color: var(--gray-dark);
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
}

.btn-login {
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    padding: 0.7rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn-login:hover {
    background: var(--secondary-blue);
    transform: scale(1.05);
}

.btn-login:active {
    transform: scale(0.98);
}



/* Separate Dashboard Styles */
.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-links a {
    color: var(--primary-blue);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.nav-links a:hover {
    background: var(--gray-light);
}

.single-dashboard {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem 0;
}

.dashboard-header h2 {
    color: var(--primary-blue);
    font-size: 1.8rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-dark);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #27ae60;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.dashboard-content {
    position: relative;
    height: calc(100vh - 200px);
    min-height: 600px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.dashboard-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    color: var(--gray-dark);
    z-index: 10;
}

.footer {
    background: var(--primary-blue);
    color: var(--white);
    text-align: center;
    padding: 0.8rem;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

/* Unified Dashboard Styles */
.unified-dashboard {
    max-width: 1600px;
    margin: 1rem auto;
    padding: 0 1rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    height: calc(100vh - 180px);
    min-height: 600px;
}

.dashboard-panel {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.cotton-panel {
    border-top: 3px solid var(--accent-cyan);
}

.coal-panel {
    border-top: 3px solid #34495E;
}

.panel-header {
    background: var(--gray-light);
    padding: 0.8rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}

.panel-header h3 {
    color: var(--primary-blue);
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--gray-dark);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.cotton-status {
    background: var(--accent-cyan);
}

.coal-status {
    background: #34495E;
}

.panel-content {
    flex: 1;
    position: relative;
    background: var(--white);
}

.panel-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.9rem;
    color: var(--gray-dark);
    z-index: 10;
    text-align: center;
}

@media (max-width: 768px) {
    .modules {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .unified-card {
        grid-column: 1;
        max-width: 100%;
    }
    
    .header {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        height: auto;
    }
    
    .dashboard-panel {
        height: 400px;
    }
    
    .panel-header {
        padding: 0.6rem 0.8rem;
    }
    
    .panel-header h3 {
        font-size: 0.9rem;
    }
}