/* ================================
   TECMILLER – SORA CORPORATE STYLE
   styles.css (versão Premium Azul)
================================ */

/* VARIÁVEIS DE CORES */
:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #1e293b;
  --border: #cbd5e1;
  --shadow: rgba(0,0,0,0.10);
}

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", Arial, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
}

/* ================================
   SIDEBAR (PAINEL ADMIN)
================================ */
.sidebar {
  width: 240px;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background: white;
  padding: 20px;
  border-right: 1px solid var(--border);
  box-shadow: 2px 0px 12px var(--shadow);
}

.sidebar-logo {
  text-align: center;
  margin-bottom: 30px;
}

.sidebar-logo img {
  width: 70px;
  margin-bottom: 10px;
}

.sidebar-logo h2 {
  font-size: 18px;
  color: var(--primary-dark);
  font-weight: 800;
}

.sidebar-menu a {
  display: block;
  padding: 12px;
  margin-bottom: 6px;
  background: var(--bg);
  border-radius: 8px;
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.sidebar-menu a:hover {
  background: var(--primary);
  color: white;
}

.logout-btn {
  margin-top: 20px;
  width: 100%;
  padding: 14px;
  border: none;
  background: #ef4444;
  color: white;
  font-size: 15px;
  border-radius: 8px;
  cursor: pointer;
}

/* ================================
   MAIN CONTENT
================================ */
.main {
  margin-left: 260px;
  padding: 30px;
}

/* TÍTULOS */
.page h1 {
  font-size: 28px;
  color: var(--primary-dark);
  margin-bottom: 20px;
}

/* ================================
   CARDS DO DASHBOARD
================================ */
.cards-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 30px;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  font-size: 17px;
  font-weight: 700;
  border: 1px solid var(--border);
  box-shadow: 0 3px 10px var(--shadow);
  color: var(--primary-dark);
}

/* ================================
   TABELAS
================================ */
.table-container table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.table-container th {
  background: var(--primary);
  color: white;
  padding: 12px;
  text-align: left;
  font-size: 15px;
}

.table-container td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  background: white;
}

/* ================================
   BOTÕES
================================ */
.btn-primary {
  background: var(--primary);
  color: white;
  padding: 12px 20px;
  font-size: 15px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 15px;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

/* ================================
   INPUTS E CAMPOS
================================ */
input, select, textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
}

/* ================================
   PÁGINAS
================================ */
.page {
  display: none;
}

.page.active {
  display: block;
}

/* ================================
   MODAIS
================================ */
.modal {
  display: none;
  position: fixed;
  left: 0; top: 0;
  width: 100%; height: 100vh;
  background: rgba(0,0,0,0.45);
  justify-content: center;
  align-items: center;
  z-index: 500;
}

.modal-content {
  background: white;
  padding: 25px;
  width: 450px;
  border-radius: 12px;
  box-shadow: 0 3px 15px var(--shadow);
}

.modal-content h2 {
  margin-bottom: 12px;
  color: var(--primary-dark);
}

.close {
  margin-top: 10px;
  padding: 10px;
  background: #ddd;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

/* ================================
   ÁREA DO TÉCNICO & CLIENTE
================================ */

.os-card, .os-box {
  transition: 0.3s;
}

.os-card:hover, .os-box:hover {
  transform: scale(1.02);
}

/* ================================
   RESPONSIVIDADE
================================ */
@media (max-width: 850px) {

  .sidebar {
    width: 180px;
  }

  .main {
    margin-left: 200px;
  }

  .cards-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-content {
    width: 90%;
  }

}

@media (max-width: 600px) {

  .sidebar {
    display: none; /* NO MOBILE O ADMIN VÊ APENAS CONTEÚDO */
  }

  .main {
    margin-left: 0;
  }

  .cards-row {
    grid-template-columns: 1fr;
  }
}
