/* Custom Styles for TGCRM PWA */
:root {
  --primary-color: #2196f3;
  --secondary-color: #64b5f6;
  --success-color: #4caf50;
  --error-color: #f44336;
  --background-color: #eceff1;
}

body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  background-color: var(--background-color);
}

main {
  flex: 1 0 auto;
}

/* Override Materialize Styles */
.btn, .btn-large, .btn-small {
  background-color: var(--primary-color);
}

.btn:hover, .btn-large:hover, .btn-small:hover {
  background-color: var(--secondary-color);
}

.page-footer {
  padding-top: 0;
}

/* Custom Classes */
.hide {
  display: none !important;
}

/* Card styles */
.card {
  border-radius: 8px;
}

.card-title {
  color: var(--primary-color);
}

/* Form Styles */
.input-field input[type=text]:focus + label,
.input-field input[type=email]:focus + label,
.input-field input[type=password]:focus + label {
  color: var(--primary-color) !important;
}

.input-field input[type=text]:focus,
.input-field input[type=email]:focus,
.input-field input[type=password]:focus {
  border-bottom: 1px solid var(--primary-color) !important;
  box-shadow: 0 1px 0 0 var(--primary-color) !important;
}

/* Preloader */
.preloader-wrapper.active {
  margin: 0 auto;
  display: block;
}

/* App Shell Layout */
.app-shell-header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.sidenav-trigger {
  display: block !important;
}

/* Offline indicator */
.offline-indicator {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--error-color);
  color: white;
  padding: 10px 15px;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  z-index: 1000;
}

/* Toast notification */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
}

/* Dashboard layout */
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* Login specific styles */
.login-container {
  margin-top: 2rem;
}

/* Responsive adjustments */
@media only screen and (max-width: 600px) {
  .container {
    width: 95%;
  }
}

/* Add CSS for mobile optimization */
@media only screen and (max-width: 600px) {
  h4 {
    font-size: 1.8rem;
  }
  
  .card-title {
    font-size: 1.5rem;
  }
  
  .btn-large {
    height: 44px;
    line-height: 44px;
  }
  
  .row {
    margin-bottom: 10px;
  }
}

/* Offline mode styles */
.offline-mode .requires-online {
  opacity: 0.5;
  pointer-events: none;
}