:root {
    /* theme normal */
    --accent-color: #E985A1; 
    --bg-color-primary: #f0f0f7; 
    --bg-color-secondary: #FFFFFF; 
    --text-color-primary: #000000; 

    /* normal static  */
    --font-family-system: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --bg-color-darker: #f9f9fc; 
    --text-color-secondary: #8A8A8E; 
    --accent-color-dark: #CE6F8B;
    --border-color: #E6E6EB; 
    --shadow-color: rgba(0, 0, 0, 0.05); 
    --active-tab-bg: #FEE7ED;
    --cute-button-bg: var(--accent-color);
    --cute-button-text: #FFFFFF;
    --reset-btn-bg: #FBB0C7; 
    --progress-circle-bg: var(--accent-color); 
    --progress-circle-fill: #FDE2ED; 
    --error-color: #EF5350;
    --rs-header-bg: #FFF5F7; 
    --rs-task-card-bg: #FFFFFF;
    --rs-task-border: #F8E6EB; 
    --rs-task-text: #666666;
    --rs-due-tomorrow-color: var(--accent-color); 
    --rs-due-7days-color: #7BB37D; 

    /* rgbbbb */
    --accent-color-rgb: 233, 133, 161;
    --cute-button-rgb: 233, 133, 161;
    --reset-btn-rgb: 251, 176, 199;

    --pomodoro-bg-texture: radial-gradient(circle at 100% 150%, var(--bg-color-darker) 24%, var(--bg-color-secondary) 25%, var(--bg-color-secondary) 28%, var(--bg-color-darker) 29%, var(--bg-color-darker) 36%, var(--bg-color-secondary) 36%, var(--bg-color-secondary) 40%, rgba(var(--accent-color-rgb), 0) 40%, rgba(var(--accent-color-rgb), 0)) 0 0,
                         radial-gradient(circle at 0% 150%, var(--bg-color-darker) 24%, var(--bg-color-secondary) 25%, var(--bg-color-secondary) 28%, var(--bg-color-darker) 29%, var(--bg-color-darker) 36%, var(--bg-color-secondary) 36%, var(--bg-color-secondary) 40%, rgba(var(--accent-color-rgb), 0) 40%, rgba(var(--accent-color-rgb), 0)) 50px 50px,
                         radial-gradient(circle at 100% 50%, var(--bg-color-darker) 10%, var(--bg-color-secondary) 11%, var(--bg-color-secondary) 23%, var(--bg-color-darker) 24%, var(--bg-color-darker) 28%, var(--bg-color-secondary) 29%, var(--bg-color-secondary) 34%, rgba(var(--accent-color-rgb), 0) 34%, rgba(var(--accent-color-rgb), 0)) 0 100px,
                         radial-gradient(circle at 0% 50%, var(--bg-color-darker) 10%, var(--bg-color-secondary) 11%, var(--bg-color-secondary) 23%, var(--bg-color-darker) 24%, var(--bg-color-darker) 28%, var(--bg-color-secondary) 29%, var(--bg-color-secondary) 34%, rgba(var(--accent-color-rgb), 0) 34%, rgba(var(--accent-color-rgb), 0)) 50px 150px;
    --pomodoro-bg-size: 100px 100px;
}


body.dark-mode {
    /* dark mode colors */
    --accent-color: #A36CCF; 
    --bg-color-primary: #000000; 
    --bg-color-secondary: #1C1C1E;
    --text-color-primary: #FFFFFF;

    /* static variables for dark mode */
    --bg-color-darker: #2C2C2E; 
    --text-color-secondary: #8D8D93;
    --accent-color-dark: #8E4EDF; 
    --border-color: #38383A; 
    --shadow-color: rgba(0, 0, 0, 0.4); 
    --active-tab-bg: #3A3E4D;
    --reset-btn-bg: #7B50D8;
    --progress-circle-fill: #5B40A3;
    --error-color: #E57373;
    --rs-header-bg: #22252F;
    --rs-task-card-bg: #1C1C1E;
    --rs-task-border: #3A3E4D;
    --rs-task-text: #C0C0C0;
    --rs-due-7days-color: #8BC34A; 

    /* rgb version */
    --accent-color-rgb: 163, 108, 207;
    --cute-button-rgb: 163, 108, 207;
    --reset-btn-rgb: 123, 80, 216;
}



