/* Modern Foundation & Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary-color: #0f172a;    /* Deep Navy */
  --accent-color: #2563eb;     /* Sporty Blue */
  --success-color: #16a34a;    /* Goal Green */
  --bg-color: #f8fafc;         /* Soft Gray */
  --card-bg: #ffffff;          /* Pure White */
  --text-main: #1e293b;        /* Slate 800 */
  --text-muted: #64748b;       /* Slate 500 */
  --border-color: #e2e8f0;     /* Slate 200 */
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Global Reset & Typography */
body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  color: var(--primary-color);
  font-weight: 700;
  margin-top: 0;
}

/* Modern Card Wrapper (Replaces .box) */
.box, .card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
  border: none; /* Lighter look without hard borders */
}

/* Sidebar Overrides */
.sidebar {
  background-color: var(--primary-color) !important;
  color: white;
}

/* Responsive Table Wrapper */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
}

.card {
  scroll-margin-top: 80px;
}

/* Mobile Stats List */
.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}

.stat-label {
  color: #64748b;
  font-size: 14px;
  flex: 1;
}

.stat-value {
  font-weight: 700;
  color: #1e293b;
  text-align: right;
  flex: 1;
}

.stat-value.position {
  font-size: 24px;
  color: var(--primary-color);
}

.stats-divider {
  margin: 15px -8px 10px -8px;
  background: #f8fafc;
  padding: 6px 12px;
  font-size: 11px;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Live Overlay */
.live-overlay {
  display: block;
}

.live-overlay-header {
  display: none; /* Hidden on desktop */
}

@media (max-width: 768px) {
  .live-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    background: #f8fafc;
    z-index: 4000;
    display: none; /* Hide by default on mobile, triggered by JS */
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
  }

  .live-overlay.open {
    transform: translateY(0);
    display: flex;
  }

  .live-overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    flex-shrink: 0;
  }

  .live-overlay-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--primary-color);
  }

  .close-overlay {
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #475569;
  }

  .live-overlay .match-cards-container {
    padding: 20px 10px;
    overflow-y: auto !important;
    flex: 1;
    display: block !important;
  }
}

.chart-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: white;
  border-radius: 8px;
}

/* Ensure the SVG inside the chart has enough room to be readable */
.chart-container svg {
  min-width: 500px;
}

@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }

  .box, .card {
    padding: 12px 8px !important;
    margin-bottom: 12px;
    border-radius: 0;
    width: 100% !important;
    box-sizing: border-box;
  }

  /* Override legacy scaffold margins/paddings that create 'frame' */
  div.contents {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .main-wrapper {
    padding: 8px 0 !important; /* Vertical only, no horizontal frame */
  }

  /* Force tables to be full width without forced scrolling */
  table, table.rankingTable, table.rankingTeam, table.bet, table.infoTable {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    font-size: 11px !important;
  }

  table th, table td,
  table.rankingTable th, table.rankingTable td,
  table.rankingTeam th, table.rankingTeam td,
  table.bet th, table.bet td,
  table.infoTable th, table.infoTable td {
    padding: 6px 2px !important;
    word-wrap: break-word;
  }

  td.statsLink {
    width: auto !important; /* Remove fixed widths on specific columns */
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .table-responsive {
    margin: 0 -8px;
    width: calc(100% + 16px);
    overflow-x: hidden; /* Completely disable horizontal scrolling */
  }

  /* Statistics and news specific overrides */
  div.posting {
    width: 100% !important;
    box-sizing: border-box;
  }
}

.sidebar-header {
  border-bottom: 1px solid rgba(255,255,255,0.1) !important;
}

.sidebar-header h2 {
  color: white !important;
}

.sidebar-nav a {
  color: rgba(255,255,255,0.7) !important;
  font-weight: 500;
}

.sidebar-nav a:hover {
  background-color: rgba(255,255,255,0.1) !important;
  color: white !important;
}

.sidebar-nav a.active {
  background-color: var(--accent-color) !important;
  color: white !important;
  border-left: 4px solid white !important;
}

.live-indicator-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #ef4444; /* Red */
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
  box-shadow: 0 0 0 rgba(239, 68, 68, 0.4);
  animation: pulse-sidebar 2s infinite;
}

