/* M-L Build Clock System - Styles */

/* ==================== */
/* Base Styles */
/* ==================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --success-color: #16a34a;
    --danger-color: #dc2626;
    --warning-color: #ea580c;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    background: var(--bg-light);
    line-height: 1.6;
}

/* ==================== */
/* Container & Layout */
/* ==================== */

.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mobile-container {
    max-width: 100%;
    min-height: 100vh;
    background: var(--bg-light);
}

/* ==================== */
/* Logo & Branding */
/* ==================== */

.logo {
    text-align: center;
    margin-bottom: 2rem;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.logo p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ==================== */
/* Cards */
/* ==================== */

.card, .welcome-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.welcome-card {
    text-align: center;
}

.welcome-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.welcome-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ==================== */
/* Forms */
/* ==================== */

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ==================== */
/* Buttons */
/* ==================== */

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-block {
    width: 100%;
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.5rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==================== */
/* Clock Button (Large) */
/* ==================== */

.btn-clock {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 4px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem auto;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow-lg);
}

.btn-clock-in {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.btn-clock-in:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 15px 25px rgba(22, 163, 74, 0.3);
}

.btn-clock-out {
    background: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
}

.btn-clock-out:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 15px 25px rgba(220, 38, 38, 0.3);
}

/* ==================== */
/* Mobile Header */
/* ==================== */

.mobile-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-header h1 {
    font-size: 1.25rem;
}

.user-name {
    font-size: 0.9rem;
    opacity: 0.9;
}

.mobile-header .btn-text {
    color: white;
}

/* ==================== */
/* Status Card */
/* ==================== */

.status-card {
    background: var(--bg-white);
    padding: 1.5rem;
    margin: 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-indicator.clocked-in .status-dot {
    background: var(--success-color);
}

.status-indicator.clocked-out .status-dot {
    background: var(--text-secondary);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.time-display {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin: 1rem 0;
}

/* ==================== */
/* Action Section */
/* ==================== */

.action-section {
    padding: 1rem;
}

.action-section label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* ==================== */
/* Summary Card */
/* ==================== */

.summary-card {
    background: var(--bg-white);
    padding: 1.5rem;
    margin: 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.summary-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.summary-grid {
    display: grid;
    gap: 0.75rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item .label {
    color: var(--text-secondary);
}

.summary-item .value {
    font-weight: 600;
    color: var(--text-primary);
}

/* ==================== */
/* Recent Entries */
/* ==================== */

.recent-entries {
    background: var(--bg-white);
    padding: 1.5rem;
    margin: 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.recent-entries h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.recent-entry {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.recent-entry:last-child {
    border-bottom: none;
}

.entry-time {
    font-weight: 500;
    color: var(--text-primary);
}

.entry-project {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.entry-duration {
    font-weight: 600;
    color: var(--primary-color);
}

/* ==================== */
/* Alerts & Messages */
/* ==================== */

.error {
    background: #fee2e2;
    color: var(--danger-color);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid var(--danger-color);
}

.success {
    background: #dcfce7;
    color: var(--success-color);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid var(--success-color);
}

.warning {
    background: #fed7aa;
    color: var(--warning-color);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid var(--warning-color);
}

/* ==================== */
/* Utilities */
/* ==================== */

.text-muted {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.text-center {
    text-align: center;
}

.info {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.info a {
    color: var(--primary-color);
    text-decoration: none;
}

.info a:hover {
    text-decoration: underline;
}

/* ==================== */
/* Responsive */
/* ==================== */

@media (max-width: 640px) {
    .container {
        padding: 1rem 0.5rem;
    }

    .card, .welcome-card {
        padding: 1.5rem;
    }

    .btn-clock {
        width: 180px;
        height: 180px;
        font-size: 1.1rem;
    }

    .logo h1 {
        font-size: 1.75rem;
    }
}

/* Prevent zoom on input focus (iOS) */
@media screen and (max-width: 767px) {
    input, select, textarea {
        font-size: 16px !important;
    }
}
