/* Admin Panel Styles */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-dark);
    font-size: 1.8rem;
}

.login-box h2 i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.login-note {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: center;
}

/* Admin Dashboard */
.admin-dashboard {
    min-height: 100vh;
    background-color: var(--bg-light);
}

.admin-header {
    background: white;
    box-shadow: var(--shadow);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

.admin-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-header h1 {
    font-size: 1.8rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-header h1 i {
    color: var(--primary-color);
}

.admin-actions {
    display: flex;
    gap: 1rem;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
    border: none;
    cursor: pointer;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* Admin Navigation */
.admin-nav {
    background: white;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.admin-nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
    padding: 0;
    margin: 0;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    text-decoration: none;
    color: var(--text-dark);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.admin-nav-link:hover,
.admin-nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: var(--bg-light);
}

.admin-nav-link i {
    font-size: 1.1rem;
}

/* Admin Content */
.admin-content {
    padding-bottom: 3rem;
}

.admin-tab {
    display: none;
}

.admin-tab.active {
    display: block;
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-section-header h2 {
    font-size: 1.8rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-section-header h2 i {
    color: var(--primary-color);
}

/* Form Container */
.form-container {
    margin-bottom: 2rem;
}

.form-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.form-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-light);
    font-size: 0.85rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Photo Input Group */
.photo-input-group {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: white;
}

.photo-input-group .photo-url {
    width: 100%;
    margin-top: 0.5rem;
}

.btn-remove-photo {
    padding: 0.75rem 1rem;
    background-color: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-remove-photo:hover {
    background-color: #dc2626;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Items List */
.items-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.item-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.item-card:hover {
    transform: translateY(-5px);
}

.item-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.item-content {
    padding: 1.5rem;
}

.item-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.item-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.btn-edit {
    flex: 1;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.btn-edit:hover {
    background-color: var(--primary-dark);
}

.btn-delete {
    flex: 1;
    padding: 0.5rem 1rem;
    background-color: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.btn-delete:hover {
    background-color: #dc2626;
}

/* Application Photos Preview */
.application-photos-preview {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.photo-preview {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid var(--border-color);
}

/* Empty State for Admin */
.items-list:empty::before {
    content: "No items added yet. Click 'Add New' to get started.";
    display: block;
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

/* Photo Upload Styles */
.photo-upload-options {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.upload-tabs {
    display: flex;
    background: var(--bg-light);
    border-bottom: 2px solid var(--border-color);
}

.upload-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.upload-tab.active {
    color: var(--primary-color);
    background: white;
    border-bottom-color: var(--primary-color);
}

.upload-content {
    padding: 1.5rem;
    background: white;
}

.upload-section {
    display: none;
}

.upload-section.active {
    display: block;
}

.photo-preview {
    margin-top: 1rem;
    text-align: center;
}

.photo-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    margin-bottom: 1rem;
}

.btn-crop {
    padding: 0.5rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.btn-crop:hover {
    background: var(--primary-dark);
}

.upload-tabs-small {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.upload-tab-small {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.upload-tab-small.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.photo-upload-wrapper {
    margin-top: 0.5rem;
}

.upload-section-small {
    display: none;
}

.upload-section-small.active {
    display: block;
}

.photo-preview-small {
    margin-top: 0.75rem;
    text-align: center;
}

.photo-preview-small img {
    max-width: 100%;
    max-height: 150px;
    border-radius: 6px;
    border: 2px solid var(--border-color);
    margin-bottom: 0.5rem;
}

.btn-crop-small {
    padding: 0.4rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-upload-photo {
    width: 100%;
}

/* Crop Modal */
.crop-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.crop-modal-content {
    background: white;
    border-radius: 15px;
    max-width: 90%;
    max-height: 90vh;
    width: 800px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.crop-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.crop-modal-header h3 {
    margin: 0;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.crop-modal-header h3 i {
    color: var(--primary-color);
}

.close-crop-modal {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.close-crop-modal:hover {
    color: var(--text-dark);
}

.crop-modal-body {
    padding: 1.5rem;
    overflow: auto;
}

.crop-container {
    width: 100%;
    max-height: 60vh;
    margin-bottom: 1.5rem;
    text-align: center;
}

.crop-container img {
    max-width: 100%;
    max-height: 60vh;
}

.crop-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-nav-menu {
        flex-direction: column;
    }

    .admin-nav-link {
        border-bottom: none;
        border-left: 3px solid transparent;
    }

    .admin-nav-link.active {
        border-left-color: var(--primary-color);
        border-bottom-color: transparent;
    }

    .admin-section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .items-list {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }
}

