* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: #f0f2f5; }
.layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: 240px; background: #1a1a2e; color: #fff; display: flex;
  flex-direction: column; position: fixed; height: 100vh;
  transition: width 0.2s ease;
}
.sidebar-header {
  padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; gap: 12px;
}
.hamburger-btn {
  background: transparent; border: none; color: #ccc; font-size: 1.3rem;
  cursor: pointer; padding: 4px 8px; border-radius: 6px; line-height: 1;
  flex-shrink: 0;
}
.hamburger-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.sidebar-title h2 { font-size: 1.4rem; margin-bottom: 4px; }
.client-badge {
  display: inline-block; background: #0f3460; padding: 2px 10px;
  border-radius: 10px; font-size: 0.75rem;
}
.page-list { list-style: none; padding: 16px 0; flex: 1; overflow-y: auto; }
.page-item {
  padding: 12px 20px; cursor: pointer; display: flex; align-items: center;
  gap: 10px; font-size: 0.95rem; transition: background 0.2s; color: #ccc;
  white-space: nowrap; overflow: hidden;
}
.page-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.page-item.active { background: #0f3460; color: #fff; }
.page-icon { font-size: 1.1rem; flex-shrink: 0; }
.page-size { margin-left: auto; font-size: 0.75rem; color: #888; }
.sidebar-footer {
  padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.85rem; color: #aaa;
}
.logout-btn {
  background: transparent; border: 1px solid rgba(255,255,255,0.2); color: #ccc;
  padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 0.8rem;
}
.logout-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.logout-icon { display: none; font-size: 1rem; line-height: 1; }

/* Content */
.content {
  flex: 1; margin-left: 240px; height: 100vh; position: relative;
  transition: margin-left 0.2s ease;
}

/* Collapsed sidebar */
.sidebar.collapsed { width: 60px; }
.sidebar.collapsed .sidebar-header { justify-content: center; padding: 16px 0; }
.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .page-name,
.sidebar.collapsed .page-size,
.sidebar.collapsed #clientName,
.sidebar.collapsed .logout-text { display: none; }
.sidebar.collapsed .page-item { justify-content: center; padding: 12px 0; }
.sidebar.collapsed .page-icon { font-size: 1.3rem; }
.sidebar.collapsed .sidebar-footer { justify-content: center; padding: 16px 8px; }
.sidebar.collapsed .logout-btn { padding: 6px 8px; }
.sidebar.collapsed .logout-icon { display: inline; }
.content.collapsed { margin-left: 60px; }

/* Welcome */
.welcome {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; color: #aaa;
}
.welcome h1 { font-size: 1.8rem; margin-bottom: 8px; color: #888; }
.welcome p { font-size: 1rem; }

/* Page frame */
.page-frame {
  display: none; width: 100%; height: 100%; border: none;
}
.page-frame.active { display: block; }

/* Empty state */
.empty-state {
  padding: 40px 20px; text-align: center; color: #aaa; font-size: 0.95rem;
}

/* Modal */
.modal-overlay {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
  background: #fff; border-radius: 12px; width: 400px; max-width: 90vw;
  max-height: 85vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  color: #1a1a2e;
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px; border-bottom: 1px solid #eee;
}
.modal-header h3 { font-size: 1.2rem; color: #1a1a2e; }
.modal-close {
  background: none; border: none; font-size: 1.6rem; cursor: pointer; color: #888;
  padding: 0 4px;
}
.modal-close:hover { color: #333; }
.modal-body { padding: 24px; }
.modal-body .form-group { margin-bottom: 18px; }
.modal-body .form-group label {
  display: block; margin-bottom: 6px; font-weight: 600; color: #444; font-size: 0.88rem;
}
.modal-body .form-group input {
  width: 100%; padding: 10px 12px; border: 2px solid #e0e0e0; border-radius: 6px;
  font-size: 0.95rem; outline: none;
}
.modal-body .form-group input:focus { border-color: #0f3460; }
.modal-footer {
  padding: 16px 24px; border-top: 1px solid #eee; display: flex;
  justify-content: flex-end; gap: 10px;
}
.btn {
  border: none; border-radius: 6px; padding: 10px 16px; font-size: 0.9rem;
  cursor: pointer; font-weight: 600;
}
.btn-primary { background: #0f3460; color: #fff; }
.btn-primary:hover { background: #1a1a2e; }
.btn-secondary { background: #e0e0e0; color: #333; }
.btn-secondary:hover { background: #ccc; }
.error-msg {
  color: #e74c3c; text-align: center; margin-top: 12px; font-size: 0.88rem;
  display: none;
}
