/* Global Styles */
:root {
  --primary-color: #4a90e2;
  --secondary-color: #f5f6fa;
  --text-color: #2c3e50;
  --border-color: #dcdde1;
  --success-color: #2ecc71;
  --warning-color: #f1c40f;
  --danger-color: #e74c3c;
  --sidebar-width: 250px;
  --header-height: 60px;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--secondary-color);
  color: var(--text-color);
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: #2f3640;
  color: white;
  position: fixed;
  height: 100%;
  left: 0;
  top: 0;
  padding-top: var(--header-height);
  z-index: 100;
}

.sidebar-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: #2c3e50;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
  border-bottom: 1px solid #3d4a5d;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu li {
  padding: 15px 25px;
  border-bottom: 1px solid #3d4a5d;
  cursor: pointer;
  transition: background 0.2s;
}

.sidebar-menu li:hover, .sidebar-menu li.active {
  background-color: #353b48;
}

.sidebar-menu a {
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Main Content */
.main-content {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  padding: 20px;
  margin-top: var(--header-height);
}

/* Header */
.top-header {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  height: var(--header-height);
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  z-index: 90;
  box-sizing: border-box;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  object-fit: cover;
}

/* Dashboard Table */
.ticket-table {
  width: 100%;
  background: white;
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  margin-top: 20px;
}

.ticket-table th, .ticket-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.ticket-table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #7f8c8d;
}

.ticket-table tr:hover {
  background-color: #f1f2f6;
  cursor: pointer;
}

.badge {
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: bold;
}

.badge-high { background-color: #fab1a0; color: #c0392b; }
.badge-medium { background-color: #ffeaa7; color: #d35400; }
.badge-low { background-color: #74b9ff; color: #2980b9; }

.status-open { color: #27ae60; font-weight: bold; }
.status-review { color: #f39c12; font-weight: bold; }

/* Ticket Detail */
.ticket-container {
  display: flex;
  gap: 20px;
}

.ticket-main {
  flex: 3;
  background: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.ticket-sidebar {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-card {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.evidence-img {
  max-width: 100%;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-top: 15px;
}

.btn {
  display: block;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  transition: 0.2s;
  box-sizing: border-box;
}

.btn-primary { background-color: var(--primary-color); color: white; }
.btn-primary:hover { background-color: #357abd; }

.btn-secondary { background-color: #95a5a6; color: white; }
.btn-secondary:hover { background-color: #7f8c8d; }

.btn-danger { background-color: var(--danger-color); color: white; }

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 8px;
  width: 400px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.form-control {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
}

/* Guidelines */
.guidelines-content {
  background: white;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  max-width: 800px;
  margin: 0 auto;
}

.policy-section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.policy-action {
  background-color: #fff3cd;
  padding: 10px 15px;
  border-left: 4px solid #ffc107;
  margin-top: 10px;
  font-weight: bold;
}

/* Toast Notification */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
}

.toast {
    background-color: #333;
    color: #fff;
    padding: 15px 25px;
    border-radius: 5px;
    margin-top: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    display: flex;
    align-items: center;
    min-width: 250px;
}

.toast.show {
    opacity: 1;
}

.toast-info { border-left: 5px solid #3498db; }
.toast-success { border-left: 5px solid #2ecc71; }
.toast-error { border-left: 5px solid #e74c3c; }
.toast-warning { border-left: 5px solid #f1c40f; }
