/* === Base Layout === */
body {
  font-family: sans-serif;
  background: var(--bg-color, #f5f5f5);
  color: var(--text-color, #000);
  margin: 0;
  display: flex;
  flex-wrap: wrap;
}

/* === Color Themes === */
:root {
  --bg-color: #f5f5f5;
  --text-color: #000;
  --card-bg: white;
  --primary: #007acc;
  --primary-light: #e6f2ff;
  --border-color: #ccc;
  --danger-color: #cc0000;
}

.dark-mode {
  --bg-color: #1e1e1e;
  --text-color: #eee;
  --card-bg: #2a2a2a;
  --primary: #3794ff;
  --primary-light: #283c4d;
  --border-color: #444;
  --danger-color: #cc0000;
}

body.dark-mode {
  background: var(--bg-color);
  color: var(--text-color);
}

/* === Tool Cards === */
.tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  width: 100%;
}

.tool-container {
  width: 100%;
  height: 100%;
  min-width: 0;
  background: var(--card-bg);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  box-sizing: border-box;
}

.tool-container.full-width {
  grid-column: 1 /-1;
}

/* === Drop Zone === */
.drop-zone {
  border: 2px dashed var(--primary);
  border-radius: 6px;
  padding: 40px 20px;
  background: var(--primary-light);
  color: var(--primary);
  cursor: pointer;
  transition: background 0.2s;
}

.drop-zone.dragover {
  background: #dbeeff;
}

/* === Forms === */
input[type="text"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  box-sizing: border-box;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-size: 14px;
  background-color: white;
  color: #000;
}

.dark-mode input,
.dark-mode textarea,
.dark-mode select {
  background-color: #333;
  color: #fff;
  border-color: #666;
}

/* === Buttons === */
button {
  padding: 10px 16px;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover {
  background-color: #005fa3;
}

/* === Status Text === */
.status {
  margin-top: 15px;
  font-size: 14px;
  color: #444;
}

/* === Package List Scrollbox === */
#package-list {
  max-height: 150px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  padding: 10px;
  text-align: left;
}

/* === Login Page === */

.login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh; /* Full screen height */
  width: 100%;
}

.login-box {
  width: 300px;
  padding: 30px;
  background: var(--card-bg);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  text-align: center;
  margin: auto;
}

.login-box h2 {
  margin-bottom: 20px;
}

.login-box input[type="text"],
.login-box input[type="password"] {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  box-sizing: border-box;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-size: 14px;
}

.login-box button {
  width: 100%;
  padding: 10px;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  cursor: pointer;
}

.login-box button:hover {
  background-color: #005fa3;
}

/* === Navbar === */
.navbar {
  width: 100%;
  background: var(--card-bg);
  color: var(--text-color);
  padding: 15px 30px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.navbar a {
  color: var(--text-color);
  text-decoration: none;
  margin-left: 20px;
}

.navbar a:hover {
  text-decoration: underline;
}

.navbar .right {
  display: flex;
  align-items: center;
}

/* === Theme Toggle Button === */
.theme-toggle {
  cursor: pointer;
  font-size: 16px;
  padding: 5px 10px;
  margin-left: 15px;
  border-radius: 4px;
}

.dashboard {
  width:100%;
  margin: 1%;
  max-width: none;
  box-sizing: border-box;
}

.dashboard-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
}

.card {
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 20px;
  text-align: center;
}

.card.full-width{
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.recent-list {
  list-style: none;
  padding: 0;
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 15px;
}

.recent-list li {
  padding: 6px 0;
  border-bottom: 1px solid #eee;
}

.recent-list li:last-child {
  border-bottom: none;
}

.recent-uploads-container {
  max-height: 300px;
  overflow-y: auto;
  padding-right: 5px; /* room for scrollbar */
}

.type-breakdown {
  list-style: none;
  padding: 0;
  margin-top: 10px;
}

.type-breakdown li {
  padding: 4px 0;
  border-bottom: 1px solid #ccc;
  font-size: 14px;
}

.material-symbols {
  vertical-align: middle;
  font-size: 20px;
  margin-right: 5px;
}

.material-symbols-outlined {
  font-variation-settings:
  'FILL' 0,
  'wght' 400,
  'GRAD' 0,
  'opsz' 24
}

.material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;  /* Preferred icon size */
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;

  /* Support for all WebKit browsers. */
  -webkit-font-smoothing: antialiased;
  /* Support for Safari and Chrome. */
  text-rendering: optimizeLegibility;

  /* Support for Firefox. */
  -moz-osx-font-smoothing: grayscale;

  /* Support for IE. */
  font-feature-settings: 'liga';

  vertical-align: middle;
  margin-right: 5px;

}

/* Sidebar */
.sidebar {
  width: 60px;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  background-color: var(--card-bg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  width: 250px;
  transition: width 0.3s ease !important;
}

.main-content {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(900px, 1fr));
  gap: 30px;
  padding: 20px;
  transition: margin-left 0.3s ease;
  box-sizing: border-box;
  margin: 0 auto;
}