@keyframes pulse-sidebar {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.sidebar-context {
  background-color: rgba(0,0,0,0.2) !important;
  border-bottom: 1px solid rgba(255,255,255,0.1) !important;
}

.sidebar-context span {
  color: rgba(255,255,255,0.5) !important;
}

.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,0.1) !important;
}

.sidebar-footer a {
  color: rgba(255,255,255,0.5) !important;
}

/* Tables Modernization */
table {
  border-collapse: collapse;
  width: 100%;
}

.runningComps, .rankingTeam, .infoTable, .userTable, .resultsTable {
  width: 100% !important;
  font-size: 14px;
  margin-bottom: 10px;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover td {
  background-color: #f8fafc !important;
}

.resultsTable td {
  vertical-align: middle;
  padding: 12px 8px;
}

.resultsTable .score {
  font-weight: 700;
  font-size: 16px;
  color: var(--primary-color);
  text-align: center;
}

.resultsTable .date-col {
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
}

.resultsTable .team-name {
  font-weight: 500;
}

.resultsTable .points-col {
  text-align: center;
  font-weight: 600;
}

.resultsTable .my-bet {
  color: var(--accent-color);
  font-weight: 700;
}

.resultsTable .wrong-bet {
  color: #ef4444; /* Red */
}

.resultsTable .right-bet {
  color: var(--success-color);
}

.runningComps td, .rankingTeam td, .infoTable td, .userTable td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
}

.runningComps tr:nth-child(even), .rankingTeam tr:nth-child(even), .infoTable tr:nth-child(even) {
  background-color: #fafafa;
}

.rankingTeam th {
  background-color: var(--bg-color);
  color: var(--primary-color);
  font-weight: 600;
}

th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 12px 16px;
  border-bottom: 2px solid var(--border-color);
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}

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

tr:hover td {
  background-color: #f8fafc;
}

/* Match Cards (for ongoing/upcoming matches) */
.match-cards-container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 10px;
  margin-bottom: 20px;
}

.match-card {
  width: 320px;
  flex: 0 0 auto;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.match-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-color);
  background-color: white;
}

.card-overlay-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.card-overlay-link:hover {
  background: none !important;
  color: inherit !important;
}

.match-card .live-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #fee2e2;
  color: #ef4444;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  text-transform: uppercase;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

.match-card .match-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.match-card .teams-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.match-card .team-v-team {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.match-card .team {
  font-weight: 600;
  font-size: 15px;
}

.match-card .vs-score {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-color);
  min-width: 60px;
  text-align: center;
}

.match-card .bet-info {
  background: var(--bg-color);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
}

.match-card .admin-actions {
  margin-top: 12px;
  text-align: right;
}

/* Tabs Navigation */
.modern-tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
  padding-bottom: 5px;
}

.modern-tabs a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius) var(--radius) 0 0;
  transition: all 0.2s;
}

.modern-tabs a:hover {
  background-color: var(--hover-bg);
  color: var(--primary-color);
}

.modern-tabs a.active {
  color: var(--accent-color);
  border-bottom: 3px solid var(--accent-color);
}

/* Buttons */
input[type="submit"], button {
  background-color: var(--accent-color);
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, background-color 0.2s;
}

input[type="submit"]:hover, button:hover {
  background-color: #1d4ed8; /* Darker blue */
  transform: translateY(-1px);
}

/* Content Width Control */
.main-wrapper {
  max-width: 1200px;
  margin-left: var(--sidebar-width);
}

@media (max-width: 768px) {
  .main-wrapper {
    margin-left: 0;
    padding: 16px;
  }
}
body {
	background-color: #c6d8e333;
	color: #333;
}

td.profitranking_space
{
	padding-left: 20px;
	padding-right: 20px;
}

div.header {
	margin-top: 20px;
}

body, p, ol, ul, th, td {
  font-family: verdana, arial, helvetica, sans-serif;
  font-size:   13px;
  line-height: 18px;
  
}

ol.rules li
{
	padding-top: 3px;
	padding-bottom: 3px;
}


h3.runningComps
{
	margin-top: 5px;
	margin-bottom: 5px;
}

.headline1 {

  font-family: verdana, arial, helvetica, sans-serif;

  font-size: 30px;

  font-weight: bolder;

}



