/* Modern Directory Tree Stylesheet - Cleaned Up Version */

:root {
  --primary-color: #3a86ff;
  --secondary-color: #8338ec;
  --success-color: #38b000;
  --error-color: #e63946;
  --light-bg: #f8f9fa;
  --dark-text: #212529;
  --medium-text: #495057;
  --light-text: #6c757d;
  --border-color: #dee2e6;
  --hover-bg: #e9ecef;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --border-radius: 8px;
}

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

body {
  display: flex;
  height: 100vh;
  margin: 0;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    avenir next,
    avenir,
    segoe ui,
    helvetica neue,
    Adwaita Sans,
    Cantarell,
    Ubuntu,
    roboto,
    noto,
    helvetica,
    arial,
    sans-serif;
  color: var(--dark-text);
  background-color: var(--light-bg);
}

/* Sidebar Styles - Reduced padding */
#sidebar {
  width: 320px;
  background-color: white;
  box-shadow: var(--shadow);
  padding: 5px;
  overflow-y: auto;
  z-index: 10;
}

#sidebar h1 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

/* Tree View Styles - Reduced spacing */
#tree {
  font-size: 0.9rem;
}

ul {
  list-style-type: none;
  padding-left: 0.4rem;
  margin-bottom: 0;
}

li {
  margin: 0.2rem 0;
  position: relative;
  line-height: 1.3;
}

.indicator {
  margin-right: 0.3rem;
  color: var(--primary-color);
  font-size: 0.75rem;
  transition: transform 0.2s ease;
  display: inline-block;
  width: 0.8rem;
  text-align: center;
}

li:has(> .hidden) > .indicator {
  transform: rotate(0deg);
}

li:not(:has(> .hidden)) > .indicator {
  transform: rotate(90deg);
}

.folder {
  cursor: pointer;
  color: var(--secondary-color);
  font-weight: 500;
  display: inline-block;
  padding: 0.15rem 0.3rem;
  border-radius: 3px;
  transition: background-color 0.2s ease;
}

.folder:hover {
  background-color: var(--hover-bg);
}

.file {
  cursor: pointer;
  color: var(--medium-text);
  padding: 0.15rem 0.3rem;
  margin-left: 1.1rem;
  border-radius: 3px;
  transition: all 0.2s ease;
  display: block;
}

.file:hover {
  color: var(--primary-color);
  background-color: var(--hover-bg);
}

.hidden {
  display: none;
}

/* Content Area Styles */
#content {
  flex-grow: 1;
  padding: 1.5rem;
  background-color: white;
  overflow-y: auto;
  padding-top: 0px;
}

#content h1 {
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
  color: var(--primary-color);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

#content h2 {
  font-size: 1.3rem;
  margin: 1.2rem 0 0.8rem;
  color: var(--secondary-color);
}

#file-content {
  line-height: 1.5;
}

/* Table Styles */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.2rem 0;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

th,
td {
  padding: 0.6rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background-color: var(--light-bg);
  font-weight: 600;
  color: var(--primary-color);
  position: sticky;
  top: 0;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover {
  background-color: var(--hover-bg);
}

/* Deal Status Indicators */
.deal {
  display: inline-flex;
  align-items: center;
  background-color: rgba(56, 176, 0, 0.15);
  color: var(--success-color);
  padding: 0.2rem 0.5rem;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.8rem;
  margin: 0.1rem;
  transition: transform 0.2s ease;
  border: 1px solid rgba(56, 176, 0, 0.2);
}

.deal:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 3px rgba(56, 176, 0, 0.2);
}

.dealred {
  display: inline-flex;
  align-items: center;
  background-color: rgba(230, 57, 70, 0.15);
  color: var(--error-color);
  padding: 0.2rem 0.5rem;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.8rem;
  margin: 0.1rem;
  transition: transform 0.2s ease;
  border: 1px solid rgba(230, 57, 70, 0.2);
}

.dealred:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 3px rgba(230, 57, 70, 0.2);
}

/* Utility Classes */
.truncate-text {
  display: inline-block;
  max-width: 30ch;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  vertical-align: middle;
}

/* Links */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  body {
    flex-direction: column;
  }

  #sidebar {
    width: 100%;
    max-height: 40vh;
  }

  #content {
    padding: 1rem;
  }
}

b,
h1,
h2,
th {
  font-weight: bold;
}
