/* United Imagings Management System - Complete Stylesheet */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Login Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    max-width: 1000px;
    width: 100%;
    display: flex;
}

.login-left {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px;
    color: white;
}

.login-left h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.login-left p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 40px;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
}

.feature-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 20px;
}

.login-right {
    flex: 1;
    padding: 60px;
}

.login-right h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 15px;
    transition: border 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.credentials-box {
    margin-top: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.credentials-box h4 {
    color: #333;
    margin-bottom: 8px;
    font-size: 13px;
}

.credentials-box p {
    color: #666;
    font-size: 12px;
    margin: 4px 0;
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 260px;
    background: white;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    flex-shrink: 0;
    transition: transform 0.3s;
}

.sidebar.mobile-hidden {
    transform: translateX(-100%);
    position: fixed;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e1e8ed;
}

.sidebar-header h2 {
    color: #667eea;
    font-size: 18px;
    margin-bottom: 5px;
}

.sidebar-header p {
    color: #999;
    font-size: 12px;
}

.nav-section {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.nav-section-title {
    padding: 8px 20px;
    color: #999;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-item {
    padding: 12px 20px;
    color: #555;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    user-select: none;
}

.nav-item:hover {
    background: #f8f9fa;
    color: #667eea;
}

.nav-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f5f7fa;
    overflow: hidden;
}

.top-bar {
    background: white;
    padding: 15px 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    flex-shrink: 0;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-menu-btn {
    display: none;
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.top-bar h1 {
    font-size: 22px;
    color: #333;
    margin: 0;
}

.top-bar p {
    font-size: 13px;
    color: #999;
    margin: 5px 0 0;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.punch-btn {
    padding: 8px 16px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s;
}

.punch-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

.punch-btn.out {
    background: #ef4444;
}

.logout-btn {
    padding: 8px 16px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: #f8f9fa;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.user-menu:hover {
    background: #e5e7eb;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content-area {
    padding: 25px;
    flex: 1;
    overflow-y: auto;
}

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.kpi-card {
    background: white;
    padding: 22px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.kpi-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 15px;
}

.kpi-title {
    color: #999;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.kpi-value {
    font-size: 30px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.kpi-trend {
    font-size: 13px;
    color: #10b981;
    font-weight: 500;
}

/* Cards */
.card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Buttons */
.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin-top: 15px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

th {
    padding: 14px 12px;
    text-align: left;
    font-weight: 600;
    color: #555;
    font-size: 12px;
    text-transform: uppercase;
    background: #f8f9fa;
    border-bottom: 2px solid #e1e8ed;
}

td {
    padding: 14px 12px;
    border-bottom: 1px solid #e1e8ed;
    color: #666;
    font-size: 14px;
}

tbody tr {
    transition: background 0.2s;
}

tbody tr:hover {
    background: #f8f9fa;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Lifecycle Indicators */
.lifecycle-mini {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.lifecycle-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.lifecycle-dot.sales {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.lifecycle-dot.application {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.lifecycle-dot.validation {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.lifecycle-dot.operations {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.lifecycle-dot.current {
    animation: pulse-dot 2s infinite;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.8);
}

@keyframes pulse-dot {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 15px rgba(102, 126, 234, 0.6);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 0 25px rgba(102, 126, 234, 0.9);
    }
}

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
}

.alert-success {
    background: #d1fae5;
    border-left: 4px solid #10b981;
    color: #065f46;
}

.alert-warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

.alert-danger {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.alert-info {
    background: #dbeafe;
    border-left: 4px solid #3b82f6;
    color: #1e40af;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .login-box {
        flex-direction: column;
        max-width: 500px;
    }
    
    .login-left,
    .login-right {
        padding: 35px;
    }
    
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 1000;
    }
    
    .sidebar.mobile-hidden {
        transform: translateX(-100%);
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    
    .top-bar {
        padding: 12px 18px;
    }
    
    .top-bar h1 {
        font-size: 18px;
    }
    
    .content-area {
        padding: 18px;
    }
    
    .card {
        padding: 20px;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 10px 8px;
    }
}

@media (max-width: 480px) {
    .top-bar-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}