body {
    font-family: var(--font-family-system);
    font-weight: 400; 
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden; 
    background-color: var(--bg-color-primary);
    color: var(--text-color-primary);
    transition: background-color 0.3s, color 0.3s;
}

h1, h2, h3, h4, strong {
    font-weight: 600; 
    color: var(--text-color-primary);
}

.hidden {
    display: none !important;
}


.app-container {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden; 
    background-color: var(--bg-color-primary); 
    transition: filter 0.3s;
}

.app-container.blurred {
    filter: blur(5px) brightness(0.7);
    pointer-events: none;
}


.left-sidebar {
    width: 70px; 
    background-color: var(--bg-color-secondary);
    border-right: 1px solid var(--border-color);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 2px 0 5px var(--shadow-color); 
    flex-shrink: 0;
    z-index: 10;
    transition: width 0.3s ease;
    overflow: hidden;
}

.left-sidebar:hover {
    width: 220px;
}

.sidebar-logo {
    font-size: 2em;
    color: var(--accent-color);
    margin-bottom: 25px;
}

.tabs-nav {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 15px;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-color-secondary);
    padding: 12px;
    font-size: 1.1em;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* icon 2 the left */
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
    outline: none; 
    font-family: var(--font-family-system);
    width: 100%;
    box-sizing: border-box;
}

.tab-btn:disabled {
    color: var(--border-color);
    cursor: not-allowed;
    background: none !important;
    box-shadow: none !important;
}

.tab-btn:disabled i {
    color: var(--border-color) !important;
}


.tab-btn i {
    font-size: 1.5em; 
    color: var(--text-color-secondary); 
    width: 46px; /* iconnn */
    text-align: center;
    flex-shrink: 0;
}
.sidebar-label {
    margin-left: 10px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease 0.1s; /* opacity transition */
}
.left-sidebar:hover .sidebar-label {
    opacity: 1;
}

.tab-btn:hover:not(:disabled) {
    background-color: var(--border-color);
    color: var(--text-color-primary);
    box-shadow: 0 2px 4px var(--shadow-color);
}

.tab-btn.active {
    background-color: var(--active-tab-bg);
    color: var(--accent-color);
    box-shadow: 0 4px 8px var(--shadow-color);
}

.tab-btn.active i {
    color: var(--accent-color); 
}



.main-content {
    flex-grow: 1;
    background-color: var(--bg-color-primary);
    padding: 30px;
    overflow-y: auto; 
    flex-shrink: 1; 
    transition: margin-left 0.3s ease;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.content-header h2 {
    margin: 0;
}


#tab-content-wrapper > section {
    background-color: var(--bg-color-secondary);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px; 
    box-shadow: 0 4px 10px var(--shadow-color);
  
}
#tab-content-wrapper > section:last-of-type {
    margin-bottom: 0; 
}


#dashboard-content {
    min-height: calc(100% - 60px); 
    display: flex;
    flex-direction: column;
    background: transparent;
    box-shadow: none;
    margin-bottom: 0;
}
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.dashboard-header h2 {
    font-size: 2em;
    color: var(--text-color-primary);
    margin: 0;
}
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 20px;
    flex-grow: 1;
}


.dashboard-card {
    border-radius: 16px; 
    padding: 20px;
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
    min-height: 180px; 
    position: relative; 
    font-family: var(--font-family-system);
    background: var(--bg-color-secondary);
    border: 1px solid var(--border-color);
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}
.dashboard-card-main {
    cursor: pointer;
    flex-grow: 1;
}

.dashboard-card .card-grade { 
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(var(--accent-color-rgb), 0.1);
    color: var(--accent-color);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 1.1em; 
    font-weight: 800; 
    border: 1px solid rgba(var(--accent-color-rgb), 0.2);
}

.dashboard-card h4 {
    color: var(--text-color-primary); 
    font-size: 1.3em;
    margin-top: 0;
    margin-bottom: 5px;
}
.dashboard-card .card-units {
    color: var(--text-color-secondary);
    font-size: 0.9em;
    margin-bottom: 10px;
    line-height: 1.3;
}
.card-actions {
    position: absolute;
    bottom: 15px;
    right: 15px;
    display: flex;
    gap: 5px;
    padding: 5px;
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.2s;
}
.dashboard-card:hover .card-actions {
    opacity: 1;
}

