:root {
    --primary: #007AFF;
    --primary-hover: #0063cc;
    --bg: #f2f2f7;
    --card-bg: #ffffff;
    --text: #1c1c1e;
    --text-secondary: #8e8e93;
    --border: #d1d1d6;
    --success: #34c759;
    --danger: #ff3b30;
    --warning: #ff9500;
    --radius: 16px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

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

/* Header */
.header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 15px 0;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 20px;
    font-weight: 800;
    text-decoration: none;
    color: var(--text);
    background: linear-gradient(135deg, #007AFF, #00C6FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.02);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* Buttons */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 12px 24px;
    background-color: var(--primary);
    color: white;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    text-decoration: none;
    width: 100%;
}

.btn:active {
    transform: scale(0.98);
}

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

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

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

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

.form-input, .form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s;
    background: #f9f9f9;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
}

/* Grid */
.grid {
    display: grid;
    gap: 20px;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending { background: #fff3cd; color: #856404; }
.status-approved { background: #d4edda; color: #155724; }
.status-rejected { background: #f8d7da; color: #721c24; }

/* Admin Layout & Sidebar */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid #eee;
    padding: 20px;
    position: fixed;
    height: 100%;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.main-content {
    flex: 1;
    padding: 30px;
    margin-left: 260px;
    transition: margin-left 0.3s ease;
}

.nav-item {
    display: block;
    padding: 12px 15px;
    color: #666;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 5px;
    font-weight: 500;
}

.nav-item:hover, .nav-item.active {
    background: #eef2ff;
    color: #007AFF;
}

.nav-item.danger { color: #ff3b30; }
.nav-item.danger:hover { background: #fff0f0; }

.sidebar-toggle {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1001;
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    cursor: pointer;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 999;
}

/* Step Editor */
.step-item {
    background: #fff;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 15px;
    position: relative;
}

.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.step-controls button {
    margin-left: 5px;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 16px;
}

/* Upload Box */
.upload-box {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f9f9f9;
}
.upload-box:hover {
    border-color: var(--primary);
    background: #f0f7ff;
}
.upload-icon {
    font-size: 30px;
    margin-bottom: 10px;
}
.upload-text {
    color: var(--text-secondary);
}

/* Task Grid (Index) */
.task-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.task-card-img-container {
    height: 180px;
    background: #eee;
    position: relative;
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
    overflow: hidden;
}
.task-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.task-price-tag {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}
.task-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.task-title {
    font-size: 18px;
    margin-bottom: 10px;
    line-height: 1.4;
    font-weight: 600;
}
.task-desc {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 15px;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 260px;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 15px;
        padding-top: 60px; /* Space for toggle button */
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .grid {
        grid-template-columns: 1fr !important;
    }
}
