/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* BODY */
body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #4e73df, #1cc88a);
    min-height: 100vh;
    padding: 40px 20px;
}


/* CONTAINER */
.container {
    background: #ffffff;
    width: 100%;
    max-width: 400px;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    text-align: center;
}

/* HEADING */
.container h2 {
    margin-bottom: 25px;
    font-size: 24px;
    color: #333;
}

/* INPUTS */
.container input {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    transition: border 0.3s ease;
}

.container input:focus {
    outline: none;
    border-color: #4e73df;
}

/* BUTTON */
.container button {
    width: 100%;
    padding: 12px;
    background: #4e73df;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.container button:hover {
    background: #2e59d9;
}

/* REGISTER LINK */
.container p {
    margin-top: 15px;
    font-size: 14px;
}

.container a {
    text-decoration: none;
    color: #4e73df;
    font-weight: 600;
}

.container a:hover {
    text-decoration: underline;
}

/* RESPONSIVE BREAKPOINTS */

/* Small Devices */
@media (max-width: 480px) {
    .container {
        padding: 30px 20px;
    }

    .container h2 {
        font-size: 20px;
    }

    .container input,
    .container button {
        font-size: 14px;
    }
}

/* Large Screens */
@media (min-width: 1200px) {
    .container {
        max-width: 450px;
    }
}
/* ================= DASHBOARD WRAPPER ================= */

.dashboard-wrapper {
    width: 100%;
    max-width: 1100px;
    margin: auto;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}


/* ================= HEADER ================= */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 20px;
}

.dashboard-header input {
    width: 350px;
    max-width: 100%;
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid #ccc;
    transition: 0.3s;
}

.dashboard-header input:focus {
    outline: none;
    border-color: #4e73df;
    box-shadow: 0 0 6px rgba(78,115,223,0.3);
}


/* ================= ADD BUTTON ================= */

.add-btn {
    background: #28a745;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

.add-btn:hover {
    background: #218838;
}


/* ================= TABLE ================= */

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #e9ecf4;
}

th {
    padding: 14px;
    font-weight: 600;
    text-align: left;
}

td {
    padding: 14px;
    border-bottom: 1px solid #ddd;
}

tr:hover {
    background: #f8f9fc;
}


/* ================= ACTION BUTTONS ================= */

td button {
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
    margin-right: 6px;
}

td button:first-child {
    background: #4e73df;
    color: white;
}

td button:first-child:hover {
    background: #2e59d9;
}

.delete-btn {
    background: #dc3545;
    color: white;
}

.delete-btn:hover {
    background: #c82333;
}


/* ================= MODAL ================= */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.modal-content h3 {
    margin-bottom: 20px;
    text-align: center;
}

.modal-content input {
    width: 100%;
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.modal-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.modal-buttons button {
    width: 48%;
}

.cancel-btn {
    background: #6c757d;
    color: white;
}

.cancel-btn:hover {
    background: #5a6268;
}


/* ================= RESPONSIVE ================= */

@media (max-width: 768px) {

    .dashboard-wrapper {
        padding: 20px;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-header input {
        width: 100%;
    }

    .add-btn {
        text-align: center;
    }

    table thead {
        display: none;
    }

    table, tbody, tr, td {
        display: block;
        width: 100%;
    }

    tr {
        margin-bottom: 15px;
        background: white;
        padding: 12px;
        border-radius: 8px;
        box-shadow: 0 3px 8px rgba(0,0,0,0.05);
    }

    td {
        border: none;
        padding: 6px 0;
    }

    td:last-child {
        margin-top: 10px;
    }
}
/* ================= CENTERED PAGE LAYOUT ================= */

.center-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}