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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: #f5f5f5;
    padding-top: 60px;
    padding-bottom: 80px;
}

/* ========== HEADER ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #415742 0%, #1a3d2f 100%);
    color: white;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    max-width: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.company-logo {
    height: 45px;
    width: auto;
}

.app-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.header-user {
    font-size: 0.875rem;
    opacity: 0.9;
}

.user-info {
    font-size: 0.9rem;
}

.user-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

/* ========== BOTTOM NAVIGATION ========== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    z-index: 1000;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.5rem;
    text-decoration: none;
    color: #6b7280;
    transition: color 0.2s;
    flex: 1;
    max-width: 100px;
}

.nav-item svg {
    stroke: currentColor;
}

.nav-item span {
    font-size: 0.7rem;
    font-weight: 500;
}

.nav-item.active {
    color: #2d5a3d;
}

.nav-item:hover {
    color: #2d5a3d;
}

/* ========== CONTAINER ========== */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1.25rem;
}

/* ========== CARDS ========== */
.card {
    background: white;
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.work-order-card {
    background: white;
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #415742;
}

.summary-card {
    background: white;
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #415742;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* ========== PRIORITY BADGES ========== */
.priority {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.priority-critical { background: #fee; color: #c33; }
.priority-high { background: #fef3cd; color: #856404; }
.priority-medium { background: #d1ecf1; color: #0c5460; }
.priority-low { background: #d4edda; color: #155724; }

/* ========== TYPOGRAPHY ========== */
h2 {
    color: #415742;
    margin-bottom: 1rem;
}

.property-info, .property-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.property-title {
    font-size: 1.3rem;
}

.description {
    color: #666;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.due-date {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 1rem;
}

.section-title {
    color: #415742;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.subtitle {
    color: #666;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

/* ========== INFO ROWS ========== */
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #888;
    font-size: 0.9rem;
}

.info-value {
    color: #333;
    font-weight: 500;
}

/* ========== CLOCK STATUS ========== */
.clock-status {
    text-align: center;
    padding: 2rem;
}

.status-label {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: #666;
}

.clock-time {
    font-size: 3rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    margin-bottom: 0.5rem;
}

.clock-since {
    color: #888;
    margin-bottom: 1.5rem;
}

.clocked-in .status-label {
    color: #2d5a3d;
}

/* ========== TIMER STYLES ========== */
.timer-card {
    background: linear-gradient(135deg, #415742 0%, #1a3d2f 100%);
    color: white;
    text-align: center;
}

.timer-display {
    font-size: 3rem;
    font-weight: 300;
    margin: 1.5rem 0;
    font-variant-numeric: tabular-nums;
}

.timer-status {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.timer-status.running {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

/* ========== BUTTONS ========== */
.btn {
    width: 100%;
    padding: 0.875rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: scale(0.98);
}

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

.btn-primary:hover {
    background: #1a3d2f;
    box-shadow: 0 5px 20px rgba(45, 95, 77, 0.4);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-start {
    background: white;
    color: #415742;
    padding: 1rem;
}

.btn-stop {
    background: #dc3545;
    color: white;
    padding: 1rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.25rem;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
}

.btn-group .btn {
    flex: 1;
    padding: 0.75rem;
}

.back-btn, .logout-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
}

.back-btn {
    padding: 0.5rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

/* ========== FORMS ========== */
.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
    font-size: 0.9rem;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="number"],
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
textarea:focus {
    outline: none;
    border-color: #415742;
}

textarea {
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 0.75rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-col {
    flex: 1;
}

.form-col label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-col input {
    width: 100%;
}

.date-filter-form .form-row:last-child {
    display: flex;
    gap: 0.75rem;
}

.date-filter-form .btn {
    flex: 1;
}

.add-note-form, .add-mileage-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #f0f0f0;
}

/* ========== TIME ENTRIES ========== */
.time-entry {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.time-entry:last-child {
    border-bottom: none;
}

.time-entry-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.time-entry-name {
    font-weight: 600;
    color: #333;
}

.time-entry-duration {
    color: #415742;
    font-weight: 600;
}

.time-entry-dates {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.time-entry-notes {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.total-time {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 1rem;
}

.total-time-label {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 0.25rem;
}

.total-time-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #415742;
}

/* ========== MILEAGE ========== */
.mileage-entry {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.mileage-entry:last-child {
    border-bottom: none;
}

.mileage-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.mileage-name {
    font-weight: 600;
    color: #333;
}

.mileage-miles {
    color: #415742;
    font-weight: 600;
    font-size: 1.1rem;
}

.mileage-details {
    font-size: 0.9rem;
}

.mileage-date {
    color: #888;
    margin-bottom: 0.25rem;
}

.mileage-route {
    color: #666;
    margin-bottom: 0.25rem;
}

.mileage-odometer {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.mileage-notes {
    color: #666;
    font-style: italic;
    margin-top: 0.25rem;
}

.total-mileage {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.total-mileage-label {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 0.25rem;
}

.total-mileage-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #415742;
}

/* ========== NOTES ========== */
.note-item {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.note-item:last-child {
    border-bottom: none;
}

.note-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.note-author {
    font-weight: 600;
    color: #333;
}

.note-date {
    font-size: 0.85rem;
    color: #888;
}

.note-text {
    color: #666;
    line-height: 1.5;
}

/* ========== ADMIN DASHBOARD ========== */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.summary-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.summary-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.summary-stat {
    flex: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #415742;
}

.summary-meta {
    font-size: 0.85rem;
    color: #666;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f0f0;
}

.tech-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #f0f0f0;
}

.tech-section:last-child {
    border-bottom: none;
}

.tech-section-title {
    color: #415742;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.detail-subsection {
    margin-bottom: 1.5rem;
}

.detail-subsection h4 {
    color: #666;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
}

.detail-table th,
.detail-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.detail-table th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #666;
    background: #f9f9f9;
}

.detail-table tr:hover {
    background: #fafafa;
}

.notes-cell {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

/* ========== EMPTY STATES ========== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    font-style: italic;
}

/* ========== ERROR MESSAGES ========== */
.error {
    background: #fee;
    color: #c33;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

/* ========== LOGIN PAGE ========== */
body.login-page {
    background: linear-gradient(135deg, #415742 0%, #1a3d2f 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

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

.login-container h1 {
    color: #415742;
    font-size: 1.95rem;
    text-align: center;
}

.login-container .logo {
    text-align: center;
}

.login-container .logo img {
    max-width: 190px;
    height: auto;
}


.test-info {
    margin-top: 2rem;
    padding: 1rem;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #666;
}

.test-info strong {
    color: #415742;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .detail-table {
        font-size: 0.8rem;
    }
    
    .detail-table th,
    .detail-table td {
        padding: 0.5rem 0.25rem;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
}