.card-item-icons {
    position: absolute;
    bottom: 15px;
    left: 15px;
    display: flex;
    gap: 12px;
    color: var(--text-color-secondary);
    font-size: 1.1em;
}

.card-item-icons .icon-group {
    display: flex;
    align-items: center;
    gap: 4px;
}


input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="month"],
input[type="url"],
select,
.modal-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px; 
    border: 1px solid var(--border-color);
    border-radius: 8px; 
    font-size: 1em;
    background-color: var(--bg-color-darker);
    color: var(--text-color-primary);
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
    appearance: none; 
    -webkit-appearance: none;
    -moz-appearance: none;
    outline: none; 
    box-sizing: border-box;
    font-family: var(--font-family-system);
}
input::placeholder,
select option[value=""] {
    color: var(--text-color-secondary);
}
input:focus,
select:focus,
.modal-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(var(--accent-color-rgb), 0.2); 
}

select {
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23888888" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 30px; 
}

body.dark-mode select {
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23E0E0E0" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
}



.todo-form {
    display: flex;
    flex-wrap: wrap; 
    gap: 15px; 
    margin-bottom: 25px;
    align-items: center;
}
.todo-form input,
.todo-form select {
    flex: 1 1 200px; 
    margin-bottom: 0; 
}
.todo-form button {
    flex-shrink: 0; 
    padding: 12px 25px; 
}


.todo-table, .gwa-table {
    width: 100%;
    border-collapse: separate; 
    border-spacing: 0 10px; 
    margin-top: 20px;
}
.todo-table th, .gwa-table th {
    background-color: transparent;
    color: var(--text-color-secondary);
    padding: 12px 15px;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
    font-family: var(--font-family-system);
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
}
.todo-table tbody tr, .gwa-table tbody tr {
    background-color: var(--bg-color-secondary);
    border-radius: 8px; 
    box-shadow: 0 2px 8px rgba(var(--accent-color-rgb), 0.08); 
    transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.todo-table tbody tr:hover, .gwa-table tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--accent-color-rgb), 0.15);
}
.todo-table td, .gwa-table td {
    padding: 15px; 
    border: none; 
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color-primary);
    font-size: 0.95em;
    vertical-align: middle;
    font-family: var(--font-family-system);
}
.todo-table tr td:first-child, .gwa-table tr td:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}
.todo-table tr td:last-child, .gwa-table tr td:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}
.todo-table tbody tr td, .gwa-table tbody tr td {
    border-bottom: none;
}


.todo-table input[type="checkbox"] {
    width: 20px;
    height: 20px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 2px solid var(--accent-color);
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    outline: none;
    transition: background-color 0.2s, border-color 0.2s;
    margin-bottom: 0; 
}
.todo-table input[type="checkbox"]:checked {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}
.todo-table input[type="checkbox"]:checked::after {
    content: '\2713'; 
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.1em;
    font-weight: bold;
}
.todo-table input[type="checkbox"]:focus {
    box-shadow: 0 0 0 3px rgba(var(--accent-color-rgb), 0.3);
}

.todo-table .status-btn {
    background-color: var(--bg-color-darker);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.85em;
    cursor: default;
    transition: background-color 0.2s, color 0.2s;
    color: var(--text-color-primary);
    font-family: var(--font-family-system);
}
.todo-table .status-btn.not-started { color: var(--text-color-secondary); }
.todo-table .status-btn.in-progress { background-color: #FDD835; color: #333; } 
.todo-table .status-btn.completed { background-color: #8BC34A; color: white; } 

.action-btn {
    background: none;
    border: none;
    color: var(--text-color-secondary);
    font-size: 1.1em;
    cursor: pointer;
    margin-left: 5px;
    transition: color 0.2s, transform 0.1s;
    outline: none;
    font-family: var(--font-family-system);
}
.action-btn:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}
.action-btn.delete-task-btn:hover, .action-btn.delete-grade-btn:hover, .action-btn.delete-extracurricular-btn:hover {
    color: var(--reset-btn-bg);
}



.gwa-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: flex-end; 
}
#gwa-display {
    background-color: var(--bg-color-darker);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px; 
    text-align: center;
    font-size: 1.8em; 
    color: var(--accent-color);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.04);
    font-family: var(--font-family-system);
    line-height: 1.2;
    font-weight: 600;
}
.gwa-table .grade-dropdown {
    width: 100%; 
    text-align: center;
    padding: 8px 12px;
    margin-bottom: 0; 
    font-size: 1em;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color-darker);
    color: var(--text-color-primary);
}
.gwa-table .grade-dropdown:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(var(--accent-color-rgb), 0.2); 
}
.gwa-table .final-grade-display {
    font-weight: bold;
    color: var(--accent-color);
    text-align: center;
}

