/* shared.css — common styles for all app pages */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Arial, sans-serif; color: #202124; display: flex; min-height: 100vh; background: #f8f9fa; }

.sidebar {
  width: 220px; background: #fff; border-right: 1px solid #e0e0e0;
  display: flex; flex-direction: column; padding: 24px 0; position: fixed; top: 0; bottom: 0;
}
.sidebar .logo { font-size: 18px; font-weight: 700; color: #1a73e8; padding: 0 20px 24px; }
.sidebar a {
  display: block; padding: 10px 20px; color: #5f6368; text-decoration: none; font-size: 14px;
  border-left: 3px solid transparent;
}
.sidebar a:hover, .sidebar a.active { color: #1a73e8; background: #e8f0fe; border-left-color: #1a73e8; }
.sidebar .logout { margin-top: auto; color: #d93025; }

.content { margin-left: 220px; padding: 32px; flex: 1; }
.content h1 { font-size: 24px; font-weight: 600; margin-bottom: 24px; }
.content h2 { font-size: 18px; font-weight: 600; margin-bottom: 16px; }

.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.metric-card { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.metric-value { font-size: 28px; font-weight: 700; color: #1a73e8; }
.metric-label { font-size: 13px; color: #5f6368; margin-top: 4px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.panel { background: #fff; border-radius: 10px; padding: 24px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }

.btn { display: inline-block; background: #1a73e8; color: white; padding: 10px 20px; border-radius: 6px;
  text-decoration: none; font-size: 14px; font-weight: 500; cursor: pointer; border: none; margin: 4px 0; }
.btn:hover { background: #1557b0; }
.btn.secondary { background: #fff; color: #1a73e8; border: 1px solid #1a73e8; }
.btn.danger { background: #d93025; }

.empty { color: #9aa0a6; font-size: 14px; padding: 16px 0; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 10px 12px; background: #f8f9fa; border-bottom: 2px solid #e0e0e0; font-weight: 600; color: #5f6368; }
td { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; }
tr:hover td { background: #f8f9fa; }

.query-row { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f0f0f0; font-size: 13px; align-items: center; }
.query-text { flex: 1; color: #202124; }
.query-file { color: #1a73e8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.query-rating { font-size: 16px; }
.query-time { color: #9aa0a6; white-space: nowrap; }

input[type="text"], input[type="email"], select, textarea {
  width: 100%; padding: 8px 12px; border: 1px solid #dadce0; border-radius: 6px; font-size: 14px;
  outline: none; transition: border-color .2s;
}
input:focus, select:focus, textarea:focus { border-color: #1a73e8; }

.toggle { position: relative; display: inline-block; width: 40px; height: 22px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: #ccc; border-radius: 22px; cursor: pointer; transition: .3s; }
.toggle input:checked + .toggle-slider { background: #1a73e8; }
.toggle-slider::before { content: ""; position: absolute; height: 16px; width: 16px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: .3s; }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

.badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.badge-admin { background: #e8f0fe; color: #1a73e8; }
.badge-editor { background: #e6f4ea; color: #188038; }
.badge-viewer { background: #f8f9fa; color: #5f6368; }

.progress-bar { width: 100%; height: 8px; background: #e0e0e0; border-radius: 4px; }
.progress-fill { height: 100%; background: #1a73e8; border-radius: 4px; transition: width .3s; }
