/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #06C755;
    --secondary-color: #00B900;
    --danger-color: #FF3B30;
    --success-color: #34C759;
    --text-primary: #1C1C1E;
    --text-secondary: #8E8E93;
    --bg-primary: #F2F2F7;
    --bg-secondary: #FFFFFF;
    --border-color: #E5E5EA;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

.page {
    min-height: 100vh;
    padding-bottom: 20px;
}

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

/* Loading Screen */
.loading-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: var(--bg-secondary);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Login Page */
.login-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 20px;
    text-align: center;
}

.logo h1 {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.logo p {
    color: var(--text-secondary);
    margin-bottom: 40px;
}

/* Header */
.header {
    background-color: var(--bg-secondary);
    padding: 15px 20px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

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

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info h3 {
    font-size: 16px;
    margin-bottom: 2px;
}

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

/* Card */
.card {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.card h2 {
    font-size: 20px;
    margin-bottom: 15px;
}

.card h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

/* Status Display */
.status-text {
    font-size: 18px;
    text-align: center;
    margin-bottom: 15px;
}

.status-text.success {
    color: var(--success-color);
    font-weight: 600;
}

.time-display,
.duration-display {
    text-align: center;
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.time-summary {
    background-color: var(--bg-primary);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.time-summary > div {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.time-summary > div:last-child {
    border-bottom: none;
}

.time-summary .label {
    font-weight: 600;
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.menu-item {
    background-color: var(--bg-primary);
    border: none;
    border-radius: 12px;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.menu-item .icon {
    font-size: 32px;
}

.menu-item span:last-child {
    font-size: 14px;
    font-weight: 500;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

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

.btn-primary:hover {
    background-color: var(--secondary-color);
}

.btn-secondary {
    background-color: var(--text-secondary);
    color: white;
}

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

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

.btn-lg {
    width: 100%;
    padding: 16px 24px;
    font-size: 18px;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
}

/* History List */
.history-item {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

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

.history-date {
    font-weight: 600;
    margin-bottom: 8px;
}

.history-details {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* Registration Success Modal */
.reg-success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.reg-success-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.reg-success-card {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 40px 32px 32px;
    width: 85%;
    max-width: 340px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: regSuccessPop 0.35s ease;
}

@keyframes regSuccessPop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.reg-success-icon {
    margin-bottom: 16px;
}

.reg-success-icon svg {
    width: 64px;
    height: 64px;
}

.reg-success-title {
    font-size: 22px;
    font-weight: 700;
    color: #1C1C1E;
    margin-bottom: 10px;
}

.reg-success-subtitle {
    font-size: 14px;
    color: #8E8E93;
    line-height: 1.6;
    margin-bottom: 28px;
}

.reg-success-btn {
    width: 100%;
    padding: 14px 24px;
    background: #22C55E;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.reg-success-btn:hover {
    background: #16A34A;
}
