/*!
 * Deepak 18/05/2023
 * External Style sheet.
 * Updated for Michelin Brand Compliance - 2024
 */

/* Michelin Brand Color Variables */
:root {
    --michelin-primary: #003366;
    --michelin-secondary: #FFD700;
    --michelin-accent: #004080;
    --michelin-white: #FFFFFF;
    --michelin-gray: #666666;
    --michelin-error: #ff4d4f;
    --michelin-success: #52c41a;
    --michelin-border: #e9ecef;
    --michelin-focus: rgba(255, 215, 0, 0.3);
}

/* Legacy styles for backward compatibility */
.home-logo {
    height: 80px;
    width: 50%;
    position: absolute;
    margin-left: 60px;
}

/* Modern Home Page Styles */
.home-container {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--michelin-white) 0%, #f8f9fa 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.home-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--michelin-secondary);
    z-index: 1;
}

.welcome-content {
    text-align: center;
    max-width: 1200px;
    width: 100%;
    z-index: 2;
    position: relative;
}

.vkor-logo-container {
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--michelin-white);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 51, 102, 0.1);
    border: 2px solid var(--michelin-secondary);
    transition: all 0.3s ease;
}

.vkor-logo-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 51, 102, 0.15);
}

.vkor-logo {
    max-width: 100%;
    height: auto;
    max-height: 120px;
    display: block;
    margin: 0 auto;
}

.welcome-text {
    font-family: 'Arial', 'Helvetica Neue', Helvetica, sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--michelin-primary);
    text-align: center;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 51, 102, 0.1);
    position: relative;
}

.welcome-text::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: var(--michelin-secondary);
    border-radius: 2px;
}

.subtitle {
    font-family: 'Arial', 'Helvetica Neue', Helvetica, sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 400;
    color: var(--michelin-gray);
    text-align: center;
    margin-top: 1.5rem;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .home-container {
        padding: 1rem;
    }
    
    .vkor-logo-container {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .welcome-text {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .welcome-text {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-content {
    animation: fadeInUp 0.8s ease-out;
}

.vkor-logo-container {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.welcome-text {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.subtitle {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

/* Dashboard Section Styles */
.dashboard-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 2rem auto;
    z-index: 2;
    position: relative;
}

.dashboard-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.dashboard-widget {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 51, 102, 0.10);
    min-width: 320px;
    max-width: 400px;
    flex: 1 1 320px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
    font-family: 'Arial', 'Helvetica Neue', Helvetica, sans-serif;
}

.widget-header {
    background: linear-gradient(135deg, #003366 0%, #004080 100%);
    color: #fff;
    padding: 18px 24px;
    font-size: 1.1em;
    font-weight: 600;
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-header h3 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-content {
    padding: 22px 24px 18px 24px;
    flex: 1;
}

.action-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 1.05em;
}

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

.action-count {
    background: #FFD100;
    color: #003366;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.1em;
    min-width: 36px;
    text-align: center;
}

.action-label {
    color: #003366;
    font-weight: 500;
    margin-left: 12px;
}

.no-actions {
    color: #666;
    font-style: italic;
    text-align: center;
    margin: 18px 0 0 0;
}

.quick-links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 8px;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    color: #003366;
    border-radius: 8px;
    padding: 10px 18px;
    font-weight: 600;
    font-size: 1em;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 51, 102, 0.06);
    transition: background 0.2s, box-shadow 0.2s, color 0.2s, transform 0.2s;
}

.quick-link:hover {
    background: linear-gradient(135deg, #FFD100 0%, #FFE55C 100%);
    color: #003366;
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.18);
    transform: translateY(-2px);
    text-decoration: none;
}

.quick-link i {
    font-size: 1.2em;
    color: #003366;
}

/* Recent Activity Widget Styles */
.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #FFD100;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #003366;
    flex-shrink: 0;
}

.activity-icon i {
    font-size: 0.9em;
}

.activity-details {
    flex: 1;
    min-width: 0;
}

.activity-function {
    font-weight: 600;
    color: #003366;
    font-size: 0.9em;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-time {
    color: #666;
    font-size: 0.8em;
}

.no-activity {
    color: #666;
    font-style: italic;
    text-align: center;
    margin: 18px 0 0 0;
}

/* Mini Stats Styles */
.mini-stats .stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}
.mini-stats .stat-item:last-child {
    border-bottom: none;
}
.stat-label {
    color: #666;
    font-size: 0.95em;
}
.stat-number {
    font-size: 1.3em;
    font-weight: bold;
    color: #003366;
}

/* Progress Bars Styles */
.progress-bars .progress-item {
    margin-bottom: 16px;
}
.progress-label {
    font-weight: 600;
    color: #003366;
    margin-bottom: 4px;
}
.progress-bar {
    background: #f0f0f0;
    border-radius: 10px;
    height: 10px;
    overflow: hidden;
    margin-bottom: 4px;
}
.progress-fill {
    background: linear-gradient(90deg, #FFD100 0%, #FFE55C 100%);
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
}
.progress-text {
    font-size: 0.8em;
    color: #666;
    text-align: right;
}

/* Welcome Message Widget Styles */
.welcome-message {
    /* Uses the same base styles as other dashboard widgets */
}

.welcome-greeting {
    margin-bottom: 16px;
}

.user-name {
    color: #003366;
    font-family: 'Arial', 'Helvetica Neue', Helvetica, sans-serif;
    font-size: 1.2em;
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.user-role {
    display: flex;
    align-items: center;
    margin-top: 8px;
}

.role-badge {
    padding: 4px 10px;
    border-radius: 16px;
    font-family: 'Arial', 'Helvetica Neue', Helvetica, sans-serif;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.role-badge.supplier {
    background: linear-gradient(135deg, #FFD100 0%, #FFE55C 100%);
    color: #003366;
}

.role-badge.cs {
    background: linear-gradient(135deg, #28a745 0%, #34ce57 100%);
}

.role-badge.admin {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
}

.role-badge.smpt {
    background: linear-gradient(135deg, #6f42c1 0%, #8e44ad 100%);
}

.role-badge.default {
    background: linear-gradient(135deg, #6c757d 0%, #868e96 100%);
}

.welcome-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
}

.detail-item i {
    color: #003366;
    font-size: 0.85em;
    width: 14px;
    text-align: center;
}

.detail-label {
    color: #666;
    font-family: 'Arial', 'Helvetica Neue', Helvetica, sans-serif;
    font-size: 0.85em;
    font-weight: 500;
    min-width: 70px;
}

.detail-value {
    color: #003366;
    font-family: 'Arial', 'Helvetica Neue', Helvetica, sans-serif;
    font-size: 0.85em;
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .user-name {
        font-size: 1.1em;
    }
    
    .welcome-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .detail-item {
        flex-wrap: wrap;
    }
}

@media (max-width: 900px) {
    .dashboard-grid {
        flex-direction: column;
        gap: 1.5rem;
        align-items: stretch;
    }
    .dashboard-widget {
        max-width: 100%;
        min-width: 0;
    }
}

#passwordDialog {
  display: flex; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 2000; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto; 
  background-color: rgba(0,0,0,0.4);
  justify-content: center;
  align-items: center;    
  min-height: 100vh;
}

#announcementDialog {
  display: flex; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 3000; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto; 
  background-color: rgba(0,0,0,0.4);
  justify-content: center;
  align-items: center;    
  min-height: 100vh;
}

