/* Zoho-Inspired Professional UI Design */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Zoho Color Palette */
    --zoho-blue: #2266E3;
    --zoho-blue-dark: #1A52B8;
    --zoho-blue-light: #4285F4;
    --zoho-green: #0B8043;
    --zoho-orange: #F6851B;
    --zoho-red: #D73814;
    
    /* Professional Neutrals */
    --bg-white: #FFFFFF;
    --bg-light: #F5F7FA;
    --bg-lighter: #FAFBFC;
    --border-color: #E4E7EB;
    --border-light: #F0F0F0;
    
    /* Text Colors */
    --text-dark: #1A1A1A;
    --text-medium: #4A4A4A;
    --text-light: #757575;
    --text-lighter: #9B9B9B;
    
    /* Sidebar */
    --sidebar-bg: #F8F9FA;
    --sidebar-border: #E4E7EB;
    --sidebar-hover: #EBEDF0;
    --sidebar-active: var(--zoho-blue);
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
    
    /* Spacing */
    --radius: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    font-size: 14px;
}

.hidden {
    display: none !important;
}

/* Page Management */
.page {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
}

.page.active {
    display: flex;
}

/* ============================================
   MODERN LOGIN PAGE - Split Layout
   ============================================ */

#loginPage {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    overflow: hidden;
    position: relative;
}

.login-wrapper {
    display: flex;
    width: 100%;
    height: 100vh;
    position: relative;
}

/* Left Panel - Form (40%) */
.login-form-panel {
    width: 40%;
    min-width: 400px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    z-index: 10;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.05);
    animation: slideInLeft 0.6s ease-out;
}

.login-form-container {
    width: 100%;
    max-width: 420px;
}

.login-brand {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease-out;
}

.logo-icon-animated {
    font-size: 48px;
    display: inline-block;
    animation: bounce 2s infinite;
    margin-bottom: 12px;
}

.brand-name {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    background: linear-gradient(135deg, #2266E3 0%, #4285F4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-section {
    margin-bottom: 32px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.welcome-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.welcome-subtitle {
    font-size: 15px;
    color: #757575;
    margin: 0;
}

.signup-link-top {
    text-align: center;
    margin-bottom: 24px;
    font-size: 14px;
    color: #757575;
    animation: fadeIn 0.8s ease-out 0.3s both;
}

.signup-link {
    color: #2266E3;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.signup-link:hover {
    color: #1A52B8;
    text-decoration: underline;
}

/* Apple Sign In Button */
.btn-apple {
    width: 100%;
    padding: 12px 20px;
    background: #000000;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.btn-apple:hover {
    background: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

/* Divider */
.divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
    animation: fadeIn 0.8s ease-out 0.5s both;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #e4e7eb;
}

.divider span {
    background: #ffffff;
    padding: 0 16px;
    color: #9b9b9b;
    font-size: 13px;
    position: relative;
}

/* Modern Form Groups */
.form-group-modern {
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.form-group-modern label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.form-group-modern input,
.form-group-modern select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e4e7eb;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #1a1a1a;
}

.form-group-modern input:focus,
.form-group-modern select:focus {
    outline: none;
    border-color: #2266E3;
    box-shadow: 0 0 0 3px rgba(34, 102, 227, 0.1);
    transform: translateY(-1px);
}

.form-group-modern input::placeholder {
    color: #9b9b9b;
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    color: #757575;
    font-size: 13px;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: #2266E3;
}

.eye-icon {
    font-size: 16px;
}

.eye-text {
    font-size: 12px;
}

/* Forgot Password */
.forgot-password {
    text-align: right;
    margin-bottom: 24px;
    animation: fadeIn 0.8s ease-out 0.7s both;
}

.forgot-password a {
    color: #2266E3;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-password a:hover {
    color: #1A52B8;
    text-decoration: underline;
}

/* Primary Login Button */
.btn-login-primary {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #2266E3 0%, #4285F4 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.btn-login-primary::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.5s;
}

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

.btn-login-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 102, 227, 0.3);
}