.headline2 {

  font-family: verdana, arial, helvetica, sans-serif;

  font-size: 20px;

  font-weight: bold;
  padding-left: 5px;

}

p.alert {
	padding: 10px;
	background-color: #c6d8e37d;
	border-style: dotted;
	border-width: 1px;
	color: red;
	border-color: black;
}

td.betsRanking 
{
	width: 10px;
}

td.betsProgress
{
	width: 40px;
}

#green
{
	color:green;
}

#red
{
	color:red;
}

p.notice {
	padding: 10px;
	background-color: #c6d8e37d;
	border-style: dotted;
	border-width: 1px;
	color: green;
	border-color: black;
}

div.news_box {
	border-style: dotted;
	border-width: 1px;
	border-color: Black;
	padding: 10px;
}

.inst_header {
    padding-left: 10px;
    padding-top: 7px;
	 font-weight: bold;
}

.frame_left {
    float:left;
    margin-left:-5px;
    margin-top:-4px;
    margin-bottom:-9px;
}

.frame_right {
    float: left;
    margin-top:-4px;
    margin-bottom:-9px;
}

.frame_bottom {
    clear:both;
}

.float_left {
	float: left;
	padding-right: 15px;
	margin-bottom: 15px;
}

.float_right {
	position: relative;
	left: 136px;
}

.align_right {
	text-align: right;
}

.instances {
    margin-top:-180px;
	 margin-left:20px;
    width:182px;
    height: 120px;
}
.clear {
	clear: both;
}

div.iphone img:hover {
	background: transparent;
}

.trio {
	border: none;
}

.trio:hover {
	
}

h1 {
	font-weight: lighter;
	font-size: 20px;
}

h2 {
	font-weight: lighter;
	font-size: 18px;
}

table {
	width: 100%;
}

table.results tr {
	height: 25px;
	border-style: dotted;
	border-width: 1px;
}

.firstrow {
	padding-left: 10px;
}

th.competition {
	padding-left: 50px;
}

table.rankingTable {
	width: 80%;
}

table.rankingTable th {
	padding-left: 5px;
}

table.rankingTeam {
	width: 40%;
}

table.bet {
	width: 30%;
}

table.runningComps
{
	width: 40%;
}

table.profitranks
{
	width:auto;
}

table.profitranks th
{
	padding-left: 10px;
	padding-right: 10px;
	text-align: right;
}

table.profitranks td
{
	padding-left: 10px;
	padding-right: 10px;
}

table.profitranks td #profitrank_fraction
{
	width: 80px;
	text-align: right;
}

table tr.tablerowcolor1
{
    background-color: #eff0f1;
}

table tr.tablerowcolor2
{
    background-color: #cad2d7;
}

table tr.space
{
	height: 15px;
}

td.decimal
{
	text-align: right;
	padding-right: 10px;
}

table.infoTable {
	width: 525px;
}

table.infoTable td,
table.bet td {
	margin-right: 10px;
	padding-top: 3px;
	padding-bottom: 3px;
	padding-left: 5px;
	line-height: normal;
	width: 50%;
}

table th {
	text-align: left;
}

th.right {
	text-align: right;
}

th.center {
	text-align: center;
}

td.acronym {
	padding-right: 10px;
}

td.acronym a {
	text-decoration: none;
}

td.statsLink {
	width: 250px;
	padding-left: 5px;
}

td.OG {
	text-align: right;
	padding-right: 10px;
	width: 5%;
}

td.ranking, th.ranking {
	width: 30px;
	padding-right: 10px;
	text-align: right;
}

table.bonusAllocation {
	width: auto;
}

table.bonusAllocation tr {
	border-bottom: dotted;
}

td.profit {
	text-align: right;
	padding-right: 20px;
	padding-left: 20px;
}

td.activateNews {
	width: 100px;
}
.activateNewsButton {
	vertical-align: middle;
}

td.statsLink a {
	text-decoration: none;
}

td.statsLink a:hover {
	font-weight: bolder;
}

pre {
  background-color: #eee;
  padding: 10px;
  font-size: 11px;
}

