/*==================================================================
  HR TIME CLOCK - MOBILE-FIRST STYLES
==================================================================*/

/* ===== CSS VARIABLES ===== */
:root {
    --primary-green: #4a7c23;
    --primary-green-dark: #2d5016;
    --accent-yellow: #FFD700;
    --danger-red: #dc3545;
    --text-dark: #11185F;
    --bg-light: #f5f5f5;
    --white: #ffffff;
    --gray-light: #e9ecef;
    --gray-medium: #6c757d;
}

/* ===== GLOBAL RESETS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== CONTAINER ===== */
.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 15px;
}

/* ===== HEADER ===== */
.header {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    color: var(--white);
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
}

.header p {
    margin: 5px 0 0 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ===== USER INFO BAR ===== */
.user-info {
    background: var(--white);
    padding: 15px 20px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info .name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.user-info .emp-number {
    font-size: 0.85rem;
    color: var(--gray-medium);
}

.logout-btn {
    background: transparent;
    border: 1px solid var(--danger-red);
    color: var(--danger-red);
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: var(--danger-red);
    color: var(--white);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    padding: 20px 0;
}

/* ===== CLOCK DISPLAY ===== */
.clock-display {
    background: var(--white);
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.current-time {
    font-size: 3rem;
    font-weight: 300;
    color: var(--text-dark);
    margin: 10px 0;
    font-variant-numeric: tabular-nums;
}

.current-date {
    font-size: 1.1rem;
    color: var(--gray-medium);
    margin-bottom: 20px;
}

/* ===== STATUS INDICATOR ===== */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    margin: 10px 0;
}

.status-indicator.not-clocked-in {
    background: #f8d7da;
    color: #721c24;
}

.status-indicator.working {
    background: #d4edda;
    color: #155724;
}

.status-indicator.on-break {
    background: #fff3cd;
    color: #856404;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.red {
    background: #dc3545;
}

.status-dot.green {
    background: #28a745;
    animation: pulse 2s infinite;
}

.status-dot.yellow {
    background: #ffc107;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ===== TIME WORKED DISPLAY ===== */
.time-worked {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    color: var(--white);
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(74, 124, 35, 0.3);
}

.time-worked-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

.time-worked-value {
    font-size: 3.5rem;
    font-weight: 300;
    font-variant-numeric: tabular-nums;
}

.time-worked-details {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.time-detail {
    text-align: center;
}

.time-detail-label {
    font-size: 0.8rem;
    opacity: 0.8;
}

.time-detail-value {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 5px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    width: 100%;
    margin: 10px 0;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-clock-in {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: var(--white);
}

.btn-clock-in:hover, .btn-clock-in:active {
    background: linear-gradient(135deg, #1e7e34 0%, #155724 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.btn-clock-out {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: var(--white);
}

.btn-clock-out:hover, .btn-clock-out:active {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.btn-break-start {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #333;
}

.btn-break-start:hover, .btn-break-start:active {
    background: linear-gradient(135deg, #e0a800 0%, #d39e00 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.btn-break-end {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: var(--white);
}

.btn-break-end:hover, .btn-break-end:active {
    background: linear-gradient(135deg, #1e7e34 0%, #155724 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: var(--white);
    color: var(--text-dark);
    border: 2px solid var(--gray-light);
    box-shadow: none;
    min-height: auto;
}

.btn-secondary:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
}

/* Ensure buttons are touch-friendly (44x44px minimum) */
@media (max-width: 768px) {
    .btn {
        min-height: 60px;
        font-size: 1.2rem;
    }
}

/* ===== BUTTON GRID ===== */
.button-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
}

.button-grid .btn {
    margin: 0;
}

/* ===== CARDS ===== */
.card {
    background: var(--white);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gray-light);
}

.card-content {
    line-height: 1.8;
}

/* ===== SUMMARY STATS ===== */
.summary-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
}

.stat-box {
    background: var(--white);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-medium);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-green);
}

/* ===== FORM ELEMENTS ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(74, 124, 35, 0.1);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* ===== ALERTS ===== */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ===== NAVIGATION LINKS ===== */
.nav-links {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.nav-links a {
    flex: 1;
    text-align: center;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 20px;
    color: var(--gray-medium);
    font-size: 0.9rem;
    margin-top: 40px;
}

/* ===== LOADING SPINNER ===== */
.spinner {
    border: 3px solid var(--gray-light);
    border-top: 3px solid var(--primary-green);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (min-width: 768px) {
    .container {
        max-width: 700px;
    }
    
    .button-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none !important;
}

/* ===== PRINT STYLES ===== */
@media print {
    .header, .user-info, .btn, .logout-btn, .nav-links {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .card, .clock-display, .time-worked {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}








