/* CheckInNow - Professional Styles */
:root {
    --primary-red: #E63946;
    --dark-red: #C1121F;
    --black: #1A1A1A;
    --dark-grey: #2D2D2D;
    --medium-grey: #4A4A4A;
    --light-grey: #E0E0E0;
    --off-white: #F8F9FA;
    --white: #FFFFFF;
    --success: #28A745;
    --shadow: 0 10px 40px rgba(0,0,0,0.2);
    --shadow-soft: 0 4px 15px rgba(0,0,0,0.1);
}

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

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

/* Container */
.app-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.card {
    background: var(--white);
    border-radius: 24px;
    padding: 40px 30px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-red), var(--dark-red));
}

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

.logo-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    box-shadow: 0 8px 25px rgba(230, 57, 70, 0.3);
}

.logo-icon svg {
    width: 36px;
    height: 36px;
    fill: var(--white);
}

.logo h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--black);
    letter-spacing: -0.5px;
}

.logo p {
    color: var(--medium-grey);
    font-size: 14px;
    margin-top: 5px;
}

/* User Bar */
.user-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--off-white);
    border-radius: 12px;
    margin-bottom: 25px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--white);
    font-size: 16px;
}

.user-name {
    font-weight: 600;
    color: var(--black);
}

.user-role {
    font-size: 12px;
    color: var(--medium-grey);
}

.logout-btn {
    color: var(--medium-grey);
    text-decoration: none;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: var(--light-grey);
    color: var(--dark-red);
}

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

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

.form-control {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--light-grey);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s;
    background: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.1);
}

.form-control::placeholder {
    color: #B0B0B0;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    color: var(--white);
    box-shadow: 0 8px 25px rgba(230, 57, 70, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(230, 57, 70, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--off-white);
    color: var(--dark-grey);
}

.btn-secondary:hover {
    background: var(--light-grey);
}

.btn-success {
    background: linear-gradient(135deg, #28A745, #20913A);
    color: var(--white);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.btn-large {
    padding: 20px;
    font-size: 18px;
    border-radius: 16px;
}

.btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Main Action Button */
.main-action {
    text-align: center;
    padding: 20px 0;
}

.main-action h2 {
    font-size: 20px;
    color: var(--black);
    margin-bottom: 10px;
}

.main-action p {
    color: var(--medium-grey);
    font-size: 14px;
    margin-bottom: 25px;
}

.checkin-btn {
    width: 100%;
    padding: 25px;
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    color: var(--white);
    border: none;
    border-radius: 20px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    box-shadow: 0 10px 40px rgba(230, 57, 70, 0.4);
    transition: all 0.3s;
    text-decoration: none;
}

.checkin-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(230, 57, 70, 0.5);
}

.checkin-btn svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

/* Caption Selection */
.caption-section {
    margin-top: 30px;
}

.caption-section h3 {
    font-size: 16px;
    color: var(--black);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.caption-list {
    max-height: 250px;
    overflow-y: auto;
    border: 2px solid var(--light-grey);
    border-radius: 16px;
    margin-bottom: 15px;
}

.caption-item {
    padding: 14px 18px;
    border-bottom: 1px solid var(--light-grey);
    cursor: pointer;
    font-size: 14px;
    color: var(--dark-grey);
    transition: all 0.2s;
}

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

.caption-item:hover {
    background: var(--off-white);
}

.caption-item.selected {
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.1), rgba(193, 18, 31, 0.1));
    color: var(--dark-red);
    font-weight: 500;
}

.custom-caption {
    margin-top: 15px;
}

.custom-caption label {
    font-size: 13px;
    color: var(--medium-grey);
    margin-bottom: 8px;
    display: block;
}

.custom-caption textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--light-grey);
    border-radius: 12px;
    font-size: 14px;
    resize: none;
    font-family: inherit;
    transition: all 0.3s;
}

.custom-caption textarea:focus {
    outline: none;
    border-color: var(--primary-red);
}

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: #FFEBEE;
    color: #C62828;
    border: 1px solid #FFCDD2;
}

.alert-success {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #C8E6C9;
}

.alert-info {
    background: #E3F2FD;
    color: #1565C0;
    border: 1px solid #BBDEFB;
}

/* Links */
.text-link {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 500;
}

.text-link:hover {
    text-decoration: underline;
}

.footer-links {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--light-grey);
}

.footer-links a {
    color: var(--medium-grey);
    text-decoration: none;
    font-size: 14px;
    margin: 0 10px;
}

.footer-links a:hover {
    color: var(--primary-red);
}

/* Success Screen */
.success-screen {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--success), #20913A);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    box-shadow: 0 10px 40px rgba(40, 167, 69, 0.3);
}

.success-icon svg {
    width: 50px;
    height: 50px;
    fill: var(--white);
}

.success-screen h2 {
    font-size: 24px;
    color: var(--black);
    margin-bottom: 10px;
}

.success-screen p {
    color: var(--medium-grey);
    margin-bottom: 25px;
}

.success-details {
    background: var(--off-white);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: left;
}

.success-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--light-grey);
    font-size: 14px;
}

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

.success-detail-item .label {
    color: var(--medium-grey);
}

.success-detail-item .value {
    color: var(--black);
    font-weight: 600;
}

/* Dashboard Styles */
.dashboard-header {
    background: linear-gradient(135deg, var(--black), var(--dark-grey));
    color: var(--white);
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 25px;
}

.dashboard-header h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

.dashboard-header p {
    opacity: 0.7;
    font-size: 14px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: var(--white);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-red);
}

.stat-label {
    font-size: 13px;
    color: var(--medium-grey);
    margin-top: 5px;
}

.checkin-list {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.checkin-list-header {
    padding: 20px;
    border-bottom: 2px solid var(--light-grey);
    font-weight: 600;
    color: var(--black);
}

.checkin-item {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--light-grey);
}

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

.checkin-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.1), rgba(193, 18, 31, 0.1));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 20px;
}

.checkin-details {
    flex: 1;
}

.checkin-name {
    font-weight: 600;
    color: var(--black);
    margin-bottom: 3px;
}

.checkin-meta {
    font-size: 13px;
    color: var(--medium-grey);
}

.checkin-time {
    text-align: right;
    font-size: 12px;
    color: var(--medium-grey);
}

/* Location Badge */
.location-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--off-white);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--dark-grey);
    margin-top: 10px;
}

.location-badge svg {
    width: 14px;
    height: 14px;
    fill: var(--primary-red);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .card {
        padding: 30px 20px;
        border-radius: 20px;
    }
    
    .logo-icon {
        width: 60px;
        height: 60px;
    }
    
    .logo h1 {
        font-size: 22px;
    }
    
    .checkin-btn {
        padding: 20px;
        font-size: 18px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Pulse Animation */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
