:root {
    --primary: #007bff;
    --accent: #00c497;
    --bg: #f7f8fa;
    --white: #fff;
    --border: #ddd;
    --text: #333;
    --radius: 10px;
}

/* ---------- Layout & Topbar ---------- */
body {
    font-family: "Segoe UI", Arial, sans-serif;
    margin: 0;
    background: #f7f8fa;
    color: #333;
  }
  
  .topbar {
    background: #007bff;
    color: white;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    padding: 15px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  
  .logout-btn {
    color: white;
    text-decoration: none;
    background: rgba(252, 0, 0, 0.918);
    padding: 8px 12px;
    border-radius: 6px;
    transition: 0.2s;
  }
  .logout-btn:hover { background: rgba(134, 4, 4, 0.897);; }
  
  .container {
    max-width: 900px;
    margin: 30px auto;
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  }
  
  /* ---------- Forms ---------- */
  .add-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
  }
  .add-form input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
  }
  .add-form button {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
  }
  .add-form button:hover { background: #0056b3; }
  
  /* ---------- Table ---------- */
  .table-wrapper { overflow-x: auto; }
  table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
  th {
    background: #007bff;
    color: white;
    padding: 10px;
    text-align: center;
  }
  td {
    padding: 8px;
    border-bottom: 1px solid #eee;
    text-align: center;
  }
  .item-name { text-align: left; font-weight: 500; }
  .inline-form { display: flex; align-items: center; justify-content: center; gap: 5px; }
  .inline-form input {
    width: 70px;
    text-align: right;
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 5px;
  }
  .inline-form button {
    border: none;
    background: transparent;
    cursor: pointer;
  }
  
  /* ---------- Priority & Progress ---------- */
  .priority {
    display: inline-block;
    padding: 3px 7px;
    border-radius: 5px;
    color: white;
    font-size: 0.8rem;
  }
  .p1 { background: #dc3545; }
  .p2 { background: #fd7e14; }
  .p3 { background: #ffc107; color: #333; }
  .p4 { background: #0dcaf0; }
  .p5 { background: #20c997; }
  
  progress {
    width: 100%;
    height: 12px;
    appearance: none;
  }
  progress::-webkit-progress-bar { background: #eee; border-radius: 5px; }
  progress::-webkit-progress-value { background: #00c497; border-radius: 5px; }
  
  /* ---------- Responsive ---------- */
  @media (max-width: 600px) {
    .topbar { flex-direction: column; gap: 8px; text-align: center; }
    .add-form input, .add-form button { flex: 1 1 100%; }
    th, td { font-size: 0.85rem; padding: 6px; }
    .inline-form input { width: 60px; }
    .container { padding: 15px; margin: 15px; }
  }
  

.container {
    max-width: 900px;
    margin: 40px auto;
    background: var(--white);
    padding: 25px 30px;
    border-radius: var(--radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header {
    text-align: center;
    margin-bottom: 25px;
}

.subtitle {
    color: #666;
    font-size: 0.9rem;
    margin-top: 5px;
}

.add-form {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.add-form input {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
}

.add-form button {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 8px 15px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: 0.2s;
}

.add-form button:hover {
    background: #0056b3;
}

.summary {
    text-align: center;
    margin: 30px 0 20px;
}

.overall-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

progress {
    width: 250px;
    height: 14px;
    border-radius: var(--radius);
    overflow: hidden;
    appearance: none;
}

progress::-webkit-progress-bar {
    background-color: #eee;
    border-radius: var(--radius);
}

progress::-webkit-progress-value {
    background-color: var(--accent);
    border-radius: var(--radius);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: var(--primary);
    color: var(--white);
    padding: 10px;
    font-weight: 500;
}

td {
    padding: 10px;
    border-bottom: 1px solid var(--border);
    text-align: center;
    vertical-align: middle;
}

.item-name {
    text-align: left;
    font-weight: 500;
}

.inline-form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.inline-form input {
    width: 80px;
    text-align: center;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.inline-form button {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.delete-btn {
    text-decoration: none;
    color: #ff5c5c;
    font-size: 1.2rem;
    transition: 0.2s;
}

.delete-btn:hover {
    color: red;
}

.priority {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: bold;
}

.p1 { background: #dc3545; }
.p2 { background: #fd7e14; }
.p3 { background: #ffc107; color: #333; }
.p4 { background: #0dcaf0; }
.p5 { background: #20c997; }

/* Login page styling */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #007bff, #00c497);
}

.login-box {
    background: #fff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    width: 320px;
}

.login-box h2 {
    margin-bottom: 20px;
    color: #333;
}

.login-box input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
}

.login-box button {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
}

.login-box button:hover {
    background: #0056b3;
}

.error {
    color: red;
    margin-top: 10px;
    font-size: 0.9rem;
}