.btn-login-primary:active {
    transform: translateY(0);
}

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

.btn-arrow {
    transition: transform 0.3s ease;
}

.btn-login-primary:hover .btn-arrow {
    transform: translateX(4px);
}

/* Error Message */
.error-message-modern {
    margin-top: 16px;
    padding: 12px 16px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    color: #c33;
    font-size: 14px;
    animation: shake 0.5s ease;
}

/* Right Panel - Illustration (60%) */
.login-illustration-panel {
    width: 60%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: slideInRight 0.6s ease-out;
}

.warehouse-illustration {
    width: 100%;
    height: 100%;
    position: relative;
    perspective: 1000px;
}

.warehouse-scene {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: float 6s ease-in-out infinite;
}

/* Buildings */
.building {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    transform-style: preserve-3d;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.building-1 {
    width: 120px;
    height: 180px;
    bottom: 100px;
    left: 10%;
    transform: rotateY(-15deg) rotateX(5deg);
    animation: buildingFloat 8s ease-in-out infinite;
}

.building-2 {
    width: 100px;
    height: 150px;
    bottom: 100px;
    left: 30%;
    transform: rotateY(10deg) rotateX(5deg);
    animation: buildingFloat 7s ease-in-out infinite 0.5s;
}

.building-3 {
    width: 140px;
    height: 200px;
    bottom: 100px;
    right: 15%;
    transform: rotateY(-10deg) rotateX(5deg);
    animation: buildingFloat 9s ease-in-out infinite 1s;
}

/* Warehouse Interior */
.warehouse-interior {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) rotateY(-20deg) rotateX(10deg);
    width: 300px;
    height: 200px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    padding: 20px;
    animation: warehousePulse 4s ease-in-out infinite;
}

.shelf {
    position: absolute;
    background: rgba(34, 102, 227, 0.6);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.shelf-1 {
    width: 80px;
    height: 8px;
    bottom: 40px;
    left: 20px;
    animation: shelfMove 3s ease-in-out infinite;
}

.shelf-2 {
    width: 80px;
    height: 8px;
    bottom: 80px;
    left: 20px;
    animation: shelfMove 3s ease-in-out infinite 0.3s;
}

.shelf-3 {
    width: 80px;
    height: 8px;
    bottom: 120px;
    left: 20px;
    animation: shelfMove 3s ease-in-out infinite 0.6s;
}

.box {
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: boxFloat 2s ease-in-out infinite;
}

.box-1 {
    width: 30px;
    height: 30px;
    bottom: 50px;
    left: 30px;
    animation-delay: 0s;
}

.box-2 {
    width: 25px;
    height: 25px;
    bottom: 90px;
    left: 35px;
    animation-delay: 0.2s;
}

.box-3 {
    width: 28px;
    height: 28px;
    bottom: 130px;
    left: 32px;
    animation-delay: 0.4s;
}

.box-4 {
    width: 32px;
    height: 32px;
    bottom: 50px;
    right: 30px;
    animation-delay: 0.6s;
}

.agv {
    position: absolute;
    width: 40px;
    height: 25px;
    bottom: 30px;
    left: 50%;
    background: rgba(34, 102, 227, 0.9);
    border-radius: 4px;
    animation: agvMove 5s ease-in-out infinite;
}

.agv::before {
    content: '🤖';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
}

/* Trucks */
.truck {
    position: absolute;
    bottom: 80px;
    animation: truckMove 12s linear infinite;
}

.truck-1 {
    left: -100px;
    animation-delay: 0s;
}

.truck-2 {
    left: -100px;
    animation-delay: 6s;
}

.truck-cab {
    width: 40px;
    height: 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 4px 4px 0 0;
    position: relative;
}

.truck-body {
    width: 60px;
    height: 35px;
    background: rgba(34, 102, 227, 0.9);
    border-radius: 0 0 4px 4px;
    margin-top: -2px;
    position: relative;
}

.truck-body::after {
    content: '📦';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
}

/* Road */
.road {
    position: absolute;
    bottom: 80px;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-top: 2px dashed rgba(255, 255, 255, 0.4);
    animation: roadMove 2s linear infinite;
}

/* Pillars */
.pillar {
    position: absolute;
    width: 12px;
    height: 80px;
    background: rgba(34, 102, 227, 0.7);
    border-radius: 2px;
    bottom: 100px;
    animation: pillarPulse 3s ease-in-out infinite;
}

.pillar-1 {
    left: 20%;
    animation-delay: 0s;
}

.pillar-2 {
    left: 50%;
    animation-delay: 1s;
}

.pillar-3 {
    right: 20%;
    animation-delay: 2s;
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.float-item {
    position: absolute;
    font-size: 32px;
    animation: floatAround 10s ease-in-out infinite;
    opacity: 0.6;
}

.float-1 {
    top: 20%;
    left: 15%;
    animation-delay: 0s;
}

.float-2 {
    top: 60%;
    right: 20%;
    animation-delay: 2s;
}

.float-3 {
    top: 40%;
    right: 10%;
    animation-delay: 4s;
}

/* Animations */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

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

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

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

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotateY(0deg);
    }
    50% {
        transform: translateY(-20px) rotateY(5deg);
    }
}