.empty-message {
    text-align: center;
    color: var(--text-color-secondary);
    padding: 20px;
    font-style: italic;
    font-family: var(--font-family-system);
}
.empty-message a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
}


#pomodoro-content {
    background: var(--bg-color-secondary);
    background-image: var(--pomodoro-bg-texture);
    background-size: var(--pomodoro-bg-size);
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px; 
    overflow: hidden; 
    position: relative;
    box-shadow: 0 8px 20px var(--shadow-color); 
}
#pomodoro-content h2 {
    margin-top: 0;
    margin-bottom: 30px;
    color: var(--accent-color);
    font-size: 2.2em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
    font-family: var(--font-family-system);
}

.pomodoro-timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background-color: rgba(var(--accent-color-rgb), 0.05); 
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px 40px;
    box-shadow: inset 0 0 10px rgba(var(--accent-color-rgb), 0.1), 0 8px 20px rgba(var(--accent-color-rgb), 0.2); /* Deeper shadows */
    width: 100%;
    max-width: 450px;
    margin: auto;
}

.timer-display-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    background-color: var(--bg-color-darker);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1), 0 5px 15px rgba(var(--accent-color-rgb), 0.2);
    border: 5px solid var(--border-color);
}
.timer-display {
    font-family: var(--font-family-system);
    font-size: 4em;
    color: var(--accent-color);
    text-shadow: 2px 2px 5px rgba(0,0,0,0.1);
    letter-spacing: -2px; 
}

#current-task {
    font-size: 1.2em; 
    color: var(--text-color-primary);
    margin: 10px 0 20px;
    font-style: italic;
    text-align: center;
    font-family: var(--font-family-system);
}

.pomodoro-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    width: 100%;
}
.pomodoro-controls input,
.pomodoro-controls select {
    width: 120px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 1em;
    text-align: center;
    margin-bottom: 0;
}
.pomodoro-controls .cute-button {
    flex-grow: 1; 
    min-width: 100px;
    padding: 12px 15px;
}



.right-sidebar {
    width: 320px;
    background-color: var(--bg-color-secondary);
    border-left: 1px solid var(--border-color);
    padding: 25px 20px; 
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 5px var(--shadow-color); 
    overflow-y: auto; 
    flex-shrink: 0; 
    z-index: 10;
    font-family: var(--font-family-system);
}

.right-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}
.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-grow: 1;
    overflow: hidden;
}
.pfp {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
}

.right-sidebar-title {
    color: var(--text-color-primary);
    font-size: 1.2em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#username-display {
    font-weight: bold;
    color: var(--accent-color);
}

.right-sidebar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}


.cute-button-icon-only {
    background: none;
    border: none;
    color: var(--text-color-secondary);
    font-size: 1.2em;
    cursor: pointer;
    padding: 8px; 
    border-radius: 50%; 
    width: 38px; 
    height: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
    outline: none;
    font-family: var(--font-family-system);
}
.cute-button-icon-only:hover {
    background-color: var(--border-color);
    color: var(--text-color-primary);
    box-shadow: 0 2px 5px rgba(var(--accent-color-rgb), 0.1);
}
.cute-button-icon-only:active {
    transform: translateY(1px);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}


.tasks-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}


.progress-circle-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    display: grid; 
    place-items: center;
    margin-bottom: 15px;
}

.progress-ring {
    position: absolute; 
    top: 0;
    left: 0;
    transform: rotate(-90deg); 
    grid-row: 1 / 1;
    grid-column: 1 / 1;
}

.progress-ring-circle {
    stroke: var(--progress-circle-fill);
    transition: stroke-dashoffset 0.35s;
}

.progress-ring-progress {
    stroke: var(--progress-circle-bg);
    transition: stroke-dashoffset 0.35s;
}

