/* General Layout */
.dashboard-container {
  display: flex;
  height: 100vh;
  font-family: Arial, sans-serif;
}

/* Sidebar */
/* Sidebar */
.sidebar {
  background-color: #2b2e83;
  color: white;
  width: 230px;
  position: fixed;          /* ⭐ Sidebar stays fixed and full height */
  top: 0;
  left: 0;
  height: 100vh;            /* ⭐ Forces full screen height */
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}


/* ⭐ ADD THIS to center the logo container */
.sidebar-logo {
  display: flex;
  flex-direction: column;
  align-items: center;   /* ⭐ CENTER HORIZONTALLY */
  justify-content: center; /* ⭐ CENTER VERTICALLY */
}

.sidebar-logo img {
  width: 60px;
  margin-bottom: 10px;
}

.sidebar-logo h2 {
  font-size: 1.7rem;
  margin-bottom: 30px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.sidebar-nav a {
  color: white;
  text-decoration: none;
  padding: 10px 15px;
  margin: 5px 0;
  border-radius: 6px;
  transition: background 0.3s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background-color: #4043a8;
}

/* Logout text red */
.logout-btn {
  color: white !important;
}

/* Main Dashboard */
.dashboard-main {
  flex: 1;
  background-color: #f7f8fc;
  padding: 30px;
  overflow-y: auto;
}

.dashboard-main header h1 {
  color: #2b2e83;
  font-size: 1.6rem;
  margin-bottom: 20px;
}

/* Summary Cards */
.ticket-cards {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.card {
  flex: 1;
  color: white;
  text-align: center;
  padding: 18px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.card h2 {
  font-size: 1.9rem;
  margin: 0;
}

.card p {
  margin-top: 6px;
  font-size: 0.95rem;
}

/* Card Colors */
.card.blue {background-color: #8e44ad;}
.card.lightblue { background-color: #4a6ef5; }
.card.green { background-color: #2ec27e; }
.card.red { background-color: #D80000; color:#ffffff; }

/* Create Ticket Button */
.create-ticket-container {
  margin-bottom: 18px;
}

.create-ticket-btn {
  display: inline-block;
  padding: 10px 14px;
  background-color: #28a745;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
}

/* Ticket Table */
.ticket-table table {
  width: 100%;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  overflow: hidden;
}

.ticket-table th, 
.ticket-table td {
  padding: 12px 15px;
  text-align: left;
  font-size: 0.95rem;
  border-bottom: 1px solid #eee;
}

.ticket-table th {
  background-color: #f0f0f5;
}

/* Priority Badges */
.priority {
  padding: 6px 10px;
  border-radius: 12px;
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
}

.priority.high { background-color: #e74c3c; }
.priority.medium { background-color: #f39c12; }
.priority.low { background-color: #27ae60; }

/* Status Badges */
.status {
  padding: 6px 10px;
  border-radius: 12px;
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
}

.status.open { background-color: #1abc9c; }
.status.in-progress { background-color: #3498db; }
.status.resolved { background-color: #2ecc71; }
.status.closed { background-color: #7f8c8d; }

/* Action Buttons */
.action-btn {
  padding: 6px 10px;
  margin: 3px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: white;
  font-size: 0.85rem;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
}

/* View Button */
.action-btn.view {
  background-color: #3498db;
}

.action-btn.view:hover {
  background-color: #2980b9;
}

/* Success Message */
.success-message {
  color: green;
  font-weight: bold;
  margin-bottom: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .dashboard-container {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    flex-direction: row;
    justify-content: space-around;
  }

  .sidebar-nav {
    flex-direction: row;
  }

  .ticket-cards {
    flex-direction: column;
    gap: 10px;
  }

  .ticket-table table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* Edit Button (Yellow) */
.action-btn.edit {
  background-color: #f1c40f;
  color: black;
}

.action-btn.edit:hover {
  background-color: #d4ac0d;
}

.status.pending {
  background-color: #f1c40f;
  color: #7d6608; /* dark gold text for readability */
}

/* Fix ALL content from overlapping the fixed sidebar */
.dashboard-main,
.main-content,
.content-wrapper,
.container {
    margin-left: 235px !important;   /* Match sidebar width */
    width: calc(100% - 230px);       /* Prevent squeezing */
    box-sizing: border-box;
}
