/* TimeTracker - Stylesheet */
/* Minimalistisches, funktionales Design */

:root {
    --color-primary: #2563eb;
    --color-success: #10b981;
    --color-danger: #ef4444;
    --color-warning: #f59e0b;
    --color-text: #1f2937;
    --color-text-light: #6b7280;
    --color-border: #e5e7eb;
    --color-bg: #ffffff;
    --color-bg-light: #f9fafb;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--color-text);
    background-color: var(--color-bg-light);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 200px);
}

/* Page Header with H1 and Burger Menu */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    position: relative;
}

.header-title-section {
    flex: 1;
}

h1 {
    margin: 0 0 5px 0;
    color: var(--color-text);
    font-size: 2rem;
}

.page-subtitle {
    margin: 0;
    color: var(--color-text-light);
    font-size: 1rem;
    font-weight: normal;
}

h1 a {
    transition: opacity 0.2s;
    text-decoration: none;
    color: inherit;
}

h1 a:hover {
    opacity: 0.8;
}

/* Header Logo (replaces text brand name) */
.header-logo-link {
    display: inline-block;
    line-height: 0;
}
.header-logo {
    max-height: 42px;
    width: auto;
    height: auto;
    display: block;
    vertical-align: middle;
}

/* Page logos (FAQ, Imprint) */
.faq-logo,
.imprint-logo {
    text-align: center;
    margin-bottom: 20px;
}
.faq-logo img,
.imprint-logo img {
    max-height: 56px;
    width: auto;
    height: auto;
}

/* Navigation - Burger Menu */
.header-nav {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 10px;
}

h2 {
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.25rem;
}

/* Status-Bereich */
.status-area {
    background: var(--color-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-bottom: 30px;
}

.status-text {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--color-text-light);
}

.session-time {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--color-text);
}

.duration {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--color-primary);
}

#duration-value {
    font-weight: bold;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s;
}

.btn-come {
    background-color: var(--color-success);
    color: white;
    font-size: 1.5rem;
    padding: 20px 40px;
}

.btn-come:hover {
    background-color: #059669;
}

.btn-go {
    background-color: var(--color-danger);
    color: white;
    font-size: 1.5rem;
    padding: 20px 40px;
}

.btn-go:hover {
    background-color: #dc2626;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
}

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

.btn-secondary {
    background-color: var(--color-text-light);
    color: white;
}

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