.progress-text-overlay {
    grid-row: 1 / 1;
    grid-column: 1 / 1;
    text-align: center;
    color: var(--text-color-primary);
    font-family: var(--font-family-system);
    line-height: 1.2;
}
.progress-text-overlay span {
    display: block;
}
#progress-percentage { 
    font-size: 2em; 
    color: var(--accent-color);
}
#progress-count {
    margin-top: 2px;
    font-size: 1.2em;
    color: var(--text-color-primary); 
}
.progress-text-overlay span:last-child { 
    font-size: 1em;
    color: var(--text-color-secondary);
}


.task-stats {
    display: flex;
    justify-content: space-around;
    width: 100%;
}

.stat-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.9em;
    color: var(--text-color-secondary);
    font-family: var(--font-family-system);
}
.stat-item .stat-icon {
    font-size: 2em; 
    color: var(--text-color-secondary); 
    margin-bottom: 8px; 
}
.stat-item .stat-value {
    font-size: 1.8em; 
    color: var(--text-color-primary);
    line-height: 1; 
}
.stat-item .stat-label {
    font-size: 0.85em; 
    margin-top: 5px;
    white-space: nowrap; 
}
.stat-item .stat-completed {
    color: #8BC34A; 
}


.upcoming-tasks {
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
}

.upcoming-header {
    color: var(--text-color-primary);
    font-size: 1.1em;
    margin-top: 20px;
    margin-bottom: 10px;
    font-family: var(--font-family-system);
}

.task-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.task-list li {
    background-color: var(--rs-task-card-bg); 
    border: 1px solid var(--rs-task-border); 
    border-radius: 8px; 
    padding: 12px 15px;
    margin-bottom: 10px; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    box-shadow: 0 2px 8px var(--shadow-color);
    font-family: var(--font-family-system);
}
.task-list li:last-child {
    margin-bottom: 0;
}
.task-list .empty-list-item {
    font-style: italic;
    color: var(--text-color-secondary);
    justify-content: center;
    background: none;
    box-shadow: none;
    border: none;
}


.task-list li .task-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    margin-right: 10px; 
}

.task-list li .task-name {
    color: var(--text-color-primary);
    margin-bottom: 3px;
    font-size: 1em;
}

.task-list li .task-course { 
    color: var(--rs-task-text);
    font-size: 0.85em;
}

.task-list li .task-date {
    color: var(--rs-task-text);
    font-size: 0.8em;
    white-space: nowrap; 
    text-align: right;
}


#due-tomorrow-list li::before {
    content: '\f073'; 
    font-family: 'Font Awesome 5 Free';
    font-weight: 900; 
    color: var(--rs-due-tomorrow-color);
    margin-right: 10px;
    font-size: 1.2em;
}
#due-7-days-list li::before {
    content: '\f073'; 
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--rs-due-7days-color);
    margin-right: 10px;
    font-size: 1.2em;
}


.add-task-right-sidebar {
    width: 100%;
    margin-top: auto; 
    padding: 12px 15px;
    font-size: 1.1em;
    border-radius: 8px;
}



.cute-button {
    background-color: var(--cute-button-bg);
    color: var(--cute-button-text);
    border: none;
    padding: 10px 20px;
    border-radius: 8px; 
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 8px rgba(var(--cute-button-rgb), 0.3); 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none; 
    outline: none; 
    position: relative; 
    overflow: hidden; 
    font-family: var(--font-family-system);
}

.cute-button:hover {
    background-color: var(--accent-color-dark); 
    transform: translateY(-2px); 
    box-shadow: 0 6px 12px rgba(var(--cute-button-rgb), 0.35); 
}

.cute-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(var(--cute-button-rgb), 0.2); 
}

.cute-button.reset-btn {
    background-color: var(--reset-btn-bg);
    box-shadow: 0 4px 8px rgba(var(--reset-btn-rgb), 0.3);
}
.cute-button.reset-btn:hover {
    filter: brightness(0.9); 
    box-shadow: 0 8px 16px rgba(var(--reset-btn-rgb), 0.4);
}



.cute-button:disabled {
    background-color: var(--border-color); 
    color: var(--text-color-secondary);
    cursor: not-allowed;
    opacity: 0.7;
    transform: none; 
    box-shadow: none;
}
.cute-button:disabled:hover {
    background-color: var(--border-color); 
    box-shadow: none;
}


.timer-btn { 
  
    padding: 8px 15px;
    min-width: unset; 
    flex-grow: 0;
}
.timer-btn:disabled {
    background-color: var(--border-color);
    cursor: not-allowed;
    opacity: 0.7;
}

