/* public/css/app.css - Android Material 3 Light Theme UI (MobiSpace Refined) */

@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,400&family=Google+Sans:wght@400;500;700&display=swap');

:root {
  --primary-color: #1E65FF;
  --primary-hover: #1052E1;
  --primary-light: #EFF6FF;
  --surface-color: #FFFFFF;
  --background-color: #F0F6FE;
  --text-primary: #1E293B;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --border-color: #E2E8F0;

  /* Status Colors */
  --status-market-bg: #FFF3E0;
  --status-market-text: #E65100;
  --status-market-border: #FFE0B2;

  --status-returned-bg: #E8F5E9;
  --status-returned-text: #1B5E20;
  --status-returned-border: #C8E6C9;

  --status-pending-bg: #FFEBEE;
  --status-pending-text: #B71C1C;
  --status-pending-border: #FFCDD2;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(30,101,255,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 24px rgba(30,101,255,0.14);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 50px;

  --font-main: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Google Sans', 'Roboto', sans-serif;
}

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Reset & Prevent Rubberband Over-scroll Bouncing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  touch-action: manipulation;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: var(--font-main);
  background-color: var(--background-color);
  color: var(--text-primary);
  line-height: 1.5;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior-y: none;
  overscroll-behavior-x: none;
  overscroll-behavior: none;
  touch-action: pan-y;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

/* Material Icons Helper */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
}

/* Layout App Wrapper */
.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  flex-direction: column;
  overscroll-behavior: none;
}

@media (min-width: 768px) {
  .app-container {
    flex-direction: row;
  }
}

/* Sidebar Navigation (Desktop) */
.sidebar {
  width: 260px;
  background-color: var(--surface-color);
  border-right: 1px solid var(--border-color);
  display: none;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
}

@media (min-width: 768px) {
  .sidebar {
    display: flex;
  }
  .main-wrapper {
    margin-left: 260px;
  }
}

.sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-header .app-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #1E65FF, #1052E1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-header h2 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-weight: 500;
  transition: background-color 0.2s, color 0.2s;
}

.nav-item:hover {
  background-color: var(--background-color);
  color: var(--text-primary);
}

.nav-item.active {
  background-color: var(--primary-light);
  color: var(--primary-color);
  font-weight: 700;
}

.nav-item.active .material-symbols-outlined {
  color: var(--primary-color);
}

/* Main Content Wrapper */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-bottom: 80px; /* Space for Floating Bottom Dock on Mobile */
  overscroll-behavior: none;
}

@media (min-width: 768px) {
  .main-wrapper {
    padding-bottom: 20px;
  }
}

/* Professional Top Sticky Bar */
.top-app-bar {
  position: sticky;
  top: 0;
  z-index: 90;
  height: 60px;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(30, 101, 255, 0.05);
}

.header-brand-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo-icon {
  height: 44px;
  width: auto;
  max-width: 320px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.header-title-text {
  display: flex;
  flex-direction: column;
}

.header-title-text .brand-name {
  font-size: 14px;
  font-weight: 800;
  color: #1E65FF;
  letter-spacing: -0.3px;
  line-height: 1.1;
}

.user-profile-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 20px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  text-decoration: none;
  color: #1E293B;
  transition: background-color 0.2s ease;
}

.user-profile-pill:hover {
  background-color: #E2E8F0;
}

/* Main Container Area */
.content-container {
  padding: 20px 16px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  overscroll-behavior: none;
}

/* Status Badges & Pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.status-pill.status-market {
  background-color: var(--status-market-bg);
  color: var(--status-market-text);
  border: 1px solid var(--status-market-border);
}

.status-pill.status-returned {
  background-color: var(--status-returned-bg);
  color: var(--status-returned-text);
  border: 1px solid var(--status-returned-border);
}

.status-pill.status-pending {
  background-color: var(--status-pending-bg);
  color: var(--status-pending-text);
  border: 1px solid var(--status-pending-border);
}

/* Buttons */
.btn-android {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s, box-shadow 0.2s, transform 0.1s;
}

.btn-android:active {
  transform: scale(0.98);
}

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

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: #F1F5F9;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: #E2E8F0;
}

/* Full Width Native Android Mobile Bottom Sheet Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 3000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 0;
}

@media (min-width: 600px) {
  .modal-overlay {
    align-items: center;
    padding: 20px;
  }
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background-color: var(--surface-color);
  width: 100%;
  max-width: 100%;
  border-radius: 28px 28px 0 0;
  padding: 24px 20px 32px 20px;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.1, 0.9, 0.2, 1);
  max-height: 85vh;
  overflow-y: auto;
  margin: 0;
}

@media (min-width: 600px) {
  .modal-dialog {
    max-width: 540px;
    border-radius: 28px;
    transform: translateY(20px);
  }
}

.modal-overlay.active .modal-dialog {
  transform: translateY(0);
}

/* Global MobiSpace Royal Modal Header & Input Classes */
.modal-royal-header {
  background: linear-gradient(135deg, #1E65FF 0%, #1052E1 100%);
  color: #FFFFFF;
  padding: 18px 20px;
  border-radius: 20px 20px 0 0;
  margin: -24px -20px 20px -20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-royal-title {
  font-size: 17px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close-icon-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #FFFFFF;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.modal-close-icon-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

.modal-input-group {
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  background-color: #FFFFFF;
  display: flex;
  align-items: center;
  padding: 4px 14px;
  margin-bottom: 14px;
  transition: all 0.2s ease;
}

.modal-input-group:focus-within {
  border-color: #1E65FF;
  box-shadow: 0 0 0 4px rgba(30, 101, 255, 0.1);
}

.modal-input-icon {
  color: #1E65FF;
  margin-right: 10px;
  display: flex;
  align-items: center;
}

.modal-input-field {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 0;
  font-size: 13px;
  color: #1E293B;
  font-weight: 500;
  background: transparent;
}

.modal-input-field::placeholder {
  color: #94A3B8;
  font-weight: 400;
}

.btn-submit-modal-royal {
  width: 100%;
  height: 52px;
  border-radius: 26px;
  border: none;
  background: linear-gradient(135deg, #1E65FF 0%, #0042E4 100%);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(30, 101, 255, 0.35);
  transition: all 0.25s ease;
  padding: 0 20px;
  margin-top: 10px;
}

.btn-submit-modal-royal:hover {
  background: linear-gradient(135deg, #1554E0 0%, #0036B8 100%);
  box-shadow: 0 12px 28px rgba(30, 101, 255, 0.45);
}

.btn-submit-modal-royal .arrow-icon-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 360px;
  background-color: #1E293B;
  color: white;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  animation: toastIn 0.3s forwards ease;
}

.toast.toast-success { background-color: #16A34A; }
.toast.toast-error { background-color: #DC2626; }
.toast.toast-warning { background-color: #EA580C; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