#main-wrapper{
  width: 100%;
  transition: margin-left 0.3s ease;
  margin-left: 250px; /* default for expanded sidebar */
  justify-content: center;
}

.sidebar.collapsed ~ #main-wrapper {
  margin-left: 60px;
}

.sidebar.expanded ~ .main-content {
  margin-left: 250px;
}

.sidebar.collapsed {
  width: 60px;
}

.sidebar a,
.sidebar button {
  display: flex;
  align-items: center;
  padding: 15px;
  border: none;
  background: none;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
}

.sidebar .material-icons {
  font-size: 20px;
  margin-right: 10px;
}

.label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display:block;
}

.sidebar.collapsed .label {
  display: none;
}

.sidebar-top, .sidebar-bottom {
  display: flex;
  flex-direction: column;
}

.sidebar-bottom {
  padding: 10px;
}

.sidebar-logo {
  font-weight: bold;
  padding: 15px;
  display: flex;
  align-items: center;
  font-size: 18px;
}

.rotate-icon {
  transition: transform 0.3s ease;
}

.sidebar.collapsed .rotate-icon {
  transform: rotate(-180deg);
}

#theme-icon,
#sidebar-toggle-icon {
  display: inline-block;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

#theme-icon.rotate,
#sidebar-toggle-icon.rotate {
  transform: rotate(180deg);
}


.tabs {
    margin-bottom: 20px;
}

.tab-button {
    background-color: var(--primary-light);
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    color: var(--text-color);
}

.tab-button.active {
    background-color: var(--primary);
    font-weight: bold;
    color: #fff;
}

.tab-content {
    display: none;
}


button.danger {
  background: var(--danger-color);
}


.user-update-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

user-update-form input,
.user-update-form button {
    padding: 6px 10px;
    font-size: 14px;
    line-height: 1.4;
    height: 36px;
    box-sizing: border-box;
}

.user-update-form {
    display: flex;
    gap: 8px;
    align-items: center;
}


.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0; top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--card-bg);
    color: var(text-color);
    margin: 10% auto;
    padding: 20px;
    width: 300px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.close {
    float: right;
    font-size: 20px;
    cursor: pointer;
}

.modal-content button {
    margin: 5px;
}

.modal.with-sidebar {
  padding-left: 250px; /* match your expanded sidebar margin */
  width: calc(100% - 250px);
}

.modal.with-sidebar.collapsed {
  padding-left: 60px;  /* match collapsed sidebar */
  width: calc(100% - 60px);
}

.suite-card {
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
  text-align:left;
}

.suite-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.suite-header h4 {
  margin: 0 0 4px 0;
  font-size: 18px;
  font-weight: 600;
}

.suite-desc {
  font-size: 13px;
  color: #666;
  margin: 0;
}

.expand-btn {
  background: none;
  color: var(--text-colour);
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.suite-activity-list {
  list-style: none;
  padding: 10px 0 0 0;
  margin: 0;
  border-top: 1px solid var(--border-color);
}

.suite-activity-list li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px solid #eee;
}

.suite-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.activity-name {
  font-weight: 500;
}

.activity-type {
  font-style: italic;
  font-size: 13px;
  opacity: 0.7;
}

.empty-msg {
  font-style: italic;
  color: #999;
  font-size: 14px;
  margin-top: 10px;
}


.activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.activity-entry {
  display: flex;
  gap: 15px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.activity-thumb img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
}

.activity-info {
  flex: 1;
}

.activity-info strong {
  display: block;
  font-size: 15px;
}

.activity-info p {
  font-size: 13px;
  margin: 5px 0;
  color: #555;
}

.activity-info a {
  font-size: 13px;
  color: var(--primary);
}

.activity-scrollbox {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px;
  background: var(--card-bg);
}

.activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.package-list label {
  display: block;
  font-size: 14px;
}

.chart-wrapper {
  width: 100%;
  max-width: 1000px;
  margin: 30px auto;
  padding: 10px;
  border: 1px solid #ddd;
  background: var(--card-bg);
  color: var(--text-color);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.chart-wrapper canvas {
  width: 100% !important;
  height: 300px !important;
  max-height: 300px;
  display: block;
}

/* === Smooth Theme Transitions === */
body,
.tool-container,
.card,
.navbar,
.login-box,
.recent-list,
.sidebar,
.material-icons,
.activity-scrollbox,
.chart-wrapper,
canvas,
input,
textarea,
select,
button,
h1, h2, h3, h4, h5, p, li, ul, span {
  transition:
    background-color 0.4s ease,
    color 0.4s ease,
    border-color 0.4s ease,
    box-shadow 0.3s ease,
    transform 0.3s ease,
    opacity 0.3s ease !important;
}