.back-btn {
    margin-bottom: 20px;
}



#modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2); 
    display: grid; 
    place-items: center;
    z-index: 1000;
    backdrop-filter: blur(8px); 
    -webkit-backdrop-filter: blur(8px); 
    padding: 15px;
    box-sizing: border-box;
}


.modal-content {
    background: var(--bg-color-secondary);
    border: 1px solid var(--border-color);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 500px; 
    animation: fadeIn 0.3s ease-out;
    z-index: 1001; 
    max-height: 90vh; 
    overflow-y: auto; 
    font-family: var(--font-family-system);
    display: flex;
    flex-direction: column;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

#auth-modal {
    max-width: 400px;
}
.auth-form {
    text-align: center;
}
.auth-title {
    font-size: 2em;
    color: var(--text-color-primary);
    margin-bottom: 5px;
}
.auth-subtitle {
    font-size: 1em;
    color: var(--text-color-secondary);
    margin-top: 0;
    margin-bottom: 25px;
}
.auth-button {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
    margin-top: 10px;
}
.auth-switch {
    margin-top: 20px;
    font-size: 0.9em;
    color: var(--text-color-secondary);
}
.auth-switch a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
}
.auth-error {
    color: var(--error-color);
    font-size: 0.9em;
    margin-top: -5px;
    margin-bottom: 10px;
    text-align: left;
}

#notebook-editor-modal {
    max-width: 95vw;
    width: 95vw;
    height: 90vh;
    max-height: 90vh;
    padding: 15px;
}

.quill-editor-content {
    flex-grow: 1; 
    display: flex;
    flex-direction: column; 
}
.ql-toolbar.ql-snow {
    border-radius: 6px 6px 0 0;
    border-color: var(--border-color);
    background-color: var(--bg-color-darker);
    color: var(--text-color-primary); 
    font-family: var(--font-family-system);
}
.ql-toolbar.ql-snow .ql-stroke { stroke: var(--text-color-primary); }
.ql-toolbar.ql-snow .ql-fill { fill: var(--text-color-primary); }
.ql-toolbar.ql-snow .ql-picker-label { color: var(--text-color-primary); font-family: var(--font-family-system); }
.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label { background-color: var(--border-color); border-color: var(--accent-color); }
.ql-container.ql-snow {
    border-radius: 0 0 6px 6px;
    border-color: var(--border-color);
    background-color: var(--bg-color-primary);
    color: var(--text-color-primary);
    flex-grow: 1; 
    font-family: var(--font-family-system);
}
.ql-editor {
    min-height: 150px; 
    color: var(--text-color-primary);
    font-family: var(--font-family-system);
}


.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    gap: 15px;
    flex-shrink: 0;
}
.modal-header h3 {
    margin: 0;
    color: var(--accent-color);
    font-size: 1.5em;
    font-family: var(--font-family-system);
}
.modal-buttons {
    display: flex;
    justify-content: flex-end; 
    gap: 10px;
    margin-top: 20px;
    flex-shrink: 0;
}


#settings-modal {
    max-width: 450px;
    padding: 20px;
}
.settings-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
    gap: 15px;
}
.settings-option:last-child {
    border-bottom: none;
}
.settings-option label {
    font-size: 1.1em;
    color: var(--text-color-primary);
    flex-shrink: 0;
}
#pfp-url-input {
    flex-grow: 1;
    margin-bottom: 0;
}


.switch {
    position: relative;
    display: inline-block;
    width: 45px; 
    height: 25px; 
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color); 
    transition: .4s;
    border-radius: 25px; 
}
.slider:before {
    position: absolute;
    content: "";
    height: 19px; 
    width: 19px;
    left: 3px;
    bottom: 3px;
    background-color: var(--bg-color-secondary); 
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
input:checked + .slider {
    background-color: var(--accent-color); 
}
input:focus + .slider {
    box-shadow: 0 0 1px var(--accent-color);
}
input:checked + .slider:before {
    transform: translateX(20px); 
}

/* color picker style / FIX // error: not saving..  */
.color-picker-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 10px;
}
.color-picker-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.color-picker-group label {
    font-size: 1em;
}
input[type="color"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 40px;
    height: 40px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}
input[type="color"]::-webkit-color-swatch {
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
input[type="color"]::-moz-color-swatch {
    border-radius: 8px;
    border: 1px solid var(--border-color);
}


.notes-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}