@keyframes buildingFloat {
    0%, 100% {
        transform: translateY(0) rotateY(-15deg) rotateX(5deg);
    }
    50% {
        transform: translateY(-15px) rotateY(-12deg) rotateX(5deg);
    }
}

@keyframes warehousePulse {
    0%, 100% {
        transform: translateX(-50%) rotateY(-20deg) rotateX(10deg) scale(1);
        opacity: 0.9;
    }
    50% {
        transform: translateX(-50%) rotateY(-18deg) rotateX(10deg) scale(1.02);
        opacity: 1;
    }
}

@keyframes shelfMove {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(10px);
    }
}

@keyframes boxFloat {
    0%, 100% {
        transform: translateY(0) rotateZ(0deg);
    }
    50% {
        transform: translateY(-8px) rotateZ(5deg);
    }
}

@keyframes agvMove {
    0%, 100% {
        transform: translateX(-50%);
    }
    25% {
        transform: translateX(-30%);
    }
    75% {
        transform: translateX(-70%);
    }
}

@keyframes truckMove {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(100vw + 200px));
    }
}

@keyframes roadMove {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 40px 0;
    }
}

@keyframes pillarPulse {
    0%, 100% {
        opacity: 0.7;
        transform: scaleY(1);
    }
    50% {
        opacity: 1;
        transform: scaleY(1.1);
    }
}

@keyframes floatAround {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(30px, -30px) rotate(90deg);
    }
    50% {
        transform: translate(-20px, -50px) rotate(180deg);
    }
    75% {
        transform: translate(-40px, -20px) rotate(270deg);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .login-wrapper {
        flex-direction: column;
    }
    
    .login-form-panel {
        width: 100%;
        min-width: unset;
        height: auto;
        min-height: 100vh;
    }
    
    .login-illustration-panel {
        display: none;
    }
}

