/* Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap");

/* Variables & Themes */
:root[data-theme="dark"] {
  --bg-color: #0c0c0c;
  --surface-color: #161616;
  --surface-alt: #222222;
  --primary-color: #f75c03;
  --secondary-color: #444;
  --text-main: #e0e0e0;
  --text-dim: #888;
  --border-color: #2a2a2a;
  --bg-overlay: rgba(12, 12, 12, 0.85);
}

:root[data-theme="light"] {
  --bg-color: #f5f5f7;
  --surface-color: #ffffff;
  --surface-alt: #efeff4;
  --primary-color: #f75c03;
  --secondary-color: #ccc;
  --text-main: #1d1d1f;
  --text-dim: #86868b;
  --border-color: #d2d2d7;
  --bg-overlay: rgba(245, 245, 247, 0.8);
}

/* Default to Dark if not specified */
:root {
  --bg-color: #0c0c0c;
  --surface-color: #161616;
  --surface-alt: #222222;
  --primary-color: #f75c03;
  --secondary-color: #444;
  --text-main: #e0e0e0;
  --text-dim: #888;
  --border-color: #2a2a2a;
  --border-radius: 8px;
  --spacing: 15px;
  --sidebar-width: 300px;
  --bg-overlay: rgba(12, 12, 12, 0.85);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
}

body {
  font-family: "Roboto", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.4;
  transition: background-color 0.3s, color 0.3s;
}

/* Auth Pages */
.auth-body {
  background: url('../img/acces.jpg') no-repeat center center / cover !important;
  background-attachment: fixed !important;
}

.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: var(--bg-overlay);
}

.login-form {
  background: var(--surface-color);
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  text-align: center;
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.login-form input, .login-form select {
  width: 100%;
  margin-bottom: 15px;
  padding: 10px;
  background: var(--surface-alt);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 6px;
}

/* Global App Layout */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background-color: var(--surface-color);
  border-right: 1px solid var(--border-color);
  padding: 20px;
  flex-shrink: 0;
  overflow-y: auto;
  position: sticky;
  top: 0;
  height: 100vh;
  transition: width 0.3s ease, background-color 0.3s;
}

.sidebar.collapsed {
  width: 60px;
  padding: 20px 10px;
}

.sidebar.collapsed > *:not(.sidebar-toggle-alt) {
  display: none;
}

.sidebar.collapsed .sidebar-toggle-alt .toggle-text {
  display: none;
}

.app-content {
  flex-grow: 1;
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

header h1 {
  font-size: 1.5rem;
  font-weight: 400;
}

/* Timer Section */
.timer-section {
  text-align: center;
  margin-bottom: 30px;
  background: var(--surface-color);
  padding: 20px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.timer-display {
  font-family: "Share Tech Mono", monospace;
  font-size: 4rem;
  font-weight: 700;
  color: var(--primary-color);
  text-shadow: 0 0 15px rgba(247, 92, 3, 0.3);
  margin: 10px 0;
}

.timer-inputs-row {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

input, select, button {
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--surface-alt);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

button {
  cursor: pointer;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 20px;
}

/* Table Style */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th {
  text-align: left;
  padding: 10px;
  color: var(--text-dim);
  font-weight: 500;
  border-bottom: 2px solid var(--border-color);
}

td {
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
}

/* Accordion Specifics */
details.entry-details {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  margin-bottom: 5px;
}

summary.entry-summary {
  padding: 10px;
  cursor: pointer;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 140px 100px 80px 30px;
  align-items: center;
  gap: 10px;
}

summary.entry-summary:hover {
  background: var(--surface-alt);
}

.entry-content {
  padding: 10px 15px;
  background: var(--surface-alt);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-color);
}

/* Sidebar Specifics */
.sidebar-header {
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar h2, .sidebar h3 {
  font-size: 1.1rem;
  margin-bottom: 15px;
}

.sidebar-toggle-alt {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border-color);
  padding: 10px 15px;
  cursor: pointer;
  margin-bottom: 5px;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 6px;
  transition: all 0.2s;
}

.sidebar-toggle-alt:hover, .sidebar-toggle-alt.active {
  color: #fff;
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.sidebar-toggle-alt.active {
  box-shadow: 0 0 15px rgba(247, 92, 3, 0.4);
}

/* Adjustments for inputs in sidebar */
.sidebar input, .sidebar select {
  width: 100%;
  margin-bottom: 10px;
}

.trash-list li {
  font-size: 0.85rem;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

/* Projects View Tables */
#projectsView th {
  background: var(--surface-alt);
  border-radius: 4px 4px 0 0;
}

#projectsView tr:hover {
  background: rgba(247, 92, 3, 0.05);
}

.projects-list-full table {
  margin-bottom: 20px;
}

/* Responsive Grid */
@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* Icon Buttons */
.btn-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s, transform 0.1s;
  color: inherit;
}

.btn-icon:hover {
  opacity: 0.7;
}

.btn-icon:active {
  transform: scale(0.95);
}

.action-icon {
  width: 18px;
  height: 18px;
}

.sidebar-toggle-alt i {
  width: 20px;
  height: 20px;
}



.sidebar-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 15px;
}