/* I AM GOOD - Professional Styles */

:root {
    --primary-green: #28a745;
    --primary-green-dark: #218838;
    --primary-green-light: #d4edda;
    --danger-red: #dc3545;
    --warning-yellow: #ffc107;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.15);
    --radius: 12px;
    --radius-sm: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* Card Styles */
.card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 30px;
    margin-bottom: 20px;
}

.card-header {
    text-align: center;
    margin-bottom: 25px;
}

.card-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.card-header p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Logo */
.logo {
    text-align: center;
    margin-bottom: 20px;
}

.logo-icon {
    font-size: 64px;
}

.logo-text {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-green), #20c997);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--primary-green-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-green);
    color: var(--primary-green);
}

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

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

.btn-danger:hover {
    background: #c82333;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Check-in Button */
.checkin-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 220px;
    height: 220px;
    margin: 30px auto;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-green), #20c997);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(40, 167, 69, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.checkin-button:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(40, 167, 69, 0.5);
}

.checkin-button:active {
    transform: scale(0.98);
}

.checkin-button.disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
}

.checkin-button .icon {
    font-size: 80px;
    margin-bottom: 10px;
}

.checkin-button .text {
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.checkin-button .subtext {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
    margin-top: 5px;
}

/* Success animation */
.checkin-button.success {
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-green);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 13px;
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.alert-success {
    background: var(--primary-green-light);
    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 #ffeeba;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.stat-item {
    background: var(--bg-light);
    padding: 15px;
    border-radius: var(--radius-sm);
    text-align: center;
}

.stat-item .value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-green);
}

.stat-item .label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Last Check-in Info */
.last-checkin {
    text-align: center;
    padding: 15px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    margin: 20px 0;
}

.last-checkin .time {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

.last-checkin .label {
    font-size: 13px;
    color: var(--text-muted);
}

/* Navigation */
.nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

/* Next-of-Kin List */
.nok-list {
    list-style: none;
    margin: 15px 0;
}

.nok-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
}

.nok-item .email {
    flex: 1;
    font-weight: 500;
}

.nok-item .remove-btn {
    background: var(--danger-red);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

/* History List */
.history-list {
    list-style: none;
    margin: 15px 0;
}

.history-item {
    padding: 15px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    border-left: 4px solid var(--primary-green);
}

.history-item .date {
    font-weight: 600;
    font-size: 16px;
}

.history-item .time {
    color: var(--text-muted);
    font-size: 14px;
}

.history-item .note,
.history-item .location {
    margin-top: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

.history-item .note strong,
.history-item .location strong {
    color: var(--text-dark);
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}

.modal-content h2 {
    margin-bottom: 15px;
}

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

.modal-actions .btn {
    flex: 1;
}

/* Landing Page */
.landing {
    text-align: center;
    padding: 40px 20px;
}

.landing h1 {
    font-size: 48px;
    font-weight: 800;
    color: white;
    margin-bottom: 15px;
}

.landing p {
    font-size: 18px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 30px;
}

.landing-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature {
    text-align: center;
    padding: 20px;
}

.feature .icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.feature h3 {
    margin-bottom: 8px;
}

.feature p {
    font-size: 14px;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    .card {
        padding: 20px;
    }

    .landing h1 {
        font-size: 36px;
    }

    .checkin-button {
        width: 180px;
        height: 180px;
    }

    .checkin-button .icon {
        font-size: 60px;
    }

    .checkin-button .text {
        font-size: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .nav {
        flex-direction: column;
    }
}

/* PWA Install Prompt */
.pwa-install {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    text-align: center;
    font-size: 14px;
}

.pwa-install strong {
    display: block;
    margin-bottom: 5px;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.hidden { display: none; }