.flashcard-folders-view, .flashcard-detail-view, .flashcard-review-timed-view, .flashcard-review-type-view {
    padding: 25px;
    background-color: var(--bg-color-secondary);
    border-radius: 8px;
    box-shadow: 0 4px 10px var(--shadow-color);
    margin-bottom: 25px;
}
.folders-grid, .notebooks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 20px 0;
}
.folder-card, .notebook-card {
    background-color: var(--bg-color-darker);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(var(--accent-color-rgb), 0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
    font-family: var(--font-family-system);
    display: flex;
    flex-direction: column;
}
.folder-card:hover, .notebook-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(var(--accent-color-rgb), 0.2);
}
.folder-card h4, .notebook-card h4 {
    margin-top: 0;
    margin-bottom: 5px;
    color: var(--text-color-primary);
    font-size: 1.1em;
    word-break: break-word;
}
.folder-card p, .notebook-card p {
    font-size: 0.85em;
    color: var(--text-color-secondary);
    margin: 0;
}

.flashcard-actions, .resource-actions {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
}
.flashcard-card {
    background-color: var(--bg-color-darker);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    min-height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    text-align: center;
    cursor: pointer;
    perspective: 1000px; 
    box-shadow: 0 5px 15px rgba(var(--accent-color-rgb), 0.2);
    margin-bottom: 20px;
    position: relative;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    font-family: var(--font-family-system);
}
.flashcard-front, .flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}
.flashcard-back {
    transform: rotateY(180deg);
}
.flashcard-card.flipped {
    transform: rotateY(180deg);
}
.flashcards-list { 
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 0;
}
.flashcards-list .flashcard-item {
    background-color: var(--bg-color-darker);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 15px;
    font-size: 0.9em;
    color: var(--text-color-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-grow: 1; 
    box-shadow: 0 2px 5px rgba(var(--accent-color-rgb), 0.1);
    font-family: var(--font-family-system);
}

.review-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}
#type-answer-input {
    text-align: center;
    width: calc(100% - 40px);
    margin: auto;
    margin-bottom: 10px;
    display: block;
}
.feedback-message {
    text-align: center;
    margin-top: 5px;
    font-family: var(--font-family-system);
    min-height: 1.2em;
}
.feedback-message.correct { color: #8BC34A; }
.feedback-message.incorrect { color: #EF5350; }

/* planner thing // FIX (error: not showing right dates) */
.planner-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
#calendar-month-year {
    color: var(--accent-color);
    font-size: 1.5em;
}
.calendar {
    width: 100%;
}
.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: bold;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
    color: var(--text-color-secondary);
}
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}
.calendar-day {
    border: 1px solid var(--border-color);
    min-height: 120px;
    padding: 8px;
    border-radius: 8px; 
    background-color: var(--bg-color-darker);
    transition: background-color 0.2s;
    display: flex;
    flex-direction: column;
}
.calendar-day.other-month {
    background-color: transparent;
    color: var(--text-color-secondary);
    opacity: 0.5;
}
.calendar-day.today {
    background-color: var(--active-tab-bg);
    border-color: var(--accent-color);
}
.day-number {
    font-weight: bold;
    margin-bottom: 5px;
    text-align: right;
}
.calendar-event {
    background-color: var(--accent-color);
    color: var(--cute-button-text);
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}


.subject-detail-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}
.subject-detail-tab-btn {
    background-color: transparent;
    color: var(--text-color-secondary);
    border: none;
    border-bottom: 3px solid transparent;
    padding: 8px 15px;
    font-size: 1.1em;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    border-radius: 5px 5px 0 0;
    font-family: var(--font-family-system);
}
.subject-detail-tab-btn:hover {
    color: var(--text-color-primary);
    background-color: var(--bg-color-darker);
}
.subject-detail-tab-btn.active {
    color: var(--accent-color);
    border-color: var(--accent-color);
}
.detail-tab-content {
    padding: 10px 0;
}
#subject-tasks-list li {
    background-color: var(--bg-color-darker);
    box-shadow: none;
    border: 1px solid var(--border-color);
}
#subject-notebooks-grid .notebook-card,
#subject-flashcards-list .folder-card { 
    background-color: var(--bg-color-darker);
    box-shadow: none;
    border: 1px solid var(--border-color);
}


