/* VR Playout Pro – Dashboard Styles */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0a0a0f;
  color: #e0e0e0;
  min-height: 100vh;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid #222;
}

header h1 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #fff;
}

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

.status-badge {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 12px;
  background: #333;
  color: #888;
}

.status-badge.live {
  background: #1a3a1a;
  color: #4ade80;
}

.status-badge.error {
  background: #3a1a1a;
  color: #f87171;
}

/* User Menu */
.user-menu {
  position: relative;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #1a1a24;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 6px 12px;
  color: #ccc;
  font-size: 0.85rem;
  cursor: pointer;
}

.user-btn:hover {
  background: #222230;
  border-color: #444;
}

.user-icon {
  font-size: 1.1rem;
}

.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #151520;
  border: 1px solid #333;
  border-radius: 10px;
  min-width: 220px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 100;
  overflow: hidden;
}

.user-dropdown.open {
  display: block;
}

.dropdown-header {
  padding: 14px 16px;
}

.dropdown-label {
  display: block;
  font-size: 0.7rem;
  color: #666;
  margin-bottom: 4px;
}

.dropdown-user {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

.dropdown-role {
  display: inline-block;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: #1a3a1a;
  color: #4ade80;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.dropdown-divider {
  height: 1px;
  background: #2a2a36;
}

.dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  background: none;
  border: none;
  color: #ccc;
  font-size: 0.85rem;
  cursor: pointer;
}

.dropdown-item:hover {
  background: #1e1e2e;
  color: #fff;
}

.dropdown-item.logout {
  color: #f87171;
}

.dropdown-item.logout:hover {
  background: #2a1a1a;
}

/* Tab Navigation */
.tab-nav {
  display: flex;
  gap: 2px;
  margin-bottom: 24px;
  border-bottom: 1px solid #222;
}

.tab {
  padding: 10px 20px;
  color: #666;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}

.tab:hover { color: #aaa; }

.tab.active {
  color: #4ade80;
  border-bottom-color: #4ade80;
}

/* Now Playing */
.now-playing {
  background: #111118;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.np-label {
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: #4ade80;
  margin-bottom: 12px;
  font-weight: 600;
}

.np-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.np-artist {
  font-size: 1.1rem;
  color: #aaa;
  margin-bottom: 8px;
}

.np-meta {
  font-size: 0.8rem;
  color: #666;
}

.filename {
  display: block;
  margin-top: 4px;
  word-break: break-all;
  font-family: monospace;
  font-size: 0.7rem;
}

/* Controls */
.controls {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.btn {
  flex: 1;
  padding: 14px 20px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn:active {
  transform: scale(0.97);
}

.btn-skip {
  background: #1e3a5f;
  color: #60a5fa;
}

.btn-skip:hover {
  background: #254a7a;
}

.btn-save {
  background: #1a3a1a;
  color: #4ade80;
  width: 100%;
  margin-top: 8px;
}

.btn-save:hover {
  background: #245a24;
}

.btn-danger {
  background: #3a1a1a;
  color: #f87171;
  padding: 6px 12px;
  font-size: 0.8rem;
  flex: none;
}

.btn-danger:hover {
  background: #4a2020;
}

/* Stream Info */
.stream-info {
  background: #111118;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #1a1a22;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  color: #666;
  font-size: 0.85rem;
}

.info-value {
  color: #ccc;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Monitor */
.monitor {
  background: #111118;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 16px 20px;
}

.monitor h3 {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 12px;
}

.monitor audio {
  width: 100%;
  height: 40px;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: #151520;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-wide {
  max-width: 550px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h2 {
  font-size: 1.1rem;
  color: #fff;
}

.modal-close {
  background: none;
  border: none;
  color: #666;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 4px;
}

.modal-close:hover {
  color: #fff;
}

.modal-subtitle {
  font-size: 0.9rem;
  color: #aaa;
  margin: 16px 0 12px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 9px 12px;
  background: #0a0a0f;
  border: 1px solid #333;
  border-radius: 6px;
  color: #e0e0e0;
  font-size: 0.9rem;
  outline: none;
}

.form-group input:focus,
.form-group select:focus {
  border-color: #4ade80;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 100px;
  gap: 10px;
}

.modal-msg {
  font-size: 0.85rem;
  margin: 8px 0;
  min-height: 20px;
}

.modal-msg.success { color: #4ade80; }
.modal-msg.error { color: #f87171; }

/* User List (Admin) */
.user-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #1a1a22;
}

.user-row:last-child {
  border-bottom: none;
}

.user-row-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-row-name {
  font-weight: 600;
  color: #fff;
  font-size: 0.9rem;
}

.user-row-role {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: #222;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.user-row-role.admin {
  background: #1a3a1a;
  color: #4ade80;
}

/* Responsive */
@media (max-width: 480px) {
  .container { padding: 12px; }
  .np-title { font-size: 1.2rem; }
  header h1 { font-size: 1.1rem; }
  .form-row { grid-template-columns: 1fr; }
  .modal { padding: 16px; }
}
