/* POS Management System Dashboard - Custom Styles */

/* Root Variables */
:root {
  --primary-color: #3b82f6;
  --secondary-color: #6b7280;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --info-color: #06b6d4;
  --light-color: #f8fafc;
  --dark-color: #1e293b;
  --sidebar-width: 280px;
  --header-height: 70px;
  --font-size-normal:1em;
}

/* Global Styles */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f8fafc;
  color: #334155;
  font-size:var(--font-size-normal) !important;
}

/* Sidebar Styles */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: var(--sidebar-width);
/*  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
  background: linear-gradient(135deg, #000033 0%, #003459 100%);
  color: white;
  z-index: 1000;
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.sidebar.collapsed {
  transform: translateX(-100%);
}

.sidebar-brand {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand h4 {
  margin: 0;
  font-weight: 700;
}

.sidebar-nav {
  padding: 1rem 0;
}

.sidebar-nav .nav-link {
  color: rgba(255, 255, 255, 0.8);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
  border-left: 4px solid white;
}

.sidebar-nav .nav-link i {
  width: 20px;
  text-align: center;
}

/* Header Styles */
.header {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--header-height);
  background: white;
  border-bottom: 1px solid #e2e8f0;
  z-index: 999;
  transition: left 0.3s ease;
}

.header.sidebar-collapsed {
  left: 0;
}

.header .navbar {
  height: 100%;
  padding: 0 1.5rem;
}

@media ( max-width: 769px ) {
   .header .header-search-box{
    display: none !important;
   }
}

/* Main Content */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--header-height);
  padding: 2rem;
  min-height: calc(100vh - var(--header-height));
  transition: margin-left 0.3s ease;
}

.main-content.sidebar-collapsed {
  margin-left: 0;
}

/* Cards */
.card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

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

.card-header {
  background: transparent;
  border-bottom: 1px solid #e2e8f0;
  padding: 1.5rem;
}

.card-body {
  padding: 1.5rem;
}

/* Stats Cards */
.stats-card {
  background: linear-gradient(135deg, var(--primary-color), #1e40af);
  color: white;
  border: none;
}

.stats-card.success {
  background: linear-gradient(135deg, var(--success-color), #059669);
}

.stats-card.warning {
  background: linear-gradient(135deg, var(--warning-color), #d97706);
}

.stats-card.danger {
  background: linear-gradient(135deg, var(--danger-color), #dc2626);
}

.stats-card .card-body {
  position: relative;
  overflow: hidden;
}

.stats-card .stats-icon {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  opacity: 0.3;
}

.stats-value {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
}

.stats-label {
  font-size: 0.875rem;
  opacity: 0.9;
  margin: 0;
}

.stats-change {
  font-size: 0.75rem;
  margin-top: 0.5rem;
}

/* Buttons */
.btn {
  border-radius: 8px;
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), #1e40af);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1e40af, var(--primary-color));
  transform: translateY(-1px);
}

/* Tables */
.table {
  border-radius: 8px;
  overflow: hidden;
}

.table thead th {
  background-color: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  font-weight: 600;
  color: #475569;
}

/* Forms */
.form-control {
  border-radius: 8px;
  border: 1px solid #d1d5db;
  padding: 0.75rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Badges */
.badge {
  border-radius: 6px;
  font-weight: 500;
  padding: 0.375rem 0.75rem;
}

/* POS Specific Styles */
.pos-product-card {
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.pos-product-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.pos-cart {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: calc(var(--header-height) + 2rem);
}

.cart-item {
  padding: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .header {
    left: 0;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .stats-value {
    font-size: 2rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

/* Loading Spinner */
.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  color: var(--primary-color);
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* Alert Styles */
.alert {
  border-radius: 8px;
  border: none;
  padding: 1rem 1.5rem;
}

.alert-success {
  background-color: #d1fae5;
  color: #065f46;
}

.alert-warning {
  background-color: #fef3c7;
  color: #92400e;
}

.alert-danger {
  background-color: #fee2e2;
  color: #991b1b;
}

.alert-info {
  background-color: #dbeafe;
  color: #1e40af;
}

/* Modal Styles */
.modal-content {
  border-radius: 12px;
  border: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.modal-header {
  border-bottom: 1px solid #e2e8f0;
  padding: 1.5rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid #e2e8f0;
  padding: 1.5rem;
}

/* Login Page Styles */
.login-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #000033 0%, #003459 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  max-width: 400px;
  width: 100%;
}

.login-header {
  background: linear-gradient(135deg, var(--primary-color), #1e40af);
  color: white;
  padding: 2rem;
  text-align: center;
}

.login-header .logo{
  width:50px;
  height: auto;
  margin-bottom: 1rem !important;
}

.login-body {
  padding: 2rem;
}

.shopa-loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.85);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease-in-out;
}

.shopa-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.loader-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    animation: spin 1s linear infinite;
    margin-top: 12px;
}


/* Utility Classes */
.text-gradient {
  background: linear-gradient(135deg, var(--primary-color), #1e40af);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shadow-soft {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.border-radius-lg {
  border-radius: 12px;
}

.border-radius-xl {
  border-radius: 16px;
}


.shake {
  animation: shake 0.3s;
}


/*
*
*ANIMATIONS 
*
*/

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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


