@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:wght@700&display=swap');

:root {
    /* Premium Color Palette */
    --primary: #FF8C00;
    /* Dark Orange */
    --primary-gradient: linear-gradient(135deg, #FF8C00 0%, #FF2D55 100%);
    --secondary: #1A1A2E;
    --accent: #FFD700;
    --success: #00D1B2;
    --danger: #FF3860;
    --warning: #FFDD57;
    --info: #209CEE;

    /* Light Mode */
    --bg-color: #F8F9FA;
    --surface-color: #FFFFFF;
    --sidebar-bg: #1A1A2E;
    --sidebar-hover: rgba(255, 255, 255, 0.1);
    --text-color: #2D3436;
    --text-muted: #636E72;
    --border-color: #E9ECEF;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] {
    --bg-color: #0F0F1A;
    --surface-color: #1A1A2E;
    --sidebar-bg: #16213E;
    --sidebar-hover: rgba(0, 0, 0, 0.2);
    --text-color: #E4E6EB;
    --text-muted: #B0B3B8;
    --border-color: #2D3436;
    --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    --glass-bg: rgba(26, 26, 46, 0.8);
    --glass-border: rgba(255, 255, 255, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

h1,
h2,
h3,
.logo-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* Glassmorphism Effect */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

.dev-header {
    background: var(--primary-gradient);
    color: white;
    text-align: center;
    padding: 8px 15px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    position: relative;
}

.dev-header i {
    margin-right: 5px;
    margin-left: 15px;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    height: 100vh;
    background: var(--sidebar-bg);
    color: #fff;
    position: fixed;
    left: 0;
    top: 0;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 40px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-container {
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(255, 140, 0, 0.4);
}

.logo-text {
    font-size: 1.25rem;
    letter-spacing: 1px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 0 15px;
}

.sidebar-menu::-webkit-scrollbar {
    width: 4px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.menu-item {
    list-style: none;
    margin-bottom: 5px;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    gap: 15px;
    font-weight: 500;
}

.menu-link i {
    font-size: 1.2rem;
    width: 25px;
    text-align: center;
}

.menu-link:hover,
.menu-link.active {
    background: var(--primary-gradient);
    color: #fff;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(255, 45, 85, 0.3);
}

.menu-link.active i {
    color: #fff;
}

/* Main Content area */
.main-content {
    margin-left: 280px;
    padding: 40px;
    min-height: 100vh;
    transition: margin-left 0.4s ease;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.6s ease;
}

.header-title h1 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.header-title p {
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

/* Cards & Containers */
.card {
    background: var(--surface-color);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

/* Dashboard Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
}

.stat-info h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 5px;
}

.stat-info .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Helper Utilities */
.flex {
    display: flex;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-5 {
    gap: 5px;
}

.gap-10 {
    gap: 10px;
}

.gap-20 {
    gap: 20px;
}

.gap-30 {
    gap: 30px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-danger {
    color: var(--danger) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.border {
    border: 1px solid var(--border-color);
}

.border-top {
    border-top: 1px solid var(--border-color);
}

.rounded-12 {
    border-radius: 12px;
}

.w-full {
    width: 100%;
}

.p-20 {
    padding: 20px;
}

.p-40 {
    padding: 40px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.mb-40 {
    margin-bottom: 40px;
}

.mt-10 {
    margin-top: 10px;
}

.font-bold {
    font-weight: 700;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 5px 15px rgba(255, 45, 85, 0.3);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 45, 85, 0.4);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 8px;
}

.btn-block {
    width: 100%;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary-gradient);
    color: #fff;
    border-color: transparent;
}

/* POS UI Improvements */
.pos-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 30px;
    align-items: start;
}

.product-search-bar {
    position: relative;
    margin-bottom: 30px;
}

.product-search-bar i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    z-index: 10 !important;
    pointer-events: none;
    font-size: 1.1rem;
    /* Slightly larger for better visibility */
    left: 18px !important;
    /* Slightly adjust left to center in the padding area */
}

.search-input {
    width: 100%;
    padding: 18px 20px 18px 50px !important;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    font-size: 1rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 140, 0, 0.1);
}

.product-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.item-card {
    background: var(--surface-color);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border-color);
}

.item-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.item-image {
    height: 140px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.item-price-tag {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: var(--primary-gradient);
    color: #fff;
    padding: 4px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.item-details {
    padding: 15px;
}

.item-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-stock {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Cart Panel Styling */
.cart-card {
    position: sticky;
    top: 30px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 80px);
}

.cart-header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 10px;
}

.cart-item {
    display: grid;
    grid-template-columns: 50px 1fr auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
    padding: 10px;
    background: var(--bg-color);
    border-radius: 12px;
    animation: slideInRight 0.4s ease;
    border: 1px solid var(--border-color);
}

.cart-item-img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
}

.cart-total-section {
    border-top: 2px dashed var(--border-color);
    padding-top: 20px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.grand-total {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 800;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Standardized Table Premium */
.table-container {
    overflow-x: auto;
    border-radius: 18px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    background: var(--bg-color);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    padding: 15px 20px;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
}

td {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

tr:hover td {
    background: rgba(255, 140, 0, 0.02);
}

tr:last-child td {
    border-bottom: none;
}

/* Form Styles refined */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
}

.form-control,
select,
textarea,
input[type="text"],
input[type="number"],
input[type="date"],
input[type="password"] {
    width: 100%;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus,
select:focus,
textarea:focus,
input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 140, 0, 0.08);
    background: var(--surface-color);
}

/* Badge variants */
.badge {
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg-color);
    color: var(--text-muted);
    display: inline-block;
}

.badge-primary {
    background: rgba(255, 140, 0, 0.1);
    color: var(--primary);
}

.badge-success {
    background: rgba(0, 209, 178, 0.1);
    color: var(--success);
}

.badge-danger {
    background: rgba(255, 56, 96, 0.1);
    color: var(--danger);
}

.badge-info {
    background: rgba(32, 156, 238, 0.1);
    color: var(--info);
}

.modal-content {
    background: var(--surface-color);
    border-radius: 30px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    padding: 40px;
    border: none;
    animation: modalSlide 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes modalSlide {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(100px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Custom Checkbox/Switch */
.theme-switch {
    width: 60px;
    height: 30px;
    background: #e2e8f0;
    border-radius: 30px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
}

.theme-switch.active {
    background: var(--primary);
}

.theme-switch.active .switch-ball {
    transform: translateX(30px);
}

[data-theme="dark"] .theme-switch {
    background: #2D3436;
}

[data-theme="dark"] .theme-switch.active {
    background: var(--primary);
}

.switch-ball {
    position: absolute;
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

/* Toast Notification Premium */
.toast {
    border-radius: 16px;
    padding: 16px 24px;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--surface-color);
    color: var(--text-color);
}

.toast-success {
    border-left: 6px solid var(--success);
}

.toast-danger {
    border-left: 6px solid var(--danger);
}

.toast-warning {
    border-left: 6px solid var(--warning);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Login Page Revamp */
.login-body {
    background: var(--sidebar-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-wrapper {
    width: 100%;
    max-width: 1000px;
    height: 600px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--surface-color);
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.login-side-image {
    background: linear-gradient(rgba(26, 26, 46, 0.6), rgba(26, 26, 46, 0.6)), url('https://images.unsplash.com/photo-1555507036-ab1f4038808a?ixlib=rb-1.2.1&auto=format&fit=crop&w=1000&q=80');
    background-size: cover;
    background-position: center;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #fff;
}

.login-form-container {
    padding: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.login-header p {
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* Secondary Print Utilities */
@media print {

    .sidebar,
    .header-actions,
    .product-search-bar,
    .btn,
    .theme-switch,
    .cart-card {
        display: none !important;
    }

    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* Mobile Responsive */
@media (max-width: 1100px) {
    .pos-layout {
        grid-template-columns: 1fr;
    }

    .main-content {
        margin-left: 80px;
    }

    .sidebar {
        width: 80px;
    }

    .sidebar .logo-text,
    .sidebar span {
        display: none;
    }

    .sidebar-header {
        padding: 30px 15px;
    }
}

@media (max-width: 768px) {
    .login-wrapper {
        grid-template-columns: 1fr;
        height: auto;
    }

    .login-side-image {
        display: none;
    }

    .login-form-container {
        padding: 40px 30px;
    }
}

/* Modal Styles - ADD THIS TO THE END OF style.css */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--surface-color);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
}

/* Status Select for Orders */
.status-select {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.85rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 10px;
}


.status-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(255, 45, 85, 0.1);
}

@keyframes swing {
    0% {
        transform: rotate(0deg);
    }

    20% {
        transform: rotate(15deg);
    }

    40% {
        transform: rotate(-10deg);
    }

    60% {
        transform: rotate(5deg);
    }

    80% {
        transform: rotate(-5deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.animate-swing {
    animation: swing 1s ease-in-out infinite;
}