@media (max-width: 768px) {
    .login-form-panel {
        padding: 24px;
    }
    
    .login-form-container {
        max-width: 100%;
    }
    
    .welcome-title {
        font-size: 28px;
    }
    
    .brand-name {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .login-form-panel {
        padding: 20px;
    }
    
    .welcome-title {
        font-size: 24px;
    }
    
    .btn-apple,
    .btn-login-primary {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* ============================================
   MAIN APPLICATION - Zoho Style
   ============================================ */
#appPage {
    flex-direction: row;
    background: var(--bg-light);
}

/* ============================================
   MODERN SIDEBAR - Animated & Responsive
   ============================================ */

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: sticky;
    top: 0;
    height: 100vh;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    z-index: 100;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(135deg, #2266E3 0%, #4285F4 100%);
    position: relative;
    overflow: hidden;
}

.sidebar-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.sidebar-logo-icon {
    font-size: 28px;
    line-height: 1;
    animation: logoPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

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

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.3px;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-medium);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--zoho-blue);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.nav-item span {
    margin-right: 12px;
    font-size: 20px;
    width: 24px;
    text-align: center;
    transition: transform 0.3s ease;
}

.nav-item:hover {
    background: linear-gradient(90deg, rgba(34, 102, 227, 0.08) 0%, rgba(34, 102, 227, 0.04) 100%);
    color: var(--zoho-blue);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(34, 102, 227, 0.1);
}

.nav-item:hover::before {
    transform: scaleY(1);
}

.nav-item:hover span {
    transform: scale(1.1);
}

.nav-item.active {
    background: linear-gradient(135deg, #2266E3 0%, #4285F4 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(34, 102, 227, 0.3);
    transform: translateX(4px);
}

.nav-item.active::before {
    transform: scaleY(1);
    background: rgba(255, 255, 255, 0.3);
}

.nav-item.active span {
    color: white;
    transform: scale(1.1);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 20px 16px;
    border-top: 1px solid var(--border-light);
    background: #ffffff;
}

.user-info {
    margin-bottom: 16px;
    padding: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 10px;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.user-info:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.user-info span:first-child {
    display: block;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
}

.role-badge {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--zoho-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(34, 102, 227, 0.1);
}

/* ============================================
   MODERN MAIN CONTENT - Animated
   ============================================ */

.main-content {
    flex: 1;
    padding: 32px 40px;
    overflow-y: auto;
    max-width: calc(100vw - 260px);
    background: linear-gradient(180deg, #f5f7fa 0%, #ffffff 100%);
    min-height: 100vh;
    animation: fadeIn 0.5s ease-out;
}

.content-page {
    display: none;
    animation: pageSlideIn 0.4s ease-out;
}

.content-page.active {
    display: block;
    animation: pageSlideIn 0.4s ease-out;
}

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

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-light);
    animation: fadeInDown 0.6s ease-out;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #1a1a1a 0%, #4a4a4a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header p {
    animation: fadeIn 0.8s ease-out 0.2s both;
}

/* Modern KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.kpi-card {
    background: #ffffff;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    animation: cardSlideIn 0.6s ease-out both;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--zoho-blue), var(--zoho-blue-light));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.kpi-card:hover::before {
    transform: scaleX(1);
}

.kpi-card:nth-child(1) { animation-delay: 0.1s; }
.kpi-card:nth-child(2) { animation-delay: 0.2s; }
.kpi-card:nth-child(3) { animation-delay: 0.3s; }
.kpi-card:nth-child(4) { animation-delay: 0.4s; }
.kpi-card:nth-child(5) { animation-delay: 0.5s; }
.kpi-card:nth-child(6) { animation-delay: 0.6s; }

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

.kpi-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--zoho-blue);
    transform: translateY(-4px) scale(1.02);
}

.kpi-card.warning {
    border-left: 4px solid #f59e0b;
}

.kpi-card.warning::before {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.kpi-card.danger {
    border-left: 4px solid #ef4444;
}

.kpi-card.danger::before {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.kpi-card.info {
    border-left: 4px solid var(--zoho-blue);
}

.kpi-icon {
    font-size: 40px;
    margin-right: 20px;
    opacity: 0.8;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.kpi-card:hover .kpi-icon {
    transform: scale(1.1) rotate(5deg);
    opacity: 1;
}

.kpi-content {
    flex: 1;
}

.kpi-content h3 {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.kpi-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
    transition: all 0.3s ease;
}

.kpi-card:hover .kpi-value {
    color: var(--zoho-blue);
    transform: scale(1.05);
}

/* Modern Dashboard Sections */
.dashboard-section {
    margin-top: 40px;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.dashboard-section h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    letter-spacing: -0.3px;
}

/* Modern Cards */
.modern-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out both;
}

.modern-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Enhanced Table Styles */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    animation: fadeIn 0.6s ease-out;
}