a { color: #000; }
a:hover { color: #fff; background-color:#000; }

div.instanceTag a:hover {
	background: transparent;
}

div.instanceTag {
	float:right;
}
.fieldWithErrors {
  padding: 2px;
  background-color: red;
  display: table;
}

.separator {
	margin-top: 10px;
	margin-bottom: 10px;
}

.box {
	padding: 10px;
	border: 2px solid #004f9f;
	background-color: #c6d8e37d;
}

.whitebox {
	padding: 10px;
	border: thin;
	width: 78%;
	background-color: #FBFBFB;
	border-style: dotted;
	border-width: 1px;
}

.third {
	width: 200px;
	padding-right: 20px;
}

.updateInstanceButton {
	float: right;
}
table.OneTwoX {
   width: 500px;
}

td.align_right {
	padding-right: 15px;
}

tr.empty {
	height: 20px;
}
.tabspace {
	width: 120px;
}

.competitionPreHeader {
	font-size: 12px;
	font-weight: bolder;
	padding-top: 10px;
}

.competitionHeader {
	font-size: 17px;
	font-weight: normal;
	padding-top: 10px;
	clear: both;
	float: left;
}

.competitionTime {
	padding-top: 12px;
	padding-left: 10px;
	margin-bottom: 5px;
	float: left;
}

div.preInfosFor {
	width: 260px;
	float: left;
	margin-right: 10px;
}

div.infosFor {
	font-size: large;
	font-weight: bolder;
	margin-top: 15px;
	margin-bottom: 15px;
}

div.infosFor a {
	text-decoration: none;
}

td.position {
	font-size: 25px;
	line-height: normal;
	padding-left: 10px;
}

img {
	border: none;
}

a.logo:hover {
	background: transparent;
}

.submitButton input {
	margin-top: 10px;
	text-align: right;
}
.green {
	color: green;
	font-weight: bolder;
}

.red {
	color: red;
	font-weight: bolder;
}

.green {
	color: green;
}

.attention {
	color: Red;
}

.warning {
	color: #FF8000;
}

.info  {
	color: green;
}

.lightGreen {
	color: #00B900;
}
.floatright {
	float: right;
}

#ErrorExplanation {
  width: 400px;
  border: 2px solid red;
  padding: 7px;
  padding-bottom: 12px;
  margin-bottom: 20px;
  background-color: #f0f0f0;
}

#ErrorExplanation h2 {
  text-align: left;
  font-weight: bold;
  padding: 5px 5px 5px 15px;
  font-size: 12px;
  margin: -7px;
  background-color: #c00;
  color: #fff;
}

#ErrorExplanation p {
  color: #333;
  margin-bottom: 0;
  padding: 5px;
}

#ErrorExplanation ul li {
  font-size: 12px;
  list-style: square;
}

div.uploadStatus {
  margin: 5px;
}

div.progressBar {
  margin: 5px;
}

div.progressBar div.border {
  background-color: #fff;
  border: 1px solid grey;
  width: 100%;
}

div.progressBar div.background {
  background-color: #333;
  height: 18px;
  width: 0%;
}

div.contents {
	margin: 20px;
	padding: 10px;
}

div.posting {
	width: 79%;
    padding-top: 2px;
    padding-bottom: 3px;
    padding-left: 5px;
    padding-right: 5px;
	margin-bottom: 5px;
    background-color: #FBFBFB;
	border-style: dotted;
	border-width: 1px;
}

div.innerbox 
{
	background-color: #FBFBFB;
	border-style: dotted;
	border-width: 1px;
	padding: 5px;
	margin-top: 5px;
	margin-bottom: 10px;
}

b.innerboxtitle
{
	padding-top: 15px;
}

/*
div.postingHeader {
	padding-bottom: 5px;
}

div.postingBody {
	padding-top: 5px;	
}
*/

div.activeTab {
	margin-left: 4px;
	
}

div.message textarea {
	width: 80%;
	height: 60px;
}
div.activeTab a {
	color: Black;
	font-weight: bold;
}

