        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        :root {
            --primary-color: #667eea;
            --secondary-color: #764ba2;
            --success-color: #38a169;
            --warning-color: #d69e2e;
            --danger-color: #e53e3e;
            --info-color: #3182ce;
            --light-color: #f5f7fa;
            --dark-color: #2d3748;
            --gray-color: #718096;
        }

        body {
            background: linear-gradient(135deg, var(--light-color) 0%, #c3cfe2 100%);
            min-height: 100vh;
            overflow-x: hidden;
        }

        @media (max-width: 768px) {
            .form-row {
                flex-direction: column;
                gap: 15px !important;
            }
            
            .dashboard-cards {
                grid-template-columns: 1fr !important;
            }
            
            .pos-container {
                flex-direction: column;
            }
            
            .table-container {
                overflow-x: auto;
            }
            
            table {
                min-width: 600px;
            }
            
            .modal-content {
                width: 95% !important;
                max-height: 90vh !important;
                margin: 10px;
            }
            
            .header {
                padding: 15px 20px !important;
            }
            
            .content {
                padding: 20px 15px !important;
            }
            
            .login-box {
                padding: 30px 20px !important;
                margin: 15px !important;
            }
            
            .pos-items {
                grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
            }
            
            .medicine-item {
                padding: 12px !important;
            }
            
            .card {
                padding: 20px !important;
            }
            
            .settings-card {
                padding: 20px !important;
            }
            
            .btn {
                padding: 14px 20px !important;
            }
            
            /* Header buttons for mobile */
            .header-controls {
                display: flex;
                gap: 5px;
                flex-wrap: wrap;
            }
            
            .header-controls .btn {
                padding: 6px 10px !important;
                font-size: 12px !important;
                min-width: 60px;
            }
            
            .user-info {
                flex-direction: column;
                align-items: flex-end;
                gap: 10px !important;
            }
        }

        @media (max-width: 480px) {
            .user-info {
                gap: 10px !important;
            }
            
            .btn {
                font-size: 14px !important;
                padding: 12px 16px !important;
            }
            
            .dashboard-cards {
                gap: 15px !important;
            }
            
            .logo span {
                font-size: 18px !important;
            }
            
            h2 {
                font-size: 20px !important;
            }
            
            h3 {
                font-size: 16px !important;
            }
            
            .header-controls {
                flex-direction: column;
                width: 100%;
            }
        }

        /* Header controls styling */
        .header-controls {
            display: flex;
            gap: 10px;
            margin-right: 15px;
            align-items: center;
        }

        .header-controls .btn {
            padding: 8px 12px;
            font-size: 14px;
            min-width: 80px;
            white-space: nowrap;
        }

        .header-controls .btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            background: var(--gray-color) !important;
        }

        .login-container {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
        }

        .login-box {
            background: white;
            padding: 40px;
            border-radius: 20px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            width: 100%;
            max-width: 400px;
            margin: 20px;
        }

        .login-box h1 {
            color: var(--dark-color);
            margin-bottom: 30px;
            display: flex;
            align-items: center;
            gap: 10px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .login-box h1 svg {
            width: 40px;
            height: 40px;
            fill: var(--primary-color);
        }

        .input-group {
            margin-bottom: 20px;
        }

        .input-group label {
            display: block;
            margin-bottom: 5px;
            color: var(--gray-color);
            font-weight: 500;
        }

        .input-group input {
            width: 100%;
            padding: 12px;
            border: 2px solid #e2e8f0;
            border-radius: 10px;
            font-size: 16px;
            transition: border-color 0.3s;
        }

        .input-group input:focus {
            border-color: var(--primary-color);
            outline: none;
        }

        .btn {
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 10px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
            width: 100%;
        }

        .btn:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
        }

        .app-container {
            display: none;
            height: 100vh;
        }

        .header {
            background: white;
            padding: 15px 30px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 1000;
            height: 70px;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 24px;
            font-weight: bold;
            color: var(--dark-color);
        }

        .logo-img {
            width: 40px;
            height: 40px;
            object-fit: contain;
            display: none;
        }

        .logo-img.active {
            display: block;
        }

        .menu-toggle {
            display: none;
            background: none;
            border: none;
            cursor: pointer;
            color: var(--dark-color);
            width: 32px;
            height: 32px;
            padding: 4px;
        }

        @media (max-width: 768px) {
            .menu-toggle {
                display: flex;
                align-items: center;
                justify-content: center;
            }
            
            .logo span {
                display: block;
                font-size: 18px;
            }
        }

        .user-info {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .notification-bell {
            position: relative;
            cursor: pointer;
            padding: 8px;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .notification-bell svg {
            width: 24px;
            height: 24px;
            fill: var(--dark-color);
        }

        .notification-badge {
            position: absolute;
            top: 2px;
            right: 2px;
            background: var(--danger-color);
            color: white;
            border-radius: 50%;
            width: 20px;
            height: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: bold;
        }

        .main-content {
            display: flex;
            height: calc(100vh - 70px);
            margin-top: 70px;
        }

        #contentArea {
                margin-top:70px;
            }

        .sidebar {
            width: 250px;
            background: var(--dark-color);
            color: white;
            padding: 20px 0;
            transition: transform 0.3s ease;
            position: fixed;
            left: 0;
            top: 70px;
            bottom: 0;
            z-index: 999;
            overflow-y: auto;
        }

        @media (max-width: 768px) {
            .sidebar {
                transform: translateX(-100%);
                width: 280px;
            }
            
            .sidebar.active {
                transform: translateX(0);
            }
            
            .sidebar-overlay {
                display: none;
                position: fixed;
                top: 70px;
                left: 0;
                right: 0;
                bottom: 0;
                background: rgba(0,0,0,0.5);
                z-index: 998;
            }
            
            .sidebar-overlay.active {
                display: block;
            }
        }

        .nav-item {
            padding: 15px 30px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 12px;
            transition: background 0.3s;
            border-left: 4px solid transparent;
        }

        .nav-item:hover {
            background: #4a5568;
        }

        .nav-item.active {
            background: var(--primary-color);
            border-left-color: var(--secondary-color);
        }

        .nav-icon {
            width: 20px;
            height: 20px;
            fill: currentColor;
        }

        .content {
            flex: 1;
            padding: 30px;
            overflow-y: auto;
            margin-left: 250px;
            transition: margin-left 0.3s ease;
        }

        @media (max-width: 768px) {
            .content {
                margin-left: 0;
            }
        }

        .dashboard-cards {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .card {
            background: white;
            border-radius: 15px;
            padding: 25px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
            transition: transform 0.3s;
        }

        .card:hover {
            transform: translateY(-5px);
        }

        .card h3 {
            color: var(--gray-color);
            margin-bottom: 10px;
            font-size: 14px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .card .value {
            font-size: 32px;
            font-weight: bold;
            color: var(--dark-color);
            margin-bottom: 10px;
        }

        .card.income { border-top: 4px solid var(--success-color); }
        .card.expenses { border-top: 4px solid var(--danger-color); }
        .card.profit { border-top: 4px solid var(--info-color); }
        .card.sales { border-top: 4px solid var(--warning-color); }

        .table-container {
            background: white;
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
            margin-top: 20px;
        }

        table {
            width: 100%;
            border-collapse: collapse;
        }

        th, td {
            padding: 15px;
            text-align: left;
            border-bottom: 1px solid #e2e8f0;
        }

        th {
            background: #f7fafc;
            font-weight: 600;
            color: var(--gray-color);
            position: relative;
        }

        th.filter-header {
            cursor: pointer;
        }

        th.filter-header:hover {
            background: #e2e8f0;
        }

        .filter-input {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: white;
            padding: 10px;
            border: 1px solid #e2e8f0;
            display: none;
            z-index: 10;
        }

        th.filter-header:hover .filter-input {
            display: block;
        }

        tr:hover {
            background: #f7fafc;
        }

        .avatar-small {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid #e2e8f0;
        }

        .medicine-image {
            width: 50px;
            height: 50px;
            object-fit: cover;
            border-radius: 8px;
            border: 2px solid #e2e8f0;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-row {
            display: flex;
            gap: 20px;
            margin-bottom: 20px;
        }

        @media (max-width: 768px) {
            .form-row {
                flex-direction: column;
                gap: 15px;
            }
        }

        .form-row .form-group {
            flex: 1;
        }

        .form-label {
            display: block;
            margin-bottom: 8px;
            color: var(--gray-color);
            font-weight: 500;
        }

        .form-control {
            width: 100%;
            padding: 12px;
            border: 2px solid #e2e8f0;
            border-radius: 10px;
            font-size: 16px;
        }

        .form-control:focus {
            border-color: var(--primary-color);
            outline: none;
        }

        .file-upload {
            position: relative;
            display: inline-block;
            cursor: pointer;
        }

        .file-upload input[type="file"] {
            display: none;
        }

        .file-upload-label {
            display: inline-block;
            padding: 10px 20px;
            background: #e2e8f0;
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.3s;
        }

        .file-upload-label:hover {
            background: #cbd5e0;
        }

        .pos-container {
            display: flex;
            gap: 30px;
            height: 100%;
        }

        @media (max-width: 768px) {
            .pos-container {
                flex-direction: column;
            }
        }

        .pos-items {
            flex: 2;
            display: flex;
            flex-direction: column;
            max-height: calc(100vh - 200px);
        }

        .pos-search {
            margin-bottom: 20px;
            position: sticky;
            top: 0;
            background: white;
            padding: 10px 0;
            z-index: 100;
        }

        .pos-search input {
            width: 100%;
            padding: 12px;
            border: 2px solid #e2e8f0;
            border-radius: 10px;
            font-size: 16px;
        }

        .medicine-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 15px;
            overflow-y: auto;
            padding: 10px;
            flex: 1;
        }

        .pos-cart {
            flex: 1;
            background: white;
            border-radius: 15px;
            padding: 25px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
            display: flex;
            flex-direction: column;
            max-height: calc(100vh - 200px);
        }

        @media (max-width: 768px) {
            .pos-cart {
                order: -1;
                margin-bottom: 20px;
                max-height: 400px;
            }
            
            .medicine-grid {
                grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            }
        }

        .cart-actions {
            margin-top: auto;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .medicine-item {
            background: white;
            border-radius: 10px;
            padding: 15px;
            cursor: pointer;
            transition: all 0.3s;
            border: 2px solid transparent;
            display: flex;
            flex-direction: column;
            gap: 8px;
            height: 100%;
        }

        .medicine-item:hover {
            border-color: var(--primary-color);
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        }

        .medicine-item.selected {
            border-color: var(--success-color);
            background: #f0fff4;
        }

        .medicine-name {
            font-weight: bold;
            color: var(--dark-color);
            margin-bottom: 5px;
            font-size: 16px;
        }

        .medicine-price {
            color: var(--success-color);
            font-weight: 600;
            font-size: 18px;
        }

        .medicine-stock {
            color: var(--gray-color);
            font-size: 14px;
        }

        .receipt {
            background: white;
            padding: 30px;
            max-width: 400px;
            margin: 0 auto;
            font-family: 'Courier New', monospace;
        }

        .receipt-header {
            text-align: center;
            margin-bottom: 20px;
        }

        .receipt-logo {
            max-width: 120px;
            max-height: 60px;
            margin: 0 auto 10px;
            display: none;
        }

        .receipt-logo.active {
            display: block;
        }

        .receipt-header h2 {
            font-size: 24px;
            font-weight: bold;
        }

        .receipt-items {
            margin: 20px 0;
        }

        .receipt-item {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
            padding-bottom: 10px;
            border-bottom: 1px dashed #ccc;
        }

        .receipt-total {
            display: flex;
            justify-content: space-between;
            font-weight: bold;
            font-size: 18px;
            padding-top: 10px;
            border-top: 2px solid #000;
            margin-top: 20px;
        }

        .toast {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: var(--success-color);
            color: white;
            padding: 15px 25px;
            border-radius: 10px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.2);
            display: none;
            z-index: 1000;
            max-width: 300px;
            word-wrap: break-word;
        }

        @media (max-width: 768px) {
            .toast {
                left: 20px;
                right: 20px;
                max-width: none;
            }
        }

        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            z-index: 1001;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }

        .modal-content {
            background: white;
            border-radius: 15px;
            padding: 30px;
            max-width: 500px;
            width: 100%;
            max-height: 80vh;
            overflow-y: auto;
        }

        .badge {
            display: inline-block;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: 600;
        }

        .badge-success {
            background: #c6f6d5;
            color: #22543d;
        }

        .badge-warning {
            background: #feebc8;
            color: #744210;
        }

        .badge-danger {
            background: #fed7d7;
            color: #742a2a;
        }

        .badge-info {
            background: #bee3f8;
            color: #2a4365;
        }

        .action-buttons {
            display: flex;
            gap: 5px;
            flex-wrap: wrap;
        }

        .btn-small {
            padding: 5px 10px;
            font-size: 12px;
            border-radius: 6px;
            border: none;
            cursor: pointer;
            transition: opacity 0.3s;
        }

        .btn-small:hover {
            opacity: 0.9;
        }

        .btn-edit {
            background: var(--info-color);
            color: white;
        }

        .btn-delete {
            background: var(--danger-color);
            color: white;
        }

        .bulk-import-section {
            background: white;
            border-radius: 15px;
            padding: 25px;
            margin-bottom: 30px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        }

        .import-preview {
            max-height: 200px;
            overflow-y: auto;
            margin: 20px 0;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            padding: 10px;
        }

        .import-preview table {
            font-size: 12px;
        }

        .confirmation-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            z-index: 1002;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }

        .confirmation-content {
            background: white;
            border-radius: 15px;
            padding: 30px;
            max-width: 400px;
            width: 100%;
            text-align: center;
        }

        .confirmation-buttons {
            display: flex;
            gap: 10px;
            margin-top: 20px;
        }

        .btn-confirm {
            flex: 1;
            background: var(--success-color);
            color: white;
            border: none;
            padding: 12px;
            border-radius: 8px;
            cursor: pointer;
            font-weight: bold;
        }

        .btn-cancel {
            flex: 1;
            background: var(--gray-color);
            color: white;
            border: none;
            padding: 12px;
            border-radius: 8px;
            cursor: pointer;
        }

        .settings-card {
            background: white;
            border-radius: 15px;
            padding: 25px;
            margin-bottom: 20px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        }

        .settings-card h3 {
            margin-bottom: 20px;
            color: var(--dark-color);
            border-bottom: 2px solid #e2e8f0;
            padding-bottom: 10px;
        }

        .color-picker {
            display: flex;
            gap: 15px;
            align-items: center;
            margin-bottom: 15px;
            flex-wrap: wrap;
        }

        .color-picker label {
            min-width: 120px;
            color: var(--gray-color);
            font-weight: 500;
        }

        .color-picker input[type="color"] {
            width: 50px;
            height: 50px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            padding: 0;
        }

        .data-management {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 15px;
            margin-top: 20px;
        }

        .data-management .btn {
            text-align: left;
            display: flex;
            align-items: center;
            gap: 10px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .header-buttons {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            justify-content: flex-end;
        }

        .page-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
            flex-wrap: wrap;
            gap: 15px;
        }

        .page-header h2 {
            flex: 1;
            min-width: 200px;
        }

        .logo-upload-section {
            border: 2px dashed #e2e8f0;
            border-radius: 10px;
            padding: 20px;
            text-align: center;
            margin-bottom: 20px;
            cursor: pointer;
            transition: border-color 0.3s;
        }

        .logo-upload-section:hover {
            border-color: var(--primary-color);
        }

        .logo-preview {
            max-width: 200px;
            max-height: 100px;
            margin: 0 auto 15px;
            display: none;
        }

        .logo-preview.active {
            display: block;
        }

        .page-content {
            margin-top: 20px;
        }
        
        .image-remove-btn {
            margin-top: 10px;
            padding: 8px 16px;
            background: var(--danger-color);
            color: white;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            display: inline-block;
        }
        
        .image-remove-btn:hover {
            opacity: 0.9;
        }
        
        .modal-backdrop {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            z-index: 1000;
            display: none;
        }
        
        .modal-backdrop.active {
            display: block;
        }
        
        /* Mobile Restriction Overlay */
#mobile-restriction-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: white;
    z-index: 999999; /* Ensures it stays on top of everything */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 30px;
}

#mobile-restriction-overlay svg {
    width: 80px;
    height: 80px;
    fill: #f6ad55;
    margin-bottom: 20px;
}

#mobile-restriction-overlay h2 {
    font-size: 24px;
    margin-bottom: 15px;
}

#mobile-restriction-overlay p {
    font-size: 16px;
    line-height: 1.6;
    color: #cbd5e0;
    max-width: 400px;
}

#mobile-restriction-overlay .tip {
    margin-top: 25px;
    font-weight: bold;
    color: #63b3ed;
    background: rgba(99, 179, 237, 0.1);
    padding: 10px 20px;
    border-radius: 8px;
}