/*
 ******************************************
 * @author Satheesh PM, BARC, Mumbai
 * @copyright 2010 - 2025
 * @Email admin@annlabs.org
 * @Phone 9324712423
 *
 * @Website www.annlabs.org
 * @website www.anushaktinagar.net
 * @website www.girisanchar.com
 * @website www.navodayans.net
 * @website www.vasumathy.com
 * @website www.anushaktinagar.com
 ******************************************
 */

/* ====== Global Styles ====== */
:root {
  --primary-color: #2b6cb0; /* Deep blue - knowledge */
  --accent-color: #38a169;  /* Science green */
  --danger-color: #e53e3e;  /* Red for hover on ghost */
  --bg-color: #f9fafc;
  --text-color: #333;
  --muted-color: #718096;
  --card-bg: #fff;
  --header-height: 60px;
  --border-color: #e2e8f0;
  --shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  --radius: 10px;
}
  
  body {
    font-family: Inter, system-ui, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  
  /* ====== Header ====== */
  .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    padding: 0 20px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    color: #fff;
    box-shadow: var(--shadow);
  }
  
  .header a {
    color: #fff;
    margin-left: 15px;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
  }
  
  .header a:hover {
    opacity: 0.8;
  }
  
  /* ====== Container ====== */
  .container {
    flex: 1;
    padding: 20px;
    max-width: 90%;
    margin: 0 auto;
  }
  
  /* ====== Buttons ====== */
.btn {
  background: var(--primary-color);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 500;
  transition: background 0.3s, transform 0.2s;
  margin-left: 25px;
}

.btn:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
}

/* ====== Ghost Button ====== */
.btn.ghost {
  background: var(--accent-color);
  color: #fff;
}

.btn.ghost:hover {
  background: var(--danger-color);
  color: #fff;
  transform: translateY(-2px);
}

.top-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
  }
  
  /* ====== Forms ====== */
  .form {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 30px auto;
  }
  
  input, select {
    display: block;
    width: 92%;
    padding: 8px;
    margin: 8px 0;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 15px;
  }
  
  button {
    padding: 10px 16px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
    margin-left:25px;
  }
  
  button:hover {
    background: var(--accent-color);
  }
  
  .error {
    color: red;
    margin-bottom: 10px;
    font-size: 14px;
  }
  
  /* ====== Tables ====== */
  table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
  }
  
  th, td {
    border: 1px solid var(--border-color);
    padding: 8px;
    text-align: center;
    font-size: 14px;
  }
  
  th {
    background: linear-gradient(90deg, #edf2f7, #e2e8f0);
    color: var(--text-color);
    font-weight: 600;
  }
  
  td {
    position: relative;
    color: var(--text-color);
  }
  
  td::after {
    content: attr(data-id);
    position: absolute;
    bottom: 3px;
    right: 4px;
    font-size: 8px;
    color: rgba(0, 0, 0, 0.25);
  }
  
  input.cell {
    width: 89%;
    border: none;
    text-align: center;
    background: transparent;
    font-size: 14px;
    color: var(--text-color);
  }

  input.readonly-cell {
    cursor: not-allowed;       
    pointer-events: none;     
  }
  
  .cell {
    width: 100%;
    min-height: 30px;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    line-height: 1.3;
    border: 1px solid #ccc;
    padding: 6px;
    resize: vertical;
    display: block;
  }
  
  .cell[readonly], .readonly-cell {
    background: #f7f7f7;
    cursor: not-allowed;
  }

  /* ====== Footer ====== */
  .footer {
    text-align: center;
    padding: 10px;
    background: #f1f1f1;
    color: #555;
    font-size: 14px;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
  }
  
  /* ====== Science & Maths Theme Elements ====== */
  body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
      radial-gradient(circle at 10% 20%, rgba(43,108,176,0.05) 0%, transparent 20%),
      radial-gradient(circle at 90% 80%, rgba(56,161,105,0.05) 0%, transparent 20%);
    z-index: -1;
  }
  
  /* ====== Responsive Design ====== */
  @media (max-width: 768px) {
    .header {
      flex-direction: column;
      height: auto;
      text-align: center;
      padding: 15px;
    }
  
    .container {
      padding: 15px;
      width:98%;
    }
  
    form {
      width: 100%;
      padding: 15px;
    }
  
    table, th, td {
      font-size: 12px;
    }
  
    .btn {
      padding: 6px 12px;
    }
  }
  
  @media (max-width: 480px) {
    th, td {
      padding: 5px;
    }
    .container {
      width:98%;
    }
    input, select {
      font-size: 13px;
    }
  
    .header a {
      display: block;
      margin: 5px 0;
    }
  }

  .pagination {
    margin-top: 15px;
    text-align: center;
  }
  .pagination a {
    margin: 0 5px;
    padding: 5px 10px;
    background: #ddd;
    text-decoration: none;
    border-radius: 4px;
  }
  .pagination span {
    margin: 0 10px;
  }
  
  .form-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
  }
  
  .form-row label {
    width: 200px;          /* Fixed label width */
    font-weight: bold;
  }
  
  .form-row input {
    flex: 1;               /* Input takes remaining space */
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
  }
  .updatePass {
    padding: 5px;
    width: 140px;
    border: 1px solid #ccc;
    border-radius: 4px;
  }
select.role {
  padding: 4px;
  border-radius: 4px;
}
select.role:disabled {
  background: #eee;
  color: #777;
  cursor: not-allowed;
}

  