/* style.css */
:root {
    --primary-color: #00796b; /* A modern, cool teal */
    --secondary-color: #e0e0e0;
    --accent-color: #ffca28; /* A warm yellow accent */
    --text-color: #333;
    --bg-color: #f4f7fa;
    --card-bg: #ffffff;
    --border-color: #d1d9e0;
    --success-color: #4caf50;
    --danger-color: #d9534f;
    --font-family: 'Roboto', sans-serif;
    --border-radius: 6px;
    --box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
}

/* Login Section */
#loginSection {
    max-width: 450px;
    margin: 50px auto;
    text-align: center;
}

/* Card Styling */
.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    background-color: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h1, .card-header h2, .card-header h3 {
    margin: 0;
    font-weight: 400;
     color: var(--primary-color);
}
.card-header h1 { font-size: 1.8em; }
.card-header h2 { font-size: 1.5em; }
.card-header h3 { font-size: 1.2em; }

.card-content {
    padding: 20px;
}
.card-content ul {
    list-style: none;
    padding: 0;
}
.card-content li {
    background-color: #f0f4f8;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 8px;
    border-left: 3px solid var(--primary-color);
}


.card-footer {
    background-color: #f8f9fa;
    padding: 10px 20px;
    border-top: 1px solid var(--border-color);
    text-align: right;
}

/* Forms */
form label, label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 0.9em;
}

form input[type="text"],
input[type="text"],
input[type="time"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-sizing: border-box;
    font-family: var(--font-family);
    font-size: 1em;
}

/* Buttons */
.button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s ease;
    margin-left: 5px;
}

.button:hover {
    background-color: #004d40; /* Darker teal */
}

.button-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}
.button-outline:hover {
    background-color: rgba(0, 121, 107, 0.1);
    color: #004d40;
}

.button-danger {
    background-color: var(--danger-color);
}
.button-danger:hover {
    background-color: #c9302c;
}

/* Main Application Layout */
.main-nav {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: var(--box-shadow);
}
.nav-left, .nav-right {
    display: flex;
    align-items: center;
}
.nav-right span {
    margin-right: 15px;
}

.main-content {
    display: flex;
    gap: 20px;
}

.sidebar {
    flex: 0 0 220px;
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.sidebar h2 {
    margin-top: 0;
     border-bottom: 1px solid var(--border-color);
     padding-bottom: 10px;
     margin-bottom: 15px;
     color: var(--primary-color);
     font-weight: 400;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}
.nav-menu li {
     margin-bottom: 10px;
}

.nav-button {
    background: none;
    border: none;
    color: var(--text-color);
    padding: 10px 15px;
    text-align: left;
    width: 100%;
    cursor: pointer;
    font-size: 1em;
    border-radius: var(--border-radius);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-button:hover {
    background-color: #e9ecef;
}

.nav-button.active {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
}

.sidebar-footer {
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    font-size: 0.8em;
    color: #6c757d;
    text-align: center;
}


.content-section {
    flex-grow: 1;
}

/* Specific Styles for Tracker */
#timerDisplay {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin: 10px 0 20px 0;
    letter-spacing: 2px;
}

.active-session-info {
    text-align: center;
    margin-bottom: 15px;
}
.active-session-info strong {
    font-size: 1.2em;
}


/* Grid Layout for Dashboard */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* Table Styling */
#historyTableContainer table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}
#historyTableContainer th, #historyTableContainer td {
    border: 1px solid var(--border-color);
    padding: 8px 10px;
    text-align: left;
    font-size: 0.9em;
}
#historyTableContainer th {
    background-color: #e9ecef;
    font-weight: bold;
}

#historyTableContainer tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-content {
    background-color: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 450px;
    text-align: center;
    position: relative;
}
.modal-content h2 {
    margin-top: 0;
    color: var(--primary-color);
}
.modal-content hr {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 20px 0;
}
.calculated-time {
    font-size: 2em;
    font-weight: bold;
    color: var(--primary-color);
    background-color: #f0f4f8;
    padding: 10px;
    border-radius: var(--border-radius);
    margin: 10px 0 20px 0;
}
.manual-override-text {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}
.manual-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}
.manual-input-group input[type="time"] {
    margin-bottom: 0;
}
.button-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.8em;
    color: #aaa;
    cursor: pointer;
}
.button-close:hover {
    color: #333;
}


/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .main-content {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        margin-bottom: 20px;
        position: static;
    }
}

@media (max-width: 576px) {
    .main-nav {
        flex-direction: column;
        align-items: flex-start;
    }
    .nav-right {
        margin-top: 10px;
        width: 100%;
        justify-content: space-between;
    }
    .card-header h1 { font-size: 1.5em; }
    .grid-container {
        grid-template-columns: 1fr;
    }
    #historyTableContainer {
        overflow-x: auto;
    }
    #timerDisplay {
        font-size: 2em;
    }
}