/* ============================================
   BASE STYLES
   ============================================ */

html { 
    overflow-y: scroll; 
}

body { 
    font-family: sans-serif; 
    margin: 0; 
    padding: 0; 
}

input[type="checkbox"] {
    accent-color: #00213B;
}


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

.btn-primary {
    background-color: #00213B;
    color: white;
}

.btn-primary:hover {
    background-color: #003459;
}

.btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: #B49817;
    color: white;
}

.btn-secondary:hover {
    background-color: #9a8214;
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   LOGIN PAGE
   ============================================ */

body.login-page { 
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #B49817 0%, #00213B 100%);
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-container h2 {
    margin-top: 0;
    color: #333;
    text-align: center;
}

.login-container .form-group {
    margin-bottom: 20px;
}

.login-container label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

.login-container input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.login-container input[type="password"]:focus {
    outline: none;
    border-color: #00213B;
}

.login-container input[type="password"]:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

.login-container .checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.login-container input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.login-container .checkbox-group label {
    margin: 0;
    cursor: pointer;
    font-weight: normal;
}

.login-container button {
    width: 100%;
    padding: 12px;
    background: #00213B;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.login-container button:hover:not(:disabled) {
    background: #003459;
}

.login-container button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.login-container .error {
    color: #e74c3c;
    margin-top: 10px;
    text-align: center;
    font-weight: 500;
}

.login-container .warning {
    color: #f39c12;
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
}

.login-container input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ============================================
   APP LAYOUT
   ============================================ */

#logout { 
    position: fixed; 
    top: 10px; 
    right: 10px; 
    z-index: 100; 
}

/* ============================================
   TOOLTIPS
   ============================================ */

[data-note]:hover::after {
    content: attr(data-note);
    position: absolute;
    background: white;
    color: #1f2937;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    white-space: pre-wrap;
    max-width: 300px;
    z-index: 1000;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    transform: translateX(calc(-100% - 30px));
}

[data-note="Sort by Time"]:hover::after {
    white-space: nowrap;
}

[data-note="Sort by Multi-Versions"]:hover::after {
    white-space: nowrap;
}

[data-note-modal]:hover::after {
    content: attr(data-note-modal);
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    font-weight: normal;
    display: inline-block;
    background: white;
    color: #1f2937;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    white-space: nowrap;
    max-width: 300px;
    z-index: 1000;
    font-size: 0.875rem;
    margin-left: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
}
