#app { min-height: 100vh; }

/* Login: full width */
.page-full { 
  min-height: 100vh; 
  padding: 0; 
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 50%, #0ea5e9 100%);
}

/* Login Container */
.login-container {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 1;
}

/* Login Card */
.login-card {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 3rem;
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 2;
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Login Header */
.login-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.login-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.4);
}

.login-logo i {
  font-size: 2.5rem;
  color: #fff;
}

.login-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.5px;
}

.login-subtitle {
  color: #6c757d;
  font-size: 0.95rem;
  margin: 0;
}

/* Login Form */
.login-form {
  margin-top: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.form-label i {
  color: #3b82f6;
  font-size: 1.1rem;
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  transition: all 0.3s ease;
  background: #fff;
}

.form-control:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  background: #fff;
}

.form-control::placeholder {
  color: #adb5bd;
}

/* Password Input Wrapper */
.password-input-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  z-index: 1;
}

.password-toggle:hover {
  color: #3b82f6;
}

.password-toggle i {
  font-size: 1.2rem;
}

/* Login Button */
.btn-login {
  width: 100%;
  padding: 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 12px;
  background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
  border: none;
  color: #fff;
  margin-top: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
  position: relative;
  overflow: hidden;
}

.btn-login:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.btn-login:active:not(:disabled) {
  transform: translateY(0);
}

.btn-login:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Error Message */
.alert-danger {
  padding: 0.875rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  background: #fff5f5;
  border: 1px solid #feb2b2;
  color: #c53030;
}

/* Login Footer */
.login-footer {
  margin-top: 2rem;
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid #e9ecef;
}

.login-footer p {
  margin: 0;
  font-size: 0.85rem;
}

/* Background Shapes */
.login-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.bg-shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: float 20s infinite ease-in-out;
}

.bg-shape-1 {
  width: 300px;
  height: 300px;
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}

.bg-shape-2 {
  width: 200px;
  height: 200px;
  bottom: -50px;
  right: -50px;
  animation-delay: 5s;
}

.bg-shape-3 {
  width: 150px;
  height: 150px;
  top: 50%;
  right: 10%;
  animation-delay: 10s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(30px, -30px) rotate(120deg);
  }
  66% {
    transform: translate(-20px, 20px) rotate(240deg);
  }
}

/* Responsive */
@media (max-width: 576px) {
  .login-card {
    padding: 2rem 1.5rem;
    margin: 1rem;
    border-radius: 20px;
  }
  
  .login-title {
    font-size: 1.75rem;
  }
  
  .login-logo {
    width: 70px;
    height: 70px;
  }
  
  .login-logo i {
    font-size: 2rem;
  }
}

/* Sidebar */
.app-layout { min-height: 100vh; display: flex; }
.sidebar {
  width: 260px;
  min-width: 260px;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  background: linear-gradient(180deg, #1e3a5f 0%, #0d1b2a 100%);
  color: #e0e0e0;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  box-shadow: 4px 0 12px rgba(0,0,0,0.15);
}
.sidebar-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-brand {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
}
.sidebar-brand:hover { color: #a8dadc; }
.sidebar-nav { flex: 1; padding: 1rem 0; overflow-y: auto; }
.sidebar-link {
  display: flex;
  align-items: center;
  padding: 0.65rem 1.5rem;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.sidebar-link:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sidebar-link .sidebar-icon { margin-right: 0.75rem; font-size: 1.1rem; }
.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.sidebar-user {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.5rem;
  word-break: break-all;
}

/* Main content */
.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 1.5rem 2rem;
  min-height: 100vh;
  background: #f4f5f7;
}

.page { min-height: 50vh; }
.table-actions { white-space: nowrap; }
.editable-stock:hover,
.editable-price:hover { background-color: rgba(13, 110, 253, 0.08); }
.btn-group-sm .btn { padding: 0.25rem 0.5rem; }
.product-cell-img { width: 56px; text-align: center; }
.product-thumb { max-width: 48px; max-height: 48px; object-fit: cover; border-radius: 4px; }
.product-edit-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 6px; border: 1px solid #dee2e6; }
.card { margin-bottom: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,0.08); border: none; border-radius: 8px; }
.card-header { font-weight: 600; border-radius: 8px 8px 0 0; }

/* Responsive: collapse sidebar on small screens */
@media (max-width: 768px) {
  .sidebar { width: 72px; min-width: 72px; }
  .sidebar-brand, .sidebar-link span:not(.sidebar-icon), .sidebar-user { font-size: 0; overflow: hidden; }
  .sidebar-link .sidebar-icon { margin-right: 0; }
  .main-content { margin-left: 72px; padding: 1rem; }
}

.cursor-pointer { cursor: pointer; }

/* Spinning icon for sync */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.spin-icon {
  display: inline-block;
  animation: spin 1s linear infinite;
}
