* { box-sizing: border-box; }
body { background: #f0f2f5; margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }
.app { min-height: 100vh; }

/* Header - Using custom top-header in partials/header.hbs */
/* .navbar { background: #fff !important; box-shadow: 0 2px 4px rgba(0,0,0,.1); position: sticky; top: 0; z-index: 1000; padding: 8px 0; }
.navbar-brand { color: #1877f2 !important; font-weight: 700; font-size: 28px; }
.nav-link { color: #65676b !important; font-weight: 500; padding: 8px 12px !important; border-radius: 8px; transition: background .2s; }
.nav-link:hover { background: #f0f2f5; } */

/* Container */
.container { max-width: 100%; padding: 20px 16px; }
.container:has(.posts-grid) { max-width: 100%; max-width: 1200px; }

/* Post Card */
.post-card { background: #fff; border-radius: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.1); margin-bottom: 12px; overflow: hidden; transition: box-shadow .2s; }
.post-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.15); }

/* Grid layout for posts */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.posts-grid .post-card {
  margin-bottom: 0;
}

.post-header { padding: 8px 12px; display: flex; align-items: center; gap: 8px; }
.post-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.post-meta h6 { margin: 0; font-size: 14px; font-weight: 600; color: #050505; }
.post-meta small { font-size: 12px; color: #65676b; }
.post-image { width: 100%; display: block; height: 120px; object-fit: cover; border: none; }
.news-image { width: 100%; display: block; height: 300px; object-fit: cover; border: none; }
.post-body { padding: 8px 12px 4px 12px; }
.post-title { font-size: 14px; margin: 0; }
.post-text { font-size: 13px; margin: 4px 0 0; }
.post-card a { border: none; outline: none; }
.post-card a img { border: none; }
.post-body { padding: 10px 12px 4px 12px; }
.post-title { font-size: 16px; font-weight: 600; color: #050505; margin: 0 0 6px; }
.post-text { color: #050505; font-size: 14px; line-height: 1.3; margin: 0 0 6px; }
.post-actions { padding: 4px 8px 8px 12px; border-top: none; display: flex; gap: 4px; justify-content: flex-end; }
.btn-action { background: none; border: none; padding: 2px 6px; border-radius: 4px; color: #65676b; font-weight: 600; cursor: pointer; transition: background .2s; font-size: 11px; }
.btn-action:hover { background: #f0f2f5; }
.btn-action.liked { color: #1877f2; }

/* Create Post */
.create-post { background: #fff; border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.1); padding: 12px 16px; margin-bottom: 16px; }
.create-post-input { background: #f0f2f5; border: none; border-radius: 20px; padding: 10px 16px; width: 100%; color: #65676b; cursor: pointer; }
.create-post-input:hover { background: #e4e6eb; }

/* Buttons */
.btn-primary { background: #1877f2 !important; border: none !important; border-radius: 6px; font-weight: 600; padding: 8px 16px; }
.btn-primary:hover { background: #166fe5 !important; }
.btn-outline-primary { border: 1px solid #1877f2 !important; color: #1877f2 !important; background: #fff !important; border-radius: 6px; font-weight: 600; }
.btn-outline-primary:hover { background: #e7f3ff !important; }

/* Alert */
.alert-info { background: #e7f3ff; border: 1px solid #1877f2; border-radius: 8px; color: #050505; }
.alert-info a { color: #1877f2; font-weight: 600; }

/* Loading Skeleton */
.skeleton { background: linear-gradient(90deg, #f0f2f5 25%, #e4e6eb 50%, #f0f2f5 75%); background-size: 200% 100%; animation: loading 1.5s infinite; border-radius: 4px; }
@keyframes loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Mobile */
@media (max-width: 768px) {
  .container { padding: 12px 8px; }
  .post-card { border-radius: 0; margin-bottom: 8px; }
  .create-post { border-radius: 0; }
  .create-post-input { font-size: 16px; padding: 12px 16px; }
  input[type="text"], input[type="email"], input[type="password"], textarea, .form-control { font-size: 16px !important; padding: 12px !important; }
}

/* Legacy */
.user-avatar { width: 28px; height: 28px; border-radius: 50%; margin-right: 4px; }
.checkbox-select-all-options { width: 100px; margin: 0 16px; }

/* Content Tables */
.news-content table, #postContent table, #newsContent table { 
  border-collapse: collapse; 
  width: auto; 
  margin: 16px 0; 
  text-align: left !important;
}
.news-content table td, .news-content table th,
#postContent table td, #postContent table th,
#newsContent table td, #newsContent table th { 
  border: 1px solid #ddd; 
  padding: 8px 12px; 
  text-align: center !important;
}
.news-content table th, #postContent table th, #newsContent table th { 
  background: #f0f2f5; 
  font-weight: 600;
}

/* Dark Mode */
body.dark-mode { background: #18191a; color: #e4e6eb; }
/* body.dark-mode .navbar { background: #242526 !important; } */
/* body.dark-mode .nav-link { color: #b0b3b8 !important; }
body.dark-mode .nav-link:hover { background: #3a3b3c; } */
body.dark-mode .post-card, body.dark-mode .create-post { background: #242526; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
body.dark-mode .post-meta h6, body.dark-mode .post-title { color: #e4e6eb; }
body.dark-mode .post-text { color: #b0b3b8; }
body.dark-mode .post-meta small { color: #8a8d91; }
body.dark-mode .btn-action { color: #b0b3b8; }
body.dark-mode .btn-action:hover { background: #3a3b3c; }
body.dark-mode .create-post-input { background: #3a3b3c; color: #e4e6eb; }
body.dark-mode .create-post-input:hover { background: #4e4f50; }
body.dark-mode .alert-info { background: #1c2b33; border-color: #2d5a7b; color: #e4e6eb; }
body.dark-mode .card { background: #242526; color: #e4e6eb; border-color: #3a3b3c; }
body.dark-mode .card-body { background: #242526; }
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4, body.dark-mode h5 { color: #e4e6eb; }
body.dark-mode .form-control { background: #3a3b3c; color: #e4e6eb; border-color: #4e4f50; }
body.dark-mode .form-control:focus { background: #4e4f50; color: #e4e6eb; border-color: #667eea; }
body.dark-mode .btn-light { background: #3a3b3c; color: #e4e6eb; border-color: #4e4f50; }
body.dark-mode .btn-light:hover { background: #4e4f50; }
body.dark-mode .news-content table th, body.dark-mode #postContent table th, body.dark-mode #newsContent table th { background: #3a3b3c; color: #e4e6eb; }
body.dark-mode .news-content table td, body.dark-mode #postContent table td, body.dark-mode #newsContent table td { border-color: #4e4f50; color: #b0b3b8; }
