/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --border-color: #ddd;
    --text-color: #333;
    --text-light: #777;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --sidebar-width: 250px;
    --sidebar-width-mobile: 70px;
    --topbar-height: 60px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Login Page Styles */
.login-page {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo img {
    max-width: 200px;
    height: auto;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 600;
    color: var(--text-light);
}

.form-group input {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #5a6cd6;
}

.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: 600;
}

.alert-error {
    background: #ffdddd;
    border: 1px solid #ff9999;
    color: #cc0000;
}

.alert-success {
    background: #ddffdd;
    border: 1px solid #99ff99;
    color: #006600;
}

/* Main Layout Styles */
.sidebar {
    width: var(--sidebar-width);
    background: var(--dark-color);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    padding: 20px 0;
    z-index: 100;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    transition: width 0.3s ease;
}

.sidebar .logo {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid #34495e;
}

.sidebar .logo img {
    max-width: 180px;
    height: auto;
    transition: max-width 0.3s ease;
}

.sidebar nav ul {
    list-style: none;
    padding: 20px 0;
}

.sidebar nav li {
    padding: 10px 20px;
    border-bottom: 1px solid #34495e;
}

.sidebar nav li a {
    color: var(--light-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    transition: color 0.3s;
    white-space: nowrap;
}

.sidebar nav li a:hover {
    color: var(--info-color);
}

.sidebar nav li a i {
    font-size: 20px;
    min-width: 20px;
    text-align: center;
}

.topbar {
    height: var(--topbar-height);
    background: #34495e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    z-index: 99;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.topbar-logo {
    height: 40px;
    width: auto;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.user-menu:hover {
    background: rgba(255, 255, 255, 0.2);
}

.user-photo {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.username {
    color: white;
    font-weight: 600;
}

.main-content {
    margin-left: var(--sidebar-width);
    padding: calc(var(--topbar-height) + 20px) 20px 20px 20px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.page-container {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
    flex-wrap: wrap;
    gap: 15px;
}

.page-header h1 {
    font-size: 24px;
    color: var(--dark-color);
    flex: 1;
    min-width: 200px;
}

.tip {
    background: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    padding: 10px 15px;
    margin: 10px 0;
    font-size: 14px;
    color: var(--text-light);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text-light);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.required {
    color: var(--danger-color);
}

/* Button Styles - All variants */
.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #7f8c8d;
}

.btn-edit {
    background: var(--info-color);
    color: white;
}

.btn-edit:hover:not(:disabled) {
    background: #2980b9;
}

.btn-delete {
    background: var(--danger-color);
    color: white;
}

.btn-delete:hover:not(:disabled) {
    background: #c0392b;
}

.btn-view {
    background: var(--success-color);
    color: white;
}

.btn-view:hover:not(:disabled) {
    background: #27ae60;
}

.btn-print {
    background: var(--warning-color);
    color: white;
}

.btn-print:hover:not(:disabled) {
    background: #e67e22;
}

.btn-dashboard {
    background: var(--info-color);
    color: white;
}

.btn-dashboard:hover:not(:disabled) {
    background: #2980b9;
}

/* POS Action Buttons - Special styling */
.pos-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

/* Table Styles */
.settings-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.settings-row {
    display: flex;
    border: 1px solid var(--border-color);
    padding: 10px;
    align-items: center;
    transition: background-color 0.2s;
}

.settings-row:hover {
    background-color: #f9f9f9;
}

.settings-row:nth-child(even) {
    background: #f9f9f9;
}

.settings-key {
    flex: 0 0 180px;
    font-weight: 600;
    color: var(--text-light);
    padding-right: 15px;
}

.settings-value {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
}

.settings-value input,
.settings-value select {
    width: 100%;
    max-width: 300px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.settings-value .unit {
    color: var(--text-light);
    font-size: 14px;
}

.settings-desc {
    flex: 2;
    padding-left: 20px;
    color: var(--text-light);
    font-size: 14px;
    min-width: 250px;
}

/* Dashboard Styles */
.dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.dashboard-header h1 {
    font-size: 28px;
    color: var(--dark-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 20px;
}

.user-info img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 10px;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 16px;
    color: var(--text-light);
}

.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.widget {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.widget h3 {
    margin-bottom: 15px;
    color: var(--dark-color);
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* List Styles */
.sales-list,
.products-list,
.customers-list,
.expenses-list,
.invoices-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sale-item,
.product-item,
.customer-item,
.expense-item,
.invoice-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #eee;
    transition: background-color 0.2s;
}

.sale-item:hover,
.product-item:hover,
.customer-item:hover,
.expense-item:hover,
.invoice-item:hover {
    background: #f1f3f5;
}

.sale-info,
.product-info,
.customer-info,
.expense-info,
.invoice-info {
    flex: 1;
    min-width: 150px;
}

.sale-customer,
.product-name,
.customer-name,
.expense-category,
.invoice-id {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 3px;
}

.sale-date,
.product-sales,
.customer-contact,
.expense-date,
.invoice-date {
    color: var(--text-light);
    font-size: 14px;
}

.sale-amount,
.product-price,
.invoice-amount {
    font-weight: 700;
    color: var(--dark-color);
    font-size: 18px;
    font-variant-numeric: tabular-nums;
}

.invoice-status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-left: 10px;
    min-width: 70px;
    text-align: center;
}

.invoice-status.paid {
    background: var(--success-color);
    color: white;
}

.invoice-status.unpaid {
    background: var(--danger-color);
    color: white;
}

.invoice-actions {
    display: flex;
    gap: 5px;
    min-width: 120px;
    justify-content: flex-end;
}

/* POS System Styles */
.pos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
    flex-wrap: wrap;
    gap: 15px;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-left img {
    max-height: 50px;
    width: auto;
}

.header-right h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0;
}

.pos-main {
    display: flex;
    gap: 20px;
    height: calc(100vh - 250px);
    overflow: hidden;
    margin-bottom: 20px;
}

.items-panel {
    flex: 0 0 300px;
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.panel-header {
    padding: 15px 20px;
    background: var(--dark-color);
    color: white;
    font-weight: 600;
    text-align: center;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    padding: 20px;
    overflow-y: auto;
    height: 100%;
    align-content: start;
}

.item-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 130px;
}

.item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.item-image:empty::before {
    content: "🍽️";
    font-size: 24px;
}

.item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
}

.item-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark-color);
    font-variant-numeric: tabular-nums;
}