.btn-small {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.btn-danger {
    background-color: var(--color-danger);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.button-form {
    margin-top: 20px;
}


.burger-menu {
    position: relative;
    z-index: 1000;
}

.burger-button {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.burger-button:hover {
    background-color: var(--color-bg-light);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.burger-button span {
    display: block;
    width: 24px;
    height: 3px;
    background-color: var(--color-text);
    border-radius: 2px;
    transition: all 0.3s ease;
    opacity: 1;
}

.burger-button.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.burger-button.active span:nth-child(2) {
    opacity: 0;
}

.burger-button.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.burger-menu-content {
    position: absolute;
    top: 50px;
    right: 0;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 999;
}

.burger-menu-content.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.burger-menu-content .nav-link {
    display: block;
    padding: 12px 20px;
    color: var(--color-text);
    text-decoration: none;
    border-bottom: 1px solid var(--color-border);
    transition: background-color 0.2s;
}

.burger-menu-content .nav-link:last-child {
    border-bottom: none;
}

.burger-menu-content .nav-link:hover {
    background-color: var(--color-bg-light);
}

.burger-menu-content .nav-link.active {
    background-color: var(--color-primary);
    color: white;
}

.burger-menu-content .nav-link.active:hover {
    background-color: #1d4ed8;
}

.nav-notification {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--color-border);
}

.nav-notification-icon {
    font-size: 1.2rem;
}

/* Padlock Icon for Logged In Users */
.padlock-button {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    cursor: pointer;
    padding: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 1.2rem;
    text-decoration: none;
    color: var(--color-text);
    vertical-align: middle;
}

.padlock-button:hover {
    background-color: var(--color-bg-light);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* User Hash Display */
.user-hash-display {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 10px;
}

.user-hash {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--color-text-light);
    padding: 8px 12px;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    white-space: nowrap;
}

/* Legacy navigation - keep for backward compatibility but hide */
.main-nav {
    display: none;
}

/* Tabellen */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

thead {
    background-color: var(--color-bg-light);
}

th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--color-text);
    border-bottom: 2px solid var(--color-border);
}

td {
    padding: 12px;
    border-bottom: 1px solid var(--color-border);
}

tbody tr:hover {
    background-color: var(--color-bg-light);
}

tbody tr.weekend {
    background-color: #e5e7eb;
}

tbody tr.holiday {
    background-color: #7bf3b5;
}

tbody tr.manual {
    background-color: #dbeafe;
}

tbody tr.vacation {
    background-color: #d1fae5;
}

tbody tr.booked {
    background-color: #d1fae5;
}

tbody tr.overtime {
    background-color: #f37171;
}

tbody tr.past-unbooked {
    background-color: #fef9c3;
}

/* URL Links Block for track.php */
.url-links-block {
    max-width: 800px;
    margin: 40px auto 0;
    padding: 30px;
    background: var(--color-bg);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.url-link-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.url-link-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.url-label {
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.95rem;
}

.url-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.url-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    background: var(--color-bg-light);
    color: var(--color-text);
    word-break: break-all;
}

.url-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-copy {
    padding: 12px 16px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-copy:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.btn-copy:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .url-links-block {
        margin: 30px 20px 0;
        padding: 20px;
    }
    
    .url-input-group {
        flex-direction: column;
    }
    
    .btn-copy {
        width: 100%;
    }
}

/* Badges */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-in {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-out {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Forms */
.filter-area,
.filter-form,
.settings-form,
.login-form,
.edit-form {
    background: var(--color-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.filter-form,
.settings-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    justify-content: center;
}

.filter-form label,
.settings-form label,
.login-form label,
.edit-form label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 0 0 auto;
    min-width: 150px;
}

.btn-filter-submit {
    padding: 12px 30px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    height: fit-content;
    align-self: flex-end;
}

.btn-filter-submit:hover {
    background: #1d4ed8;
}

label {
    font-weight: 500;
    color: var(--color-text);
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.login-form-container {
    max-width: 400px;
    margin: 0 auto;
    background: var(--color-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.login-form,
.edit-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 10px;
}

/* Messages */
.success-message,
.error-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.success-message {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.error-message {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Summary Box */
.summary-box {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.summary-item {
    flex: 1;
    min-width: 200px;
    background: var(--color-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.summary-item.positive {
    border-left: 4px solid var(--color-success);
}

.summary-item.negative {
    border-left: 4px solid var(--color-danger);
}

/* Settings Sections */
.settings-sections {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.settings-section {
    background: var(--color-bg);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.break-rules-table {
    margin-bottom: 20px;
}

.info-text {
    margin-top: 10px;
    color: var(--color-text-light);
    font-size: 0.875rem;
}

.no-entries {
    text-align: center;
    padding: 40px;
    color: var(--color-text-light);
}

.entries-list {
    margin-top: 30px;
}

.positive {
    color: var(--color-success);
    font-weight: 500;
}

.negative {
    color: var(--color-danger);
    font-weight: 500;
}

/* Status-Spalte für Actions */
.status-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.status-actions > div:first-child {
    font-weight: 500;
}

.action-buttons {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.btn-icon:hover {
    background-color: var(--color-bg-light);
}

.btn-holiday:hover {
    background-color: #fef3c7;
}

.btn-add-booking:hover {
    background-color: #dbeafe;
}

.btn-remove-holiday:hover {
    background-color: #fee2e2;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    overflow-y: auto;
    overflow-x: hidden;
}

.modal-overlay.show {
    display: block;
}

.modal-dialog {
    position: relative;
    margin: 5vh auto;
    background-color: var(--color-bg);
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--color-border);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--color-text);
}

.modal-close {
    background: none;
    border: none;
    color: var(--color-text-light);
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-close:hover {
    color: var(--color-text);
    background-color: var(--color-bg-light);
}

.modal-form {
    padding: 25px;
}

.modal-form .form-hint {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 16px;
    line-height: 1.4;
}

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

.modal-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--color-text);
}

.modal-form input[type="time"],
.modal-form input[type="text"],
.modal-form input[type="datetime-local"],
.modal-form select,
.modal-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.modal-form input[type="time"]:focus,
.modal-form input[type="text"]:focus,
.modal-form input[type="datetime-local"]:focus,
.modal-form select:focus,
.modal-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Content Section */
.content-section {
    background: var(--color-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.content-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

.content-section h3 {
    margin-top: 25px;
    margin-bottom: 15px;
}

.content-section ul {
    margin: 15px 0;
    padding-left: 25px;
}

.content-section li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.content-section code {
    background: var(--color-bg-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--color-primary);
}

/* Footer */
.site-footer {
    margin-top: 50px;
    padding: 30px 20px;
    border-top: 1px solid var(--color-border);
    background-color: var(--color-bg-light);
    width: 100%;
    box-sizing: border-box;
    clear: both;
    display: block !important;
    position: relative;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    text-align: center;
}

.footer-links,
.footer-center,
.footer-copyright {
    flex: 0 0 auto;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--color-primary);
}

.footer-separator {
    color: var(--color-text-light);
}

.footer-center {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

.footer-copyright {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

.footer-home a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-home a:hover {
    color: var(--color-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .page-header {
        margin-bottom: 20px;
        flex-wrap: wrap;
    }
    
    .header-title-section {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .header-nav {
        width: 100%;
        justify-content: flex-end;
    }
    
    .burger-menu-content {
        right: -10px;
        min-width: 180px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .page-subtitle {
        font-size: 0.9rem;
    }
    
    .filter-form,
    .settings-form {
        flex-direction: column;
    }
    
    .filter-form label,
    .settings-form label {
        min-width: 100%;
    }
    
    table {
        font-size: 0.875rem;
    }
    
    th, td {
        padding: 8px;
    }
    
    .summary-box {
        flex-direction: column;
    }
    
    .btn-come,
    .btn-go {
        font-size: 1.2rem;
        padding: 15px 30px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}
