/* ===== GLOBAL ===== */
body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: #e8f5e9;
}

/* ===== LAYOUT ===== */
.container {
    display: flex;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 230px;
    height: 100vh;
    background: #2e7d32;
    color: white;
    padding: 20px;
    position: sticky;
    top: 0;
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 30px;
}

.sidebar a {
    display: block;
    padding: 12px;
    margin: 10px 0;
    background: #388e3c;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: 0.3s;
}

.sidebar a:hover {
    background: #66bb6a;
}

/* ===== MAIN CONTENT ===== */
.main {
    flex: 1;
    padding: 25px;
}

/* ===== HEADER ===== */
.header-box {
    background: #ffffff;
    padding: 15px;
    border-left: 6px solid #66bb6a;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* ===== CARDS ===== */
.card {
    background: #ffffff;
    padding: 15px;
    border-radius: 10px;
    margin: 10px 0;
    border-left: 6px solid #66bb6a;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* ===== STATUS ===== */
.pending,
.scheduled,
.progress,
.completed {
    color: inherit;
    font-weight: normal;
}

.pending {
    color: gray;
    font-weight: bold;
}

.overdue {
    background: #ffcccc;
    font-weight: bold;
}

/* ===== FORMS ===== */
input,
textarea,
select {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border-radius: 6px;
    border: 1px solid #cccccc;
    box-sizing: border-box;
}

button {
    width: 100%;
    padding: 10px;
    background: #66bb6a;
    border: none;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
}

button:hover {
    background: #2e7d32;
}

/* ===== TABLE ===== */
.table-wrapper {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid #ccc;
    border-radius: 10px;
    background: white;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1200px;
}

.admin-table thead th {
    position: sticky;
    top: 0;
    background: #66bb6a;
    color: white;
    z-index: 2;
    padding: 12px;
    text-align: center;
}

.admin-table td {
    padding: 10px;
    border: 1px solid #42d33d;
    text-align: center;
}

/* ===== SUMMARY BOXES ===== */
.summary {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.box{
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;

    height:120px;
    padding:20px;

    border-radius:12px;
    color:white;
    text-decoration:none;

    font-size:18px;
    font-weight:600;

    box-shadow:0 4px 10px rgba(0,0,0,0.08);
    transition:.3s ease;
}

.box:hover{
    transform:translateY(-3px);
}

.box b{
    margin-top:10px;
    font-size:38px;
    font-weight:700;
}
.summary{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:18px;
    margin-bottom:22px;
}

.blue {
    background: #3498db;
}

.red {
    background: #e74c3c;
}

.orange {
    background: #f39c12;
}

.green {
    background: #2ecc71;
}

/* ===== UPDATE PAGE ===== */
.update-box {
    max-width: 600px;
    margin: 50px auto;
    padding: 20px;
    border: 2px solid #66bb6a;
    border-radius: 10px;
    background: #e8f5e9;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.update-box h2 {
    color: #2e7d32;
    margin-bottom: 20px;
    text-align: center;
}

/* ===== EDIT PAGE ===== */
.edit-box {
    max-width: 600px;
    margin: 50px auto;
    padding: 25px;
    border: 2px solid #66bb6a;
    border-radius: 12px;
    background: #f1fff1;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.edit-box h2 {
    color: #2e7d32;
    text-align: center;
    margin-bottom: 20px;
}

.edit-box input,
.edit-box textarea,
.edit-box select {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border-radius: 8px;
    border: 1px solid #66bb6a;
    box-sizing: border-box;
}

.edit-box button {
    width: 100%;
    padding: 12px;
    background: #66bb6a;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.edit-box button:hover {
    background: #2e7d32;
}

/* ===== ACTION BUTTONS ===== */
.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.btn {
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: 0.2s ease;
}

.update-btn {
    background-color: #3498db;
    color: white;
}

.update-btn:hover {
    background-color: #2980b9;
}

.delete-btn {
    background-color: #e53935;
    color: white;
}

.delete-btn:hover {
    background-color: #c62828;
}

/* ===== LOGIN & REGISTER ===== */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-box {
    width: 360px;
    padding: 35px;
    background: #ffffff;
    border-radius: 15px;
    border: 2px solid #66bb6a;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.login-box h2 {
    color: #66bb6a;
    margin-bottom: 25px;
}

.login-box input {
    width: 100%;
    padding: 12px;
    margin: 12px 0;
    border-radius: 10px;
    border: 2px solid #66bb6a;
    font-size: 14px;
}

.login-box button {
    width: 100%;
    padding: 12px;
    background: #66bb6a;
    border-radius: 10px;
    font-size: 16px;
    margin-top: 10px;
}

.login-box button:hover {
    background: #4caf50;
}

.login-box a {
    display: block;
    margin-top: 15px;
    color: #66bb6a;
    text-decoration: none;
    font-weight: bold;
}

.login-box a:hover {
    text-decoration: underline;
}

.login-box .error {
    color: red;
    margin-top: 10px;
}

.login-box .success {
    color: green;
    margin-top: 10px;
}

/* ===== SEARCH ===== */
.search-form{
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:20px;
}

.search-form input{
    width:320px;   /* smaller width */
    padding:12px 15px;
    border:none;
    border-radius:8px;
    font-size:14px;
    background:white;
    outline:none;
}

.search-form button{
    width:280px;
    padding:12px;
    border:none;
    background:#43a047;
    color:white;
    border-radius:8px;
    font-size:14px;
    cursor:pointer;
    transition:.3s;
}

.search-form button:hover{
    background:#2e7d32;
}

.search-form button {
    width: auto;
    padding: 10px 18px;
    background: #2e7d32;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.search-form button:hover {
    background: #1b5e20;
}

/* ===== SCROLLBAR ===== */
.table-wrapper::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: #66bb6a;
    border-radius: 10px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
}

/* ===== TABLE ===== */
.table-wrapper{
    background:white;
    border-radius:10px;
    overflow:auto;
    height:420px;
}

.admin-table{
    width:100%;
    border-collapse:collapse;
}

.admin-table thead{
    background:#16e01d; /* light green */
    position:sticky;
    top:0;
    z-index:2;
}

.admin-table thead th{
    padding:18px;
    text-align:center;
    font-size:16px;
    font-weight:700;
    color:#000000;
    border-bottom:2px solid #cfcfcf;
}



.admin-table td{
    padding:16px;
    text-align:center;
    border-bottom:1px solid #e5e5e5;
    font-size:15px;
}

/* =========================
   RESPONSIVE DESIGN
   MOBILE / TABLET / DESKTOP
========================= */

/* ===== TABLET ===== */
@media (max-width: 1024px) {

    .summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .sidebar {
        width: 200px;
    }

    .main {
        padding: 20px;
    }

    .search-form input {
        width: 200px;
    }
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {

    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        text-align: center;
    }

    .sidebar a {
        display: inline-block;
        margin: 5px;
    }

    .main {
        padding: 15px;
    }

    .summary {
        grid-template-columns: 1fr;
    }

    .search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .search-form input,
    .search-form button {
        width: 100%;
    }

    .table-wrapper {
        height: auto;
    }

    .admin-table {
        min-width: 600px;
    }
}

/* ===== SMALL MOBILE ===== */
@media (max-width: 480px) {

    .sidebar h2 {
        font-size: 20px;
    }

    .box b {
        font-size: 28px;
    }

    .box {
        font-size: 16px;
        padding: 15px;
    }

    .admin-table th,
    .admin-table td {
        font-size: 12px;
        padding: 10px;
    }
}