.cart-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: hidden;
}

.general-rate,
.payment-mode,
.cart {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
}

.general-rate h3,
.payment-mode h3,
.cart h3 {
    margin-bottom: 15px;
    color: var(--dark-color);
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.rate-fields {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.rate-field {
    flex: 1;
    min-width: 120px;
}

.rate-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text-light);
}

.rate-field input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
    font-variant-numeric: tabular-nums;
}

.payment-mode select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
    margin-bottom: 10px;
}

.payment-details {
    margin-top: 10px;
}

.payment-details input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
}

.cart h3 {
    margin-bottom: 15px;
    color: var(--dark-color);
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
    padding-right: 5px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cart-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.cart-item-image {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-image:empty {
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

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

.cart-item-name {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    font-size: 14px;
    color: var(--text-light);
    font-variant-numeric: tabular-nums;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 10px;
    min-width: 90px;
}

.cart-item-qty input {
    width: 60px;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.cart-item-remove {
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background 0.2s;
    flex-shrink: 0;
    font-weight: bold;
}

.cart-item-remove:hover {
    background: #c0392b;
}

.cart-totals {
    background: white;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.total-row:last-child {
    border-bottom: none;
}

.total-row span:first-child {
    font-weight: 600;
    color: var(--dark-color);
}

.total-row span:last-child {
    font-weight: 700;
    color: var(--dark-color);
    font-variant-numeric: tabular-nums;
}

.total-grand {
    font-size: 20px;
    font-weight: 700;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px solid #eee;
}

.invoice-preview {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
}

.invoice-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
    flex-wrap: wrap;
}

.invoice-logo {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.invoice-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark-color);
    flex: 1;
    min-width: 150px;
}

.invoice-info {
    margin-bottom: 15px;
}

.invoice-id,
.invoice-date,
.customer-name {
    margin-bottom: 6px;
    font-size: 14px;
}

.invoice-id {
    font-weight: 600;
    color: var(--dark-color);
}

.invoice-date,
.customer-name {
    color: var(--text-light);
}

.invoice-items {
    margin-bottom: 15px;
}

.invoice-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.invoice-item-name {
    flex: 2;
    color: var(--dark-color);
    font-weight: 600;
    min-width: 120px;
}

.invoice-item-qty,
.invoice-item-unit,
.invoice-item-amount {
    text-align: right;
    color: var(--dark-color);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    min-width: 60px;
}

.invoice-totals {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.invoice-footer {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #eee;
}

.invoice-footer p {
    margin-bottom: 10px;
    color: var(--text-light);
    font-style: italic;
}

.barcode {
    width: 100%;
    height: 30px;
    background: #ddd;
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #555;
}

.invoice-number {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    padding: 20px;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    color: #aaa;
    cursor: pointer;
    z-index: 1001;
}

.close:hover {
    color: #333;
}

.share-header {
    padding: 0 0 20px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.share-header h2 {
    margin-bottom: 15px;
    color: var(--dark-color);
    font-size: 24px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.file-icon {
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 5px;
    font-variant-numeric: tabular-nums;
}

.file-size {
    color: var(--text-light);
    font-size: 14px;
}

.file-actions {
    display: flex;
    gap: 10px;
}

.edit-btn,
.copy-btn {
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.edit-btn:hover,
.copy-btn:hover {
    background: #f8f9fa;
}

.share-options {
    padding: 0;
}

.share-section {
    margin-bottom: 20px;
}

.share-section h3 {
    margin-bottom: 15px;
    color: var(--dark-color);
    font-size: 18px;
}

.share-people {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.person {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    min-width: 200px;
}

.person:hover {
    background: #eef2f5;
}

.avatar {
    width: 30px;
    height: 30px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.name {
    font-size: 14px;
    color: var(--dark-color);
}

.share-apps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
}

.app {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.app:hover {
    background: #eef2f5;
}

.app-icon {
    width: 40px;
    height: 40px;
    background: #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    margin-bottom: 10px;
    font-size: 20px;
}

.app-name {
    font-size: 14px;
    color: var(--dark-color);
    text-align: center;
}

/* Loading States */
.btn.loading {
    position: relative;
    padding-left: 30px;
}

.btn.loading::after {
    content: "";
    position: absolute;
    left: 10px;
    top: 50%;
    width: 12px;
    height: 12px;
    margin-top: -6px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Empty State */
.no-records {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.no-records p {
    margin-bottom: 20px;
    font-size: 18px;
}

/* No Data */
.no-data {
    color: var(--text-light);
    text-align: center;
    padding: 20px;
    font-style: italic;
}

/* Chart Placeholder */
.chart-placeholder {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-info {
    color: var(--text-light);
}

.chart-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 10px;
    font-variant-numeric: tabular-nums;
}

.chart-label {
    font-size: 16px;
    margin-bottom: 5px;
}

.chart-note {
    font-size: 12px;
    color: var(--text-light);
}

/* Report Actions */
.report-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Report Filters */
.report-filters {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
}

.report-filters select,
.report-filters input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
    min-width: 120px;
}

.report-date-range {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 14px;
    color: var(--text-light);
    min-width: 180px;
}

/* Top Products */
.top-products {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-rank {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 8px 0;
}

.rank {
    font-weight: 700;
    color: var(--dark-color);
    min-width: 25px;
}

.product-name {
    flex: 1;
    color: var(--dark-color);
    font-weight: 600;
}

.product-sales,
.product-amount {
    color: var(--text-light);
    font-size: 14px;
    white-space: nowrap;
}

/* Status Badges */
.status-active {
    background: var(--success-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-inactive {
    background: var(--danger-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Form Text */
.form-text {
    color: var(--text-light);
    font-size: 12px;
    margin-top: 5px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    :root {
        --sidebar-width: 220px;
    }
    
    .items-panel {
        flex: 0 0 280px;
    }
    
    .settings-key {
        flex: 0 0 160px;
    }
}

@media (max-width: 992px) {
    :root {
        --sidebar-width: var(--sidebar-width-mobile);
    }
    
    .sidebar .logo img {
        max-width: 50px;
        margin: 0 auto;
    }
    
    .sidebar nav ul {
        padding: 10px 0;
    }
    
    .sidebar nav li {
        padding: 12px 10px;
        text-align: center;
    }
    
    .sidebar nav li a span {
        display: none;
    }
    
    .sidebar nav li a i {
        font-size: 22px;
        margin: 0 auto;
        display: block;
    }
    
    .main-content {
        margin-left: var(--sidebar-width-mobile);
    }
    
    .topbar {
        left: var(--sidebar-width-mobile);
    }
    
    .pos-main {
        flex-direction: column;
        height: auto;
    }
    
    .items-panel {
        flex: 0 0 100%;
        height: 350px;
    }
    
    .cart-panel {
        height: auto;
    }
    
    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 12px;
        padding: 15px;
    }
    
    .item-card {
        padding: 12px;
        min-height: 120px;
    }
    
    .item-name {
        font-size: 13px;
        min-height: 35px;
    }
    
    .invoice-actions {
        min-width: 100px;
    }
    
    .page-header,
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .report-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .report-date-range {
        min-width: auto;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .login-container {
        padding: 25px;
        width: 100%;
        max-width: 100%;
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-widgets {
        grid-template-columns: 1fr;
    }
    
    .pos-header,
    .header-left,
    .header-right {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .header-left img {
        margin: 0 auto;
    }
    
    .pos-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        padding: 12px;
    }
    
    .rate-fields {
        flex-direction: column;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .cart-item-info {
        width: 100%;
    }
    
    .cart-item-qty {
        width: 100%;
        justify-content: space-between;
        margin: 0;
    }
    
    .cart-item-remove {
        align-self: flex-end;
    }
    
    .invoice-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .invoice-item-qty,
    .invoice-item-unit,
    .invoice-item-amount {
        text-align: left;
        width: 100%;
    }
    
    .file-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .share-people {
        flex-direction: column;
    }
    
    .share-apps {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    }
    
    .settings-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .settings-key,
    .settings-value,
    .settings-desc {
        flex: none;
        width: 100%;
    }
    
    .settings-key {
        padding-right: 0;
    }
    
    .modal-content {
        padding: 15px;
    }
    
    .cart-totals,
    .invoice-totals {
        padding: 15px;
    }
    
    .total-row {
        padding: 8px 0;
    }
    
    .total-grand {
        font-size: 18px;
        padding-top: 10px;
    }
}

@media (max-width: 480px) {
    :root {
        --sidebar-width: 0;
    }
    
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .topbar {
        left: 0;
        width: 100%;
    }
    
    .page-header,
    .form-actions {
        flex-direction: column;
    }
    
    .page-header h1,
    .btn {
        width: 100%;
    }
    
    .pos-header {
        padding: 10px;
    }
    
    .pos-actions {
        padding: 15px 10px;
        gap: 8px;
    }
    
    .cart-icon {
        padding: 8px;
    }
    
    .cart-count {
        top: -8px;
        right: -8px;
        width: 20px;
        height: 20px;
        font-size: 12px;
    }
    
    .modal-content {
        width: 95%;
        margin: 0 10px;
        padding: 15px;
    }
    
    .item-name {
        font-size: 12px;
        min-height: 30px;
    }
    
    .item-price {
        font-size: 14px;
    }
    
    .cart-item-name {
        font-size: 14px;
    }
    
    .cart-item-price {
        font-size: 12px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 14px;
    }
    
    .invoice-actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .btn {
        font-size: 15px;
        padding: 10px;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .report-filters select,
    .report-filters input {
        min-width: auto;
        width: 100%;
    }
}