/* Main App Styles */
#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: #1976d2;
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: 56px;
    max-width: 768px;
    margin: 0 auto;
}

.back-btn {
    color: white;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.back-btn:hover {
    background-color: rgba(255,255,255,0.1);
}

.back-icon {
    font-size: 20px;
    font-weight: bold;
}

.header-title {
    font-size: 18px;
    font-weight: 500;
    flex: 1;
    text-align: center;
}

.header-right {
    width: 40px;
}

/* Main Content */
.main {
    flex: 1;
    position: relative;
    max-width: 768px;
    margin: 0 auto;
    width: 100%;
}

.page {
    min-height: calc(100vh - 56px);
    background: white;
}

.page-content {
    padding: 16px;
}

/* Welcome Section */
.welcome-section {
    text-align: center;
    padding: 24px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 24px;
}

.welcome-section h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 8px;
}

.welcome-section p {
    color: #666;
    font-size: 14px;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.page-header h2 {
    font-size: 20px;
    color: #333;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 16px;
    color: #999;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 14px;
    line-height: 1.5;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s;
    flex: 1;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: #1976d2;
    color: white;
}

.btn-primary:hover {
    background: #1565c0;
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
    min-height: 32px;
    flex: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #f0f0f0;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.card-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.card-subtitle {
    font-size: 12px;
    color: #999;
}

.card-meta {
    font-size: 12px;
    color: #666;
    text-align: right;
}

.card-content {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    font-size: 12px;
    color: #999;
}

/* Form Styles */
.form {
    max-width: 100%;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background: #fff;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #1976d2;
}

.form-hint {
    margin-top: 4px;
    font-size: 12px;
    color: #999;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 12px 20px;
    border-radius: 24px;
    font-size: 14px;
    z-index: 1001;
    animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; transform: translateX(-50%) translateY(10px); }
    10%, 90% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        padding: 0 12px;
    }
    
    .page-content {
        padding: 12px;
    }
    
    .welcome-section {
        padding: 16px 0;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

@media (min-width: 769px) {
    .main {
        padding: 20px;
    }
    
    .page {
        border-radius: 12px;
        box-shadow: 0 4px 24px rgba(0,0,0,0.1);
        min-height: calc(100vh - 96px);
    }
}