
:root {
  --sidebar-bg: #20232a;
  --sidebar-width-compact: 80px;
  --sidebar-width-expanded: 220px;
  --transition-speed: 0.3s;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', sans-serif;
  display: flex;
  min-height: 100vh;
  background-color: #3e4352;
    color: white;
}

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width-compact);
  background-color: var(--sidebar-bg);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
  transition: width var(--transition-speed);
  z-index: 1000;
}

.sidebar.expanded {
  width: var(--sidebar-width-expanded);
  align-items: flex-start;
  padding-left: 20px;
}

.sidebar.hidden {
  transform: translateX(-100%);
}

.icon-container {
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s, padding 0.2s;
  padding: 10px 0;
  width: 100%;
}

.sidebar.expanded .icon-container {
  flex-direction: row;
  gap: 12px;
  align-items: center;
}

.icon-container:hover {
  background-color: #2a2d36;
  border-radius: 7px;
  padding-left: 10px;
}

.material-icons {
  font-size: 26px;
}

.label {
  font-size: 12px;
  margin-top: 4px;
}

.sidebar.expanded .label {
  margin-top: 0;
  font-size: 14px;
}

.hamburger {
  cursor: pointer;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
}

.sidebar.expanded .hamburger .label {
  display: inline;
  margin-left: 12px;
}

.main-content {
  margin-left: var(--sidebar-width-compact);
  padding: 20px;
  width: 100%;
  transition: margin-left var(--transition-speed);
}

.sidebar.expanded ~ .main-content {
  margin-left: var(--sidebar-width-expanded);
}

@media screen and (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    position: fixed;
    transition: transform 0.3s ease-in-out;
  }

  .sidebar.mobile-visible {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0 !important;
  }

  .mobile-toggle {
    display: block;
    position: fixed;
    top: 10px;
    left: 10px;
    background-color: #20232a;
    color: white;
    padding: 8px 12px;
    border-radius: 7px;
    z-index: 1100;
    cursor: pointer;
  }
}

a, a:hover, a:focus {
    color: white;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
}

.content-header h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: white;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.filters-section {
    background: #2d3748;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #4a5568;
}

.search-container {
    margin-bottom: 15px;
}

.search-box {
    position: relative;
    max-width: 400px;
}

.search-box .material-icons {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
}

.search-box input {
    width: 100%;
    padding: 12px 12px 12px 45px;
    border: 1px solid #4a5568;
    border-radius: 6px;
    font-size: 14px;
    background-color: #1a202c;
    color: white;
}

.search-box input::placeholder {
    color: #a0aec0;
}

.search-box input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.filter-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-controls select {
    padding: 8px 12px;
    border: 1px solid #4a5568;
    border-radius: 4px;
    min-width: 150px;
    background-color: #1a202c;
    color: white;
}

.filter-controls select:focus {
    outline: none;
    border-color: #007bff;
}

.per-page-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.per-page-controls label {
    color: #a0aec0;
    font-size: 14px;
}

.per-page-controls select {
    padding: 6px 10px;
    border: 1px solid #4a5568;
    border-radius: 4px;
    background-color: #1a202c;
    color: white;
    min-width: 80px;
}

.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #2d3748;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    text-align: center;
    border: 1px solid #4a5568;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 5px;
}

.stat-label {
    color: #a0aec0;
    font-size: 14px;
}

.table-container {
    background: #2d3748;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 20px;
    border: 1px solid #4a5568;
}

.articles-table {
    width: 100%;
    border-collapse: collapse;
}

.articles-table th {
    background: #1a202c;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #4a5568;
    cursor: pointer;
    user-select: none;
    color: white;
}

.articles-table th:hover {
    background: #2d3748;
}

.sort-icon {
    font-size: 16px;
    vertical-align: middle;
    margin-left: 5px;
    opacity: 0.5;
}

.articles-table td {
    padding: 12px;
    border-bottom: 1px solid #4a5568;
    vertical-align: top;
    color: white;
}

.articles-table tr:hover {
    background: #374151;
}

.article-id {
    font-weight: 600;
    color: #007bff;
}

.description-text {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-badge, .subcategory-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.category-badge {
    background: #1e40af;
    color: #dbeafe;
}

.subcategory-badge {
    background: #7c3aed;
    color: #ede9fe;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.active {
    background: #059669;
    color: #d1fae5;
}

.status-badge.inactive {
    background: #dc2626;
    color: #fecaca;
}

.article-actions {
    display: flex;
    gap: 5px;
}

.btn-icon {
    background: none;
    border: 1px solid #4a5568;
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a0aec0;
}

.btn-icon:hover {
    background: #374151;
}

.btn-icon.danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
}

.btn-icon.success:hover {
    background: #059669;
    border-color: #059669;
    color: white;
}

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    color: white;
}

.pagination-info {
    color: #a0aec0;
    font-size: 14px;
}

.pagination {
    display: flex;
    gap: 5px;
    align-items: center;
}

.pagination .btn {
    padding: 8px 12px;
    border: 1px solid #4a5568;
    background: #2d3748;
    color: #a0aec0;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
    cursor: pointer;
}

.pagination .btn:hover:not(:disabled) {
    background: #374151;
    color: white;
}

.pagination .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    background-color: #2d3748;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid #4a5568;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #4a5568;
}

.modal-header h2 {
    margin: 0;
    color: white;
}

.close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #a0aec0;
}

.close:hover {
    color: white;
}

.modal-body {
    padding: 20px;
    color: white;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #4a5568;
}

/* Button Styles */
.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-outline {
    background: transparent;
    color: #a0aec0;
    border: 1px solid #4a5568;
}

.btn-outline:hover {
    background: #374151;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-controls select {
        min-width: unset;
    }

    .per-page-controls {
        margin-left: 0;
        margin-top: 10px;
    }

    .stats-section {
        grid-template-columns: repeat(2, 1fr);
    }

    .articles-table {
        font-size: 14px;
    }

    .description-text {
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .stats-section {
        grid-template-columns: 1fr;
    }

    .pagination-container {
        flex-direction: column;
        gap: 10px;
    }
}