div.activeTab a:hover { color: #fff; background-color:#000; }

span.activeTab {
	margin: 10px;
}

span.activeTab a {
	color: Black;
	font-weight: bold;
}

span.activeTab a:hover { color: #fff; background-color:#000; }

div.competition_description {
	
	margin-top: 10px;
	font-weight: bold;
}

span.quotes {
	padding-right: 10px;
}

div.menu span {
	margin: 5px;
	font: Arial;
	font-size: 14px;
}

div.submenu span {
	margin: 5px;
	font: Arial;
	font-size: 14px;
}

div.menu {
	margin-left: 10px;
	padding-top: 13px;
	padding-bottom: 10px;
}
/* Base Sidebar Styling */
:root {
  --sidebar-width: 250px;
  --header-height: 60px;
  --bg-color: #f4f7f6;
  --text-color: #333;
  --hover-bg: #e2e8f0;
  --active-bg: #cbd5e1;
  --brand-color: #0056b3;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
}

/* The Mobile Header (Hidden on Desktop) */
/* The Mobile Header (Hidden on Desktop) */
.mobile-header {
  display: none;
}

@media (max-width: 768px) {
  .mobile-header {
    display: flex;
    background-color: white;
    height: var(--header-height);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
    width: 100%;
    box-sizing: border-box;
  }

  .mobile-logo-link {
    flex: 1;
    text-align: center;
    display: flex;
    justify-content: center;
  }

  .mobile-header .hamburger {
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    margin-right: 15px;
    color: var(--brand-color);
  }

  .mobile-header .mobile-logo {
    height: 40px;
    max-width: 120px; /* Prevent logo from pushing other elements out */
    object-fit: contain;
  }

  .mobile-live-link {
    display: flex;
    align-items: center;
    background: #fef2f2;
    color: #dc2626;
    padding: 10px 14px; /* Increased tap area */
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid #fee2e2;
    position: relative;
    z-index: 3000; /* Extremely high z-index */
    pointer-events: auto !important;
  }
}

.live-dot {
  width: 8px;
  height: 8px;
  background-color: #dc2626;
  border-radius: 50%;
  margin-right: 6px;
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0% { opacity: 1; }
  50% { opacity: 0.3; }
  100% { opacity: 1; }
}

/* The Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh; /* Fallback */
  height: 100dvh; /* Use dynamic viewport height for mobile browsers */
  background-color: white;
  box-shadow: 2px 0 5px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease-in-out;
  z-index: 1001;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-header {
  padding: 15px;
  text-align: center;
  border-bottom: 1px solid #eee;
  flex-shrink: 0; /* Don't squash the header */
}

.sidebar-header img {
  max-width: 80px;
  margin-bottom: 5px;
}

.sidebar-header h2 {
  font-size: 16px;
  margin: 0;
  color: var(--brand-color);
}

/* Instance Switcher in Sidebar */
.sidebar-context {
  padding: 10px 15px;
  background-color: var(--bg-color);
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

.sidebar-context span {
  display: block;
  font-size: 12px;
  color: #666;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.sidebar-context select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: white;
  font-size: 14px;
}

/* Navigation Links */
.sidebar-nav {
  flex-grow: 1;
  padding: 10px 0;
}

.sidebar-nav a {
  display: block;
  padding: 12px 20px;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s;
}

.sidebar-nav a:hover {
  background-color: var(--hover-bg);
}

.sidebar-nav a.active {
  background-color: var(--active-bg);
  color: var(--brand-color);
  border-left: 4px solid var(--brand-color);
}

/* User Section at Bottom */
.sidebar-footer {
  padding: 10px 0;
  border-top: 1px solid #eee;
  flex-shrink: 0;
}

.sidebar-footer a {
  display: block;
  padding: 10px 20px;
  color: #666;
  text-decoration: none;
  font-size: 14px;
}

.sidebar-footer a:hover {
  background-color: var(--hover-bg);
  color: var(--text-color);
}

/* Main Content Area */
.main-wrapper {
  margin-left: var(--sidebar-width);
  padding: 20px;
  transition: margin-left 0.3s ease-in-out;
}

/* Mobile Overlay (Darken background when sidebar open) */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
}

/* Mobile Specific Styles */
@media (max-width: 768px) {
  .mobile-header {
    display: flex;
  }
  
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .sidebar-overlay.open {
    display: block;
  }
  
  .sidebar-nav a {
    padding: 15px 20px;
    font-size: 16px;
  }
  
  .sidebar-context select {
    font-size: 16px; /* Prevents iOS auto-zoom on focus */
    padding: 10px;
  }

  .sidebar-header h2 {
    font-size: 18px;
  }

  .main-wrapper {
    margin-left: 0;
    padding: 10px;
    padding-top: calc(var(--header-height) + 10px);
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *




 */
