/**
 * mobile/assets/css/mobile.css
 * 
 * Mobile-First Design System for RM Banca portal.
 * Curated HSL color palette, clean cards, touch-friendly inputs,
 * and a persistent fixed-bottom navigation bar.
 */

:root {
  --primary-color: #ffc107;      /* PVcomBank Yellow Brand */
  --primary-dark: #d39e00;
  --secondary-color: #17a2b8;    /* Info */
  --success-color: #28a745;      /* Success */
  --danger-color: #dc3545;        /* Danger */
  --light-bg: #f4f6f9;
  --card-bg: #ffffff;
  --text-dark: #212529;
  --text-muted: #6c757d;
  --border-color: #dee2e6;
  --font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--light-bg);
  color: var(--text-dark);
  padding-bottom: 75px; /* space for fixed-bottom navigation */
  line-height: 1.5;
  font-size: 14px;
  -webkit-tap-highlight-color: transparent;
}

/* Base Container */
.container {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

/* Header Banner */
.mobile-header {
  background-color: var(--primary-color);
  color: #1f2d3d;
  padding: 15px;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-header h1 {
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
}

.mobile-header .user-info {
  font-size: 0.8rem;
  font-weight: 600;
  text-align: right;
}

/* Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: var(--card-bg);
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  z-index: 1000;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none !important;
  font-size: 0.65rem;
  font-weight: 600;
  flex: 1;
  height: 100%;
  transition: color 0.15s ease-in-out;
}

.bottom-nav-item i {
  font-size: 1.2rem;
  margin-bottom: 3px;
}

.bottom-nav-item.active {
  color: var(--primary-dark);
}

/* Cards & Containers */
.m-card {
  background-color: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  padding: 15px;
  margin-top: 15px;
  border: 1px solid rgba(0,0,0,0.05);
}

.m-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  color: #343a40;
}

.m-card-title i {
  color: var(--primary-dark);
}

/* Info Box / Stats Card */
.stat-box {
  border-radius: 10px;
  padding: 12px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.stat-box.bg-info { background: linear-gradient(135deg, #17a2b8 0%, #117a8b 100%); }
.stat-box.bg-success { background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%); }
.stat-box.bg-danger { background: linear-gradient(135deg, #dc3545 0%, #bd2130 100%); }
.stat-box.bg-warning { background: linear-gradient(135deg, #ffc107 0%, #d39e00 100%); color: #1f2d3d !important; }
.stat-box.bg-primary { background: linear-gradient(135deg, #007bff 0%, #0056b3 100%); }

.stat-box-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.stat-box-info p {
  font-size: 0.75rem;
  opacity: 0.9;
  font-weight: 600;
}

.stat-box i {
  font-size: 1.8rem;
  opacity: 0.3;
}

/* Listings (Refer / Contract Cards) */
.list-item {
  background-color: var(--card-bg);
  border-left: 4px solid var(--primary-color);
  border-radius: 8px;
  padding: 12px;
  margin-top: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.list-item.border-success { border-left-color: var(--success-color); }
.list-item.border-danger { border-left-color: var(--danger-color); }
.list-item.border-info { border-left-color: var(--secondary-color); }

.list-item-content h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 3px;
}

.list-item-content p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.list-item-action {
  text-align: right;
}

/* Buttons */
.m-btn {
  display: inline-block;
  font-weight: 600;
  text-align: center;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 10px 16px;
  font-size: 0.85rem;
  border-radius: 8px;
  transition: background-color 0.15s ease-in-out;
  width: 100%;
  cursor: pointer;
}

.m-btn-primary {
  background-color: var(--primary-color);
  color: #1f2d3d;
}

.m-btn-primary:active {
  background-color: var(--primary-dark);
}

.m-btn-outline-info {
  border-color: var(--secondary-color);
  color: var(--secondary-color);
  background-color: transparent;
}

.m-btn-outline-info:active {
  background-color: var(--secondary-color);
  color: #ffffff;
}

/* Forms */
.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #495057;
  margin-bottom: 5px;
}

.m-control {
  display: block;
  width: 100%;
  height: 42px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.5;
  color: #495057;
  background-color: #ffffff;
  border: 1px solid #ced4da;
  border-radius: 8px;
  transition: border-color 0.15s ease-in-out;
}

.m-control:focus {
  border-color: var(--primary-color);
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25);
}

textarea.m-control {
  height: auto;
}

/* Slide-up Panel / Bottom Sheet Modal */
.bottom-sheet {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0,0,0,0.5);
  z-index: 1050;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-out;
}

.bottom-sheet.show {
  opacity: 1;
  visibility: visible;
}

.bottom-sheet-content {
  background-color: var(--card-bg);
  width: 100%;
  max-height: 85%;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  padding: 20px;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
}

.bottom-sheet.show .bottom-sheet-content {
  transform: translateY(0);
}

.bottom-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.bottom-sheet-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.bottom-sheet-header .close-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
}
