/* ------------------------------
       GLOBAL STYLES
    ------------------------------ */
    body {
      margin: 0;
      font-family: Arial, sans-serif;
      background: #f5f6fa;
    }

    /* ------------------------------
       SIDEBAR
    ------------------------------ */
    .sidebar {
      width: 160px;
      background: #324152;
      color: #fcfcfc;
      position: fixed;
      top: 0;
      bottom: 0;
      left: 0;
      overflow-y: auto;
    }

    .sidebar-menu { 
      padding: 80px 0;
      flex-grow: 1;
    }

    .sidebar-item {
      padding: 12px 20px;
      display: flex;
      align-items: center;
      gap: 12px;
      cursor: pointer;
      transition: all 0.2s;
      border-left: 4px solid transparent;
      font-size: 14px;
      color: #fcfafa;
    }

    .sidebar-item:hover { background: rgba(255,255,255,0.08); color:#fff; }
    .sidebar-item.active {
      background: rgba(67,97,238,0.15);
      border-left-color:#2563eb;
      color:#fcfafa;
    }

    .sidebar-item i { width:20px; text-align:center; font-size:16px; }
    .sidebar-item:hover i { color:#60a5fa; }
    .sidebar-item.active i { color:#2563eb; }

    
    .sidebar-status button {
      width: 100%;
      padding: 10px 0;
      border: none;
      border-radius: 0px;
      font-weight: bold;
      text-transform: titlecase;
      cursor: pointer;
      transition: all 0.3s ease;
      box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
    }

       /* Logout Button */
    .sidebar-logout {
      display: flex;
      align-items: center;
      padding: 5px;
      position: absolute;
      bottom: 10px;
      width: 100%;
      box-sizing: border-box;
      margin-top: auto;
      margin-bottom: 0px;
    }

    .sidebar-logout button {
      display: flex;              /* Align icon and text in a row */
      align-items: center;        /* Vertically center icon & text */
      gap: 8px;                   /* 👈 Adds space between icon and text */
      width: 100%;
      padding: 12px 20px;
      border: none;
      border-radius: 1px;
      background-color: transparent;
      color: white;
      font-weight: normal;
      cursor: pointer;
      transition: all 0.3s ease;
      font-size: 14px;
    }

    .sidebar-logout button:hover {
      background-color: rgba(255, 255, 255, 0.08);
    }

    /* Topbar */
    .topbar {
      background: #324152;
      padding: 8px 20px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      color: #fff;
      height: 50px;
      flex-shrink: 0;
      box-shadow: 0 2px 5px rgba(0,0,0,0.2);
      position: sticky;
      top: 0;
      z-index: 1000;
    }

    /* Left Side: Brand + DateTime */
    .topbar-left {
      display: flex;
      align-items: center;
      gap: 16px;
      min-width: 280px;
    }

    .brand {
      font-family: "Ubuntu", sans-serif;
      font-style: italic;
      font-weight: 600;
      font-size: 22px;
      color: #f7fafa;
    }

    .clock-container {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      margin-left: 15px;
      font-size: 12px;
      line-height: 1.2;
    }
    
    .time-display {
      font-weight: bold;
      font-size: 14px;
    }
    
    .date-display {
      font-size: 11px;
      opacity: 0.9;
    }

    /* Manual Dial Box - Centered */
    .manual-dial {
      display: flex;
      align-items: center;
      gap: 8px;
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
    }

    .manual-dial input {
      padding: 6px 10px;
      width: 180px;
      font-size: 14px;
      border: 1px solid #ccc;
      border-radius: 4px;
      outline: none;
      transition: border-color 0.2s, box-shadow 0.2s;
    }

    .manual-dial input:focus {
      border-color: #2563eb;
      box-shadow: 0 0 4px rgba(37, 99, 235, 0.4);
    }

    .manual-dial button {
      padding: 6px 14px;
      background: #039e77;
      color: #fff;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 14px;
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 6px;
      transition: background 0.2s ease-in-out;
    }

    .manual-dial button:hover {
      background: #1e40af;
    }

    .manual-dial button i {
      font-size: 14px;
    }

    /* Right Side */
    .topbar-right {
      display: flex;
      align-items: center;
      gap: 20px;
    }

    .status-icons {
      display: flex;
      align-items: center;
      gap: 15px;
      margin-right: 10px;
    }

    .icon-btn {
      position: relative;
      font-size: 18px;
      cursor: pointer;
      color: #fff;
      display: flex;
      align-items: center;
    }

    .icon-btn i {
      color: #fff;
    }

    .notification-badge {
      position: absolute;
      top: -5px;
      right: -5px;
      background: #ef4444;
      color: white;
      border-radius: 50%;
      width: 18px;
      height: 18px;
      font-size: 11px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: bold;
    }

    .status-indicator {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      margin-right: 5px;
    }

    .status-online {
      background: #22c55e;
    }

    .status-offline {
      background: #ef4444;
    }

    .status-busy {
      background: #f59e0b;
    }

    .user-info {
      display: flex;
      align-items: center;
      cursor: pointer;
      gap: 8px;
    }

    .user-avatar {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: #60a5fa;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-weight: bold;
    }

    .username {
      font-size: 14px;
      font-weight: 500;
    }

    /* MAIN WRAPPER */
    .main {
      margin-left: 160px;
      margin-top: 10px;
      padding: 20px;
      font-size: 13px;
    }

    .welcome { 
      margin: 13px 0 15px 0;  /* 3px more top margin */
      font-size: 18px; 
    }

    /* Grid */
    .grid { display: grid; gap: 12px; margin-bottom: 12px; }
    .grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
    .grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-cols-1 { grid-template-columns: 1fr; }

    /* Cards */
    .card, .card-colored {
      background: #fff;
      border-radius: 8px;
      padding: 10px;
      box-shadow: 0 1px 3px rgba(0,0,0,0.1);
      font-size: 13px;
    }
    .card h4 { margin: 0 0 8px 0; font-size: 13px; }

    /* Status Grid Wrapper */
    .status-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 14px;
      margin-bottom: 20px;
    }

    /* Individual Status Cards */
    .status-card {
      display: flex;
      align-items: center;
      background: #fff;
      border-radius: 10px;
      padding: 14px 16px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.06);
      border-top: 4px solid;
      transition: all 0.2s ease-in-out;
    }

    .status-card:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 14px rgba(0,0,0,0.12);
    }

    /* Icon Styling */
    .status-card .icon {
      width: 40px;
      height: 40px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-right: 12px;
      font-size: 20px;
      background: rgba(0,0,0,0.05);
    }

    /* Details */
    .status-card .details {
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    .status-card .value {
      font-size: 18px;
      font-weight: 700;
      color: #222;
    }

    .status-card .label {
      font-size: 13px;
      color: #555;
    }


    /* Color Themes */
    .status-card.green { border-color: #16a34a; }
    .status-card.green .icon { color: #16a34a; }

    .status-card.blue { border-color: #2563eb; }
    .status-card.blue .icon { color: #2563eb; }

    .status-card.violet { border-color: #9333ea; }
    .status-card.violet .icon { color: #9333ea; }

    .status-card.yellow { border-color: #f59e0b; }
    .status-card.yellow .icon { color: #f59e0b; }

    /* Smaller charts row */
    .small-row { margin-top: 10px; }
    .small-card { height: 240px; padding: 8px; }
   
    /* Campaign Table */
    #campaignTable {
      font-size: 13px;
      border-collapse: collapse;
      width: 100%;
    }
    #campaignTable th, #campaignTable td {
      padding: 8px;
      text-align: center;
    }

    /* Switch */
    .switch {
      position: relative;
      display: inline-block;
      width: 40px;
      height: 20px;
    }
    .switch input { display: none; }
    .slider {
      position: absolute;
      cursor: pointer;
      top: 0; left: 0; right: 0; bottom: 0;
      background-color: #ccc;
      transition: .4s;
      border-radius: 20px;
    }
    .slider:before {
      position: absolute;
      content: "";
      height: 14px; width: 14px;
      left: 3px; bottom: 3px;
      background-color: white;
      transition: .4s;
      border-radius: 50%;
    }
    input:checked + .slider { background-color: #4ade80; }
    input:checked + .slider:before { transform: translateX(20px); }

    /* Download Button */
    .download-container {
      text-align: center;
      margin: 20px 0;
    }
    
    .download-btn {
      padding: 10px 20px;
      background: #2563eb;
      color: white;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 16px;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }
    

    .download-btn:hover {
      background: #1e40af;
    }

.footer {
  text-align: center;
  padding: 20px;
  color: #666;
  font-size: 14px;
  border-top: 1px solid #e5e7eb;
  margin-top: 30px;
  /* Add these lines: */
  margin-left: 160px;
  width: calc(100% - 160px);
  box-sizing: border-box;
}