.data-table thead {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.data-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e4e7eb;
    white-space: nowrap;
}

.data-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    color: #4a4a4a;
    font-size: 14px;
    transition: background 0.2s ease;
}

.data-table tbody tr {
    transition: all 0.2s ease;
}

.data-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(34, 102, 227, 0.04) 0%, transparent 100%);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr td strong {
    color: #1a1a1a;
    font-weight: 600;
}

/* Status Badge Updates */
.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.status-badge.draft {
    background: #f3f4f6;
    color: #4b5563;
}

.status-badge.ready {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.completed {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.waiting {
    background: #f3f4f6;
    color: #4b5563;
}

/* Modern Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #2266E3 0%, #4285F4 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(34, 102, 227, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 102, 227, 0.4);
}

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

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-xs {
    padding: 6px 12px;
    font-size: 12px;
}

/* Table Container */
.table-container {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow-x: auto;
    animation: fadeInUp 0.6s ease-out;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
    font-size: 14px;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid var(--border-color);
    border-top-color: var(--zoho-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    
    .main-content {
        padding: 24px 28px;
        max-width: calc(100vw - 240px);
    }
    
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -260px;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    
    .sidebar.mobile-open {
        left: 0;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2);
    }
    
    .main-content {
        padding: 20px 16px;
        max-width: 100vw;
    }
    
    .kpi-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
    
    .data-table {
        font-size: 13px;
    }
    
    .data-table th,
    .data-table td {
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 16px 12px;
    }
    
    .kpi-card {
        padding: 20px;
    }
    
    .kpi-icon {
        font-size: 32px;
        margin-right: 16px;
    }
    
    .kpi-value {
        font-size: 24px;
    }
    
    .modern-card {
        padding: 16px;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: var(--zoho-blue);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
}

/* Overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Quick Action Buttons */
.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-lighter);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    transition: all 0.2s ease;
    text-align: left;
}

.quick-action-btn:hover {
    background: var(--zoho-blue);
    color: white;
    border-color: var(--zoho-blue);
    transform: translateX(4px);
}

.quick-action-btn span {
    font-size: 16px;
}

/* Chart Styles */
.chart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.chart-label {
    font-size: 13px;
    color: var(--text-medium);
    font-weight: 500;
}

.chart-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.chart-bar {
    height: 8px;
    background: var(--bg-lighter);
    border-radius: 4px;
    margin-top: 6px;
    overflow: hidden;
}

.chart-bar-fill {
    height: 100%;
    background: var(--zoho-blue);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Smooth Transitions */
* {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Add these styles to your existing styles.css */

.data-table tr.urgent {
    background-color: #fef2f2;
    border-left: 4px solid #ef4444;
}

.data-table tr.warning {
    background-color: #fffbeb;
    border-left: 4px solid #f59e0b;
}

.data-table tr.info {
    background-color: #eff6ff;
    border-left: 4px solid #3b82f6;
}

.data-table tr.urgent:hover,
.data-table tr.warning:hover,
.data-table tr.info:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 40px auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.close-modal {
    font-size: 28px;
    font-weight: bold;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover {
    color: var(--text-dark);
}

.modal-body {
    padding: 24px;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--zoho-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.receipt-item-product,
.receipt-item-qty,
.receipt-item-price,
.receipt-item-location {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

/* Add these animations to your existing styles.css */

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

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

/* Offline status styles */
#offlineStatus {
    animation: pulse 2s infinite;
}

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

/* Modern Search Bar */
.search-bar-modern {
    background: #ffffff;
    padding: 20px 24px;
    border-radius: 16px;
    margin-bottom: 24px;
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    animation: fadeInDown 0.6s ease-out;
}

.search-bar-modern input,
.search-bar-modern select {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.search-bar-modern input:focus,
.search-bar-modern select:focus {
    outline: none;
    border-color: var(--zoho-blue);
    box-shadow: 0 0 0 3px rgba(34, 102, 227, 0.1);
    transform: translateY(-1px);
}