.notebook-editor-view {
    height: 100%;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 0; 
}

.shared-by-indicator {
    font-size: 0.8em !important;
    font-style: italic;
    color: var(--accent-color) !important;
    margin-top: 4px !important;
    display: block; 
}


/* GRADE CALCU STYLE */
.grade-calc-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}
.grade-calc-setup {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}
.grade-calc-setup label {
    font-weight: 500;
}
.grade-calc-setup select {
    max-width: 300px;
    margin-bottom: 0;
}
.grade-calc-components-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.grade-calc-component {
    background-color: var(--bg-color-darker);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
}
.grade-calc-component legend {
    font-weight: bold;
    color: var(--accent-color);
    padding: 0 10px;
    margin-left: 10px;
}
.grade-calc-score-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.grade-calc-score-row label {
    width: 30px;
    text-align: right;
    font-size: 0.9em;
    color: var(--text-color-secondary);
}
.grade-calc-score-row input {
    margin-bottom: 0;
    text-align: center;
    flex: 1;
}
#grade-calc-results .result-label {
    font-size: 0.7em;
    color: var(--text-color-secondary);
}


.extracurriculars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.extracurricular-card {
    background-color: var(--bg-color-darker);
    border-left: 5px solid var(--accent-color);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-color);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    cursor: pointer;
}
.extracurricular-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--shadow-color);
}
.extracurricular-card .card-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    padding: 0;
}
.extracurricular-card h4 {
    margin: 0 0 5px 0;
    color: var(--text-color-primary);
}
.extracurricular-card .category {
    font-size: 0.8em;
    font-weight: bold;
    color: var(--accent-color);
    text-transform: uppercase;
    margin-bottom: 5px;
}
.extracurricular-card .role {
    font-size: 0.9em;
    color: var(--text-color-secondary);
}

/* EXTRACURRICULAR  */
#extracurricular-detail-modal {
    max-width: 600px;
}
.detail-add-form {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.detail-add-form input {
    margin-bottom: 0;
    flex-grow: 1;
}
.detail-item-list {
    list-style: none;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
}
.detail-item-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-color-darker);
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
}


@media (max-width: 1024px) {
    .right-sidebar {
        width: 280px;
    }
    .main-content {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    body {
        height: auto;
        overflow: auto;
    }
    .app-container {
        flex-direction: column;
        height: auto;
    }
    .left-sidebar {
        width: 100%;
        height: 60px; 
        flex-direction: row;
        padding: 0;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        order: 1; 
        overflow-x: auto;
        overflow-y: hidden;
    }
    .left-sidebar:hover {
        width: 100%; /* no width change for modible */
    }
    .sidebar-logo {
        display: none;
    }
    .sidebar-label {
        display: none; /* no labels for mobie version */
    }
    .tabs-nav {
        flex-direction: row;
        justify-content: flex-start;
        gap: 5px;
        padding: 0 10px;
    }
    .tab-btn {
        padding: 10px;
        flex-shrink: 0;
        justify-content: center;
    }
    .tab-btn i {
        font-size: 1.3em;
        width: auto;
    }

    .main-content {
        order: 2; 
        padding: 15px;
    }
    #tab-content-wrapper > section {
        padding: 15px;
    }
    .dashboard-header, .pomodoro-controls, .todo-form, .content-header {
        flex-direction: column;
        align-items: stretch;
    }
    .right-sidebar {
        width: 100%;
        order: 3; 
        border-left: none;
        border-top: 1px solid var(--border-color);
    }
    
    
    .todo-table, .gwa-table {
        border: none;
    }
    .todo-table thead, .gwa-table thead {
        display: none; 
    }
    .todo-table tr, .gwa-table tr {
        display: block;
        margin-bottom: 15px;
        border-radius: 8px;
        border: 1px solid var(--border-color);
        box-shadow: 0 2px 5px var(--shadow-color);
    }
    .todo-table td, .gwa-table td {
        display: block;
        text-align: right; 
        padding-left: 50%; 
        position: relative;
        border-bottom: 1px dotted var(--border-color);
    }
    .todo-table td:last-child, .gwa-table td:last-child {
        border-bottom: none;
    }
    
    .todo-table td::before, .gwa-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        font-weight: bold;
        text-align: left;
        color: var(--accent-color);
    }

    .calendar-day {
        min-height: 80px;
        font-size: 0.8em;
    }

}