/* ==============================
   GLOBAL STYLING
================================ */

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f4f6f8;
}

.container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
}

h2 {
    margin-bottom: 20px;
}

/* ==============================
   NAVBAR
================================ */

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: #1e293b;
    color: white;
}

.nav-logo {
    font-size: 18px;
    font-weight: bold;
    color: white;
}

.navbar a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    font-weight: 500;
}

.navbar a:hover {
    opacity: 0.8;
}

.navbar a {
    color: white;
    margin-left: 15px;
    text-decoration: none;
}

.logged-in {
    color: white;
    margin-right: 15px;
    font-weight: bold;
}

/* ==============================
   CARD DESIGN
================================ */

.card {
    background: white;
    padding: 30px;
    margin-bottom: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.large-card {
    overflow-x: auto;
}

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

.btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: #2563eb;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    margin-right: 10px;
    margin-top: 20px;
}

.btn:hover {
    opacity: 0.9;
}

.btn.secondary {
    background-color: #4b5563;
}

.btn.teacher {
    background-color: #7c3aed;
}

/* ==============================
   FORMS
================================ */

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

label {
    margin-top: 10px;
    margin-bottom: 5px;
    font-weight: bold;
}

input {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

button {
    margin-top: 20px;
    padding: 10px;
    border-radius: 6px;
    border: none;
    background-color: #2563eb;
    color: white;
    font-size: 14px;
    cursor: pointer;
}

button:hover {
    background-color: #1e5ed6;
}

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

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

th, td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

th {
    background-color: #f0f3f7;
}

/* ==============================
   ERROR MESSAGE
================================ */

.error {
    background: #ffe0e0;
    color: #a10000;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.error-message {
    background-color: #fee2e2;
    color: #b91c1c;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
}

.investment-table {
    width: 100%;
    max-width: 600px;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.investment-table td {
    border-bottom: 1px solid #ddd;
    padding: 8px;
}

.investment-table tr:last-child td {
    border-bottom: 2px solid #333;
}
details {
    margin-bottom: 15px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 6px;
}

summary {
    cursor: pointer;
    font-size: 1.05em;
    margin-bottom: 8px;
}

details ul {
    margin-top: 8px;
}

details {
    margin-bottom: 15px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 6px;
}

summary {
    cursor: pointer;
    font-size: 1.05em;
    margin-bottom: 8px;
}

details table {
    margin-top: 10px;
}

#performanceTable th:hover {
    background-color: #f0f0f0;
}

.sortable {
cursor:pointer;
}

.sortable:hover {
background-color:#f2f2f2;
}

.my-team {
    background-color: #f3f3f3;
    font-weight: 600;
}

#performanceTable tr.my-team td {
    background-color: #f3f3f3;
}

.performance-style td {
    vertical-align: top;
}

.performance-style td div {
    margin: 1px 0;
}

.process-header td {
    border-top: 2px solid #ddd;
    padding-top: 10px;
}

.run-row td {
    vertical-align: middle;
}

.run-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 4px;
}

.run-row input {
    width: 90px;
}

.run-row button {
    width: 24px;
    height: 24px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-run-btn {
    margin-top:6px;
}

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

.error-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: rgba(0,0,0,0.6);

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 2000;
}

.error-modal {
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 380px;

    box-shadow: 0 8px 30px rgba(0,0,0,0.4);

    text-align: left;
}

.error-modal h2 {
    margin-top: 0;
}

.error-modal ul {
    margin-top: 10px;
    margin-bottom: 20px;
}

.error-modal button {
    background-color: #2563eb;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
}