/* style.css - TimelineFlow Project Scheduler */

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

body {
    background: #eef2f5;
    /*font-family: system-ui, 'Segoe UI', sans-serif;*/
    font-family: Arial, Helvetica, sans-serif;
    padding: 12px;
    color: #1a2c3e;
}

.app-wrapper {
    margin: 0 auto;
    background: white;
    border-radius: 28px;
    overflow-x: auto;
}

.app-inner {
    min-width: 680px;
    padding: 0.8rem 1rem 1.5rem;
}

/* Top bar */
.top-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    border-bottom: 1px solid #e2edf2;
    padding-bottom: 14px;
}

.view-group {
    display: flex;
    gap: 8px;
    background: #dee6f0;
    padding: 6px;
    border-radius: 60px;
}

.view-btn {
    border: none;
    background: transparent;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 18px;
}

.view-btn.active {
    background: #b9c7f4;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    color: #1a6ea8;
}

.nav-controls {
    display: flex;
    gap: 8px;
    background: #dee6f0;
    padding: 6px;
    border-radius: 60px;
    align-items: center;
}

.nav-btn {
    background: #b9c7f4;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    /*font-family: monospace;*/
    font-family: Arial, Helvetica, sans-serif;

    line-height: 1;
    padding: 10px 20px;
}

.date-label {
    background: white;
    padding: 10px 20px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    color: #2c4f6e;
}

#todayBtn {
    background: #b9c7f4;
    border-radius: 40px;
    padding: 10px 20px;
    border: none;
    width: auto;
}

.mgmt-btn {
    background: #b9c7f4;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    padding: 10px 18px;
}

.logout-btn {
    background: #f9c5c3;
    color: #b13e3e;
    padding: 10px 18px;
}

.lang-btn {
    background: #b9c7f4;
    border: none;
    padding: 10px 18px;
    border-radius: 40px;
    cursor: pointer;
}

.delete-btn {
    background: #ffe6e5;
    color: #b13e3e;
    margin-left: 8px;
    border: none;
    padding: 8px 16px;
    border-radius: 40px;
    cursor: pointer;
}

button.primary {
    background: #1a6ea8;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
}

#loginBtn {
    background: #1a6ea8;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 40px;
    cursor: pointer;
    width: auto;
}

.allBtns {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0c568b;
    padding: 6px 20px;
    min-height: 50px;
}

/* Modal styles (improved from old standalone file) */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 10001;
}

.modal-content {
    background: white;
    border-radius: 9px;
    max-width: 560px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 28px;
    box-shadow: 0 20px 35px -12px rgba(0,0,0,0.2);
}

.form-group {
    margin-bottom: 14px;
}

label {
    font-weight: 500;
    font-size: 0.8rem;
    display: block;
    margin-bottom: 5px;
    color: #1a2c3e;
}

input, select, textarea {
    width: 100%;
    padding: 10px 14px;
    border-radius: 24px;
    border: 1px solid #cbdde6;
    /*font-family: inherit;*/
    font-family: Arial, Helvetica, sans-serif;

    font-size: 0.9rem;
}

.note-chip {
    background: #eff3f6;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 40px;
    margin: 4px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: background 0.2s;
}

.note-chip:hover {
    background: #e2e8f0;
}

/* Buttons inside modal */
#cancelProjectBtn, #cancelUserBtn {
    background: #eef2ff;
    border: none;
    padding: 8px 16px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 500;
}

/* Timeline table (unchanged) */
.timeline-wrapper {
    overflow-x: auto;
    overflow-y: visible;
    width: 100%;
    position: relative;
}

.timeline-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.timeline-table th,
.timeline-table td {
    border: 1px solid #e9edf2;
    padding: 8px 6px;
    text-align: center;
    vertical-align: middle;
}

.timeline-table th:not(:first-child),
.timeline-table td:not(:first-child) {
    white-space: normal;
    word-break: break-word;
}

.timeline-table th {
    background: #fafdff;
    font-weight: 600;
    position: sticky;
    top: 0;
    background-color: #f8fafc;
    z-index: 10;
}

.project-row td:first-child {
    position: sticky;
    left: 0;
    background: white;
    z-index: 5;
    font-weight: 500;
    text-align: left;
    min-width: 180px;
}

.resize-handle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    cursor: col-resize;
    background: transparent;
    z-index: 20;
}

.resize-handle:hover {
    background: #aaa;
}

.timeline-cell {
    height: auto;
    min-height: 56px;
    cursor: pointer;
    background-color: #f9fafb;
    vertical-align: top;
    text-align: left;
    padding: 6px;
}

.active-bg {
    background-color: var(--rectColor);
    opacity: 0.8;
}

.notes-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.note-item {
    background-color: var(--noteColor);
    padding: 5px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    text-align: left;
    white-space: normal;
    word-break: break-word;
    color: #000;
    opacity: 0.9;
    width: 100%;
    box-sizing: border-box;
    max-width: 150px;
}

.today-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: red;
    border-left: 2px dotted red;
    pointer-events: none;
    z-index: 30;
    transform: translateX(-50%);
}

#floatingTooltip {
    position: fixed;
    background: #1f2f3c;
    color: white;
    font-size: 0.75rem;
    padding: 10px 14px;
    border-radius: 16px;
    white-space: pre-line;
    line-height: 1.4;
    /*font-family: monospace;*/
    font-family: Arial, Helvetica, sans-serif;
    box-shadow: 0 6px 14px rgba(0,0,0,0.2);
    pointer-events: none;
    z-index: 100000;
    max-width: 300px;
    min-width: 220px;
    display: none;

    white-space: normal;
    word-break: break-word;
    line-height: 1.3;
    /*max-width: 100%;*/
    height: auto;
}

.login-box {
    max-width: 320px;
    margin: 60px auto;
    text-align: center;
}

/* Date picker styles */
.date-picker {
    background: white;
    border-radius: 40px;
    padding: 6px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.month-select {
    background: transparent;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    /*font-family: inherit;*/
    font-family: Arial, Helvetica, sans-serif;

    color: #1a2c3e;
}

.year-display {
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 20px;
    background: #eef2ff;
    transition: background 0.2s;
}

.year-display:hover {
    background: #d9e2ef;
}

.year-input-popup {
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    border-radius: 24px;
    padding: 12px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.year-input-popup input {
    width: 100px;
    padding: 8px;
    border-radius: 40px;
    border: 1px solid #ccc;
    text-align: center;
}

/* Button text wrapping */
.allBtns,
.mgmt-btn,
.lang-btn,
.nav-btn,
.view-btn,
.logout-btn,
button {
    white-space: normal;
    word-break: break-word;
    line-height: 1.3;
    /*max-width: 100%;*/
    height: auto;
}

/* Force emoji support */
/*
button,
.mgmt-btn, 
.lang-btn, 
.nav-btn, 
.view-btn, 
.logout-btn {
   font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Twemoji Mozilla", "EmojiOne Color", sans-serif;
}
*/
.icons {
font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Twemoji Mozilla", "EmojiOne Color", sans-serif;
}