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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}

.logo {
    text-align: center;
    color: white;
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

h1, h2, h3 {
    color: #333;
    margin-bottom: 20px;
}

.timer-display {
    text-align: center;
    padding: 40px 20px;
}

.timer-time {
    font-size: 64px;
    font-weight: bold;
    color: #667eea;
    font-variant-numeric: tabular-nums;
    margin-bottom: 20px;
}

.timer-date {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

.balance-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.balance-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.balance-value {
    font-size: 42px;
    font-weight: bold;
}

.balance-hours {
    font-size: 16px;
    opacity: 0.9;
}

.today-stats {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
}

.stat {
    text-align: center;
}

.stat-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

button {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #10b981;
    color: white;
}

.btn-primary:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-secondary {
    background: #6b7280;
    color: white;
    margin-top: 10px;
}

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

input, select, textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 15px;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
}

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

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab {
    flex: 1;
    padding: 12px;
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #6b7280;
}

.tab.active {
    background: #667eea;
    color: white;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

.entry-list {
    max-height: 400px;
    overflow-y: auto;
}

.entry-item {
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.entry-date {
    font-weight: bold;
    color: #333;
}

.entry-hours {
    color: #667eea;
    font-weight: bold;
}

.entry-type {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.login-form {
    text-align: center;
}

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

.message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.message.success {
    background: #d1fae5;
    color: #065f46;
}

.message.error {
    background: #fee2e2;
    color: #991b1b;
}

.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

.quick-btn {
    padding: 12px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

.quick-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

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

label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}

.week-summary, .month-summary {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background: #fafafa;
}

.week-header, .month-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.week-title, .month-title {
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

.week-balance, .month-balance {
    font-weight: bold;
    font-size: 18px;
}

.week-balance.positive, .month-balance.positive {
    color: #10b981;
}

.week-balance.negative, .month-balance.negative {
    color: #ef4444;
}

.week-stats, .month-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    font-size: 14px;
}

.week-stat, .month-stat {
    text-align: center;
    padding: 10px;
    background: white;
    border-radius: 6px;
}

.week-stat-label, .month-stat-label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
}

.week-stat-value, .month-stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.period-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.period-selector select, .period-selector input {
    flex: 1;
    margin-bottom: 0;
}

.btn-small {
    padding: 10px 16px;
    width: auto;
    font-size: 14px;
}

.daily-row {
    display: grid;
    grid-template-columns: 140px 80px 80px 80px 100px 1fr;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    align-items: center;
    font-size: 14px;
}

.daily-row:hover {
    background: #f9fafb;
}

.daily-row.weekend {
    background: #f3f4f6;
}

.daily-row.today {
    background: #e0e7ff;
}

.daily-header {
    display: grid;
    grid-template-columns: 140px 80px 80px 80px 100px 1fr;
    gap: 10px;
    padding: 12px;
    background: #f3f4f6;
    font-weight: bold;
    border-radius: 8px 8px 0 0;
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
}

.daily-date {
    font-weight: 600;
}

.daily-weekday {
    color: #666;
    font-size: 12px;
}

.daily-hours {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.daily-balance {
    text-align: right;
    font-weight: bold;
    font-variant-numeric: tabular-nums;
}

.daily-balance.positive {
    color: #10b981;
}

.daily-balance.negative {
    color: #ef4444;
}

.daily-actions {
    display: flex;
    gap: 5px;
}

.btn-edit, .btn-delete {
    padding: 5px 10px;
    font-size: 12px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 4px;
    cursor: pointer;
}

.btn-edit:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.btn-delete:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.daily-note {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.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: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 2px solid #e5e7eb;
}

.modal-header h2 {
    margin: 0;
}

.modal-close {
    font-size: 32px;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 30px;
}

.modal-entry {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}

.modal-time-row {
    display: grid;
    grid-template-columns: 1fr 1fr 100px;
    gap: 10px;
}

.modal-hours-row {
    display: grid;
    grid-template-columns: 150px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-actions button {
    flex: 1;
}

.entry-type-select {
    margin-bottom: 15px;
}
