/* ------------------------------
       GLOBAL STYLES
    ------------------------------ */
    /* Connected State */
    #session-status.connected {
      background-color: #16a34a;
      color: #fff;
    }

    /* Disconnected State */
    #session-status.disconnected {
      background-color: #dc2626;
      color: #fff;
    }

    /* Hover Effect */
    #session-status:hover {
      transform: scale(1.05);
    }

   
    /* ------------------------------
       RIGHT SIDEBAR
    ------------------------------ */
    .right-sidebar {
      width: 150px;
      background: #f2f5f4;
      border-left: 1px solid #ddd;
      position: fixed;
      top: 42px;
      bottom: 0;
      right: 0;
      padding: 8px 8px;
      display: flex;
      flex-direction: column;
      align-items: center;
      overflow-y: auto;
    }

    .right-sidebar .call-status {
      text-align: center;
      margin: 18px 0;
    }

    .right-sidebar .call-status i {
      font-size: 30px;
      background: #22c55e;
      color: #fff;
      padding: 12px;
      border-radius: 50%;
    }

    .right-sidebar .call-status h4 {
      margin: 10px 0 5px;
      font-size: 14px;
      font-weight: 600;
      color: #333;
    }

    .right-sidebar .call-status .count {
      font-size: 18px;
      font-weight: bold;
      color: #000;
    }

    .right-sidebar .action {
      display: flex;
      flex-direction: column;
      align-items: center;
      margin: 2px 0;
      font-size: 13px;
      color: #444;
      cursor: pointer;
      transition: 0.2s;
      padding: 8px;
      border-radius: 6px;
      width: 80px;
    }

    .right-sidebar .action.active {
      background-color: #e0e7ff;
      color: #3730a3;
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .right-sidebar .action i {
      font-size: 20px;
      margin-bottom: 6px;
    }

    .right-sidebar .action:hover {
      color: #000;
      transform: translateY(-2px);
    }

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

    /* ------------------------------
       CALL INFO CARD
    ------------------------------ */
    .call-info-card {
      background: #fff;
      border-radius: 8px;
      padding: 15px 20px;
      max-width: 1000px;
      width: 100%;
      margin: 0 auto 20px auto;
      box-shadow: 0 2px 6px rgba(0,0,0,0.1);
      border: 1px solid #e5e7eb;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .call-user {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .call-user .name {
      font-size: 15px;
      font-weight: 600;
      color: #222;
    }

    .call-user .call-type {
      font-size: 13px;
      color: #2003fc;
      font-weight: 400;
    }

    .call-dtmf {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 13px;
    }

    .call-dtmf label {
      font-weight: 500;
      color: #555;
    }

    .call-dtmf input {
      padding: 6px 10px;
      border: 1px solid #d1d5db;
      border-radius: 6px;
      font-size: 13px;
      width: 120px;
      transition: border-color 0.2s ease-in-out;
    }

    .call-dtmf input:focus {
      outline: none;
      border-color: #2563eb;
      box-shadow: 0 0 3px rgba(37, 99, 235, 0.3);
    }

    /* ------------------------------
       CRM FORM CARD
    ------------------------------ */
    .customer-form .card {
      background: #fff;
      border-radius: 8px;
      padding: 20px;
      max-width: 1000px;
      width: 100%;
      margin: 0 auto 30px auto;
      box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    }

    /* ------------------------------
       CRM FORM TABS
    ------------------------------ */
    .tabs {
      display: flex;
      align-items: center;
      border-bottom: 1px solid #ddd;
      margin-bottom: 15px;
    }

    .tabs button {
      background: none;
      border: none;
      margin-right: 20px;
      padding: 10px 0;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      color: #555;
      position: relative;
    }

    .tabs button.active {
      color: #000;
      font-weight: 600;
    }

    .tabs button.active::after {
      content: '';
      position: absolute;
      left: 0;
      bottom: -1px;
      width: 100%;
      height: 2px;
      background: #f8b400;
    }

    .tabs .save-btn {
      margin-left: auto;
      background: #eb9409;
      border: 1px solid #ddd;
      border-radius: 6px;
      padding: 6px 14px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      color: #eb9409;
    }

    /* ------------------------------
       SECTION TITLES
    ------------------------------ */
    .section-title {
      font-size: 15px;
      font-weight: 600;
      color: #0d47a1;
      margin: 20px 0 10px;
      border-bottom: 1px solid #ddd;
      padding-bottom: 5px;
    }

    /* ------------------------------
       CRM FORM
    ------------------------------ */
    .crm-form {
      display: flex;
      flex-direction: column;
      gap: 20px;
      margin-bottom: 30px;
    }

    .form-row {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 25px;
    }

    .form-group {
      display: flex;
      flex-direction: column;
    }

    .form-group label {
      font-size: 13px;
      font-weight: 600;
      margin-bottom: 6px;
      color: #222;
    }

    .form-group input {
      padding: 8px 10px;
      border: 1px solid #d1d5db;
      border-radius: 6px;
      font-size: 13px;
      background: #fff;
      transition: border-color 0.2s ease-in-out;
    }

    .form-group input:focus {
      outline: none;
      border-color: #2563eb;
      box-shadow: 0 0 3px rgba(37, 99, 235, 0.3);
    }

    /* Tabs */
    .tabs { display: flex; align-items: center; border-bottom: 1px solid #ddd; margin-bottom: 15px; }
    .tabs button { background: none; border: none; margin-right: 20px; padding: 10px 0; font-size: 14px; font-weight: 500; cursor: pointer; color: #555; position: relative; }
    .tabs button.active { color: #000; font-weight: 600; }
    .tabs button.active::after { content: ''; position: absolute; left: 0; bottom: -1px; width: 100%; height: 2px; background: #f8b400; }
    .tabs .save-btn { margin-left: auto; background: #ebad05; border: 0px solid #ddd; border-radius: 6px; padding: 6px 24px; font-size: 13px; font-weight: 500; cursor: pointer; color: #fafafa; }

    /* Section Title */
    .section-title { font-size: 15px; font-weight: 600; color: #0d47a1; margin: 20px 0 10px; border-bottom: 1px solid #ddd; padding-bottom: 5px; }

    /* Forms */
    .crm-form { display: flex; flex-direction: column; gap: 20px; margin-bottom: 30px; }
    .form-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; }
    .form-group { display: flex; flex-direction: column; }
    .form-group label { font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #222; }
    .form-group input, .remark-box { padding: 8px 2px; border: 1px solid #d1d5db; border-radius: 2px; font-size: 13px; background: #fff; transition: border-color 0.2s ease-in-out; }
    .remark-box { width: 100%; height: 100px; resize: none; }

    /* Disposition Remark Buttons */
    .disposition-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
    .disposition-buttons button { 
      padding: 8px 14px; 
      border: none; 
      border-radius: 6px; 
      cursor: pointer; 
      font-size: 13px; 
      transition: all 0.2s ease-in-out;
      display: flex;
      align-items: center;
      gap: 5px;
    }

    /* Soft colors for disposition buttons */
    .disposition-buttons button:nth-child(1) { background: #dcfce7; color: #166534; } /* Paid */
    .disposition-buttons button:nth-child(2) { background: #ffedd5; color: #9a3412; } /* PTP */
    .disposition-buttons button:nth-child(3) { background: #fef3c7; color: #92400e; } /* Busy */
    .disposition-buttons button:nth-child(4) { background: #dbeafe; color: #1e40af; } /* Call Back */
    .disposition-buttons button:nth-child(5) { background: #e9d5ff; color: #7e22ce; } /* Not Answering */
    .disposition-buttons button:nth-child(6) { background: #fce7f3; color: #be185d; } /* Ringing */
    .disposition-buttons button:nth-child(7) { background: #fee2e2; color: #b91c1c; } /* Not Paying */
    .disposition-buttons button:nth-child(8) { background: #ffedd5; color: #c2410c; } /* Dispute */
    .disposition-buttons button:nth-child(9) { background: #dcfce7; color: #166534; } /* Want Settlement */
    .disposition-buttons button:nth-child(10) { background: #e5e7eb; color: #374151; } /* Disconnected */

    .disposition-buttons button:hover {
      opacity: 0.9;
      transform: translateY(-2px);
    }

.disposition-buttons button.active {
  background-color: #007bff;
  color: white;
}

    /* Calendar icon for PTP and Call Back */
    .calendar-icon {
      font-size: 12px;
    }

    /* Hide Sections */
    .tab-content { display: none; }
    .tab-content.active { display: block; }

    /* Script Container */
    .script-container {
      background-color: #f8f9fa;
      border-radius: 8px;
      padding: 15px;
      margin: 15px 0;
      border: 1px solid #e9ecef;
    }

    .script-step {
      margin-bottom: 10px;
      padding: 10px;
      background-color: #fff;
      border-radius: 6px;
      box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }

    .script-step-header {
      font-weight: bold;
      color: #0d47a1;
      margin-bottom: 5px;
    }

    .script-step-content {
      margin-left: 15px;
      color: #333;
      font-style: italic;
      background: #f1f5f9;
      padding: 10px;
      border-radius: 4px;
      border-left: 3px solid #0d47a1;
    }

    .script-response-options {
      display: flex;
      gap: 10px;
      margin-top: 10px;
      flex-wrap: wrap;
    }

    .script-response-btn {
      padding: 6px 12px;
      background-color: #e0e7ff;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 12px;
      transition: background-color 0.2s;
    }

    .script-response-btn:hover {
      background-color: #c7d2fe;
    }

    /* Calendar Modal */
    .calendar-modal {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.5);
      z-index: 10000;
      justify-content: center;
      align-items: center;
    }

    .calendar-content {
      background-color: white;
      padding: 20px;
      border-radius: 8px;
      width: 300px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    .calendar-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 15px;
    }

    .calendar-header h3 {
      margin: 0;
      font-size: 16px;
      color: #0d47a1;
    }

    .calendar-close {
      background: none;
      border: none;
      font-size: 18px;
      cursor: pointer;
      color: #666;
    }

    .calendar-inputs {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-bottom: 15px;
    }

    .calendar-inputs input {
      padding: 8px;
      border: 1px solid #d1d5db;
      border-radius: 4px;
      font-size: 14px;
    }

    .calendar-actions {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
    }

    .calendar-actions button {
      padding: 8px 16px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 14px;
    }

    .calendar-cancel {
      background-color: #e5e7eb;
      color: #374151;
    }

    .calendar-save {
      background-color: #039e77;
      color: white;
    }

    /* ------------------------------
       CALL HISTORY TABLE
    ------------------------------ */
    .call-history-container {
      background: #fff;
      border-radius: 8px;
      padding: 20px;
      width: 95%;
      box-shadow: 0 2px 6px rgba(0,0,0,0.1);
      overflow-x: auto;
    }

    .call-history-title {
      font-size: 18px;
      font-weight: 600;
      color: #0d47a1;
      margin-bottom: 15px;
      padding-bottom: 8px;
      border-bottom: 1px solid #ddd;
    }

    .call-history-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 12px;
    }

    .call-history-table th,
    .call-history-table td {
      padding: 10px 8px;
      text-align: left;
      border-bottom: 1px solid #e5e7eb;
    }

    .call-history-table th {
      background-color: #f8fafc;
      font-weight: 600;
      color: #374151;
      position: sticky;
      top: 0;
    }

    .call-history-table tr:hover {
      background-color: #f9fafb;
    }

    .call-history-table .recording-cell {
      color: #2563eb;
      cursor: pointer;
    }

    .call-history-table .recording-cell:hover {
      text-decoration: underline;
    }

    .call-history-table .status-connected {
      color: #16a34a;
      font-weight: 600;
    }

    .call-history-table .status-disconnected {
      color: #dc2626;
      font-weight: 600;
    }

    /* ------------------------------
       RESPONSIVE STYLES
    ------------------------------ */
    @media (max-width: 1200px) {
      .main {
        margin-left: 140px;
        margin-right: 100px;
      }
      
      .right-sidebar {
        width: 80px;
      }
      
      .right-sidebar .action {
        width: 70px;
        font-size: 11px;
      }
      
      .right-sidebar .action i {
        font-size: 16px;
      }
    }

    @media (max-width: 992px) {
      .sidebar {
        width: 60px;
      }
      
      .sidebar-item span {
        display: none;
      }
      
      .sidebar-item {
        justify-content: center;
        padding: 12px 0;
      }
      
      .main {
        margin-left: 60px;
        margin-right: 80px;
      }
      
      .right-sidebar {
        width: 70px;
      }
      
      .right-sidebar .action {
        width: 60px;
        padding: 6px;
        font-size: 10px;
      }
      
      .form-row {
        grid-template-columns: repeat(2, 1fr);
      }
      
      .topbar-left {
        min-width: 200px;
      }
      
      .manual-dial {
        position: static;
        transform: none;
        margin: 0 10px;
      }
      
      .topbar {
        flex-wrap: wrap;
        height: auto;
        padding: 8px 10px;
      }
      
      .topbar-right {
        margin-left: auto;
      }
      
      .call-history-table {
        font-size: 11px;
      }
    }

    @media (max-width: 768px) {
      .main {
        margin-right: 0;
        padding: 10px 5px;
      }
      
      .right-sidebar {
        display: none;
      }
      
      .call-info-card {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
      }
      
      .tabs {
        flex-wrap: wrap;
        gap: 10px;
      }
      
      .tabs button {
        margin-right: 10px;
        font-size: 12px;
      }
      
      .call-history-table {
        font-size: 10px;
      }
      
      .call-history-table th,
      .call-history-table td {
        padding: 6px 4px;
      }
    }

    @media (max-width: 576px) {
      .sidebar {
        display: none;
      }
      
      .main {
        margin-left: 0;
      }
      
      .topbar-left .brand {
        font-size: 18px;
      }
      
      .clock-container {
        display: none;
      }
      
      .manual-dial {
        flex: 1;
      }
      
      .manual-dial input {
        width: 100%;
      }
      
      .status-icons {
        gap: 10px;
      }
      
      .form-row {
        grid-template-columns: 1fr;
      }
      
      .call-history-table {
        font-size: 9px;
      }
    }

.sidebar-item {
    text-decoration: none;   /* removes underline */
}

