/* ============================================
   Admin Dashboard Styles
   ============================================ */

.admin-container {
    display: flex;
    min-height: 100vh;
    background: var(--bg-primary);
}

/* Sidebar */
.admin-sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 2px solid rgba(218, 165, 32, 0.2);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-logo {
    padding: 2rem 1.5rem;
    border-bottom: 2px solid rgba(218, 165, 32, 0.2);
}

.admin-logo h2 {
    background: var(--gradient-red-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.admin-logo p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.admin-nav {
    flex: 1;
    padding: 1rem 0;
}

.nav-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    text-align: left;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    border-left: 3px solid transparent;
}

.nav-btn:hover {
    background: rgba(218, 165, 32, 0.1);
    color: var(--accent-gold);
}

.nav-btn.active {
    background: rgba(218, 165, 32, 0.15);
    color: var(--accent-gold);
    border-left-color: var(--accent-gold);
}

.nav-btn span {
    font-size: 1.2rem;
}

.admin-footer {
    padding: 1.5rem;
    border-top: 2px solid rgba(218, 165, 32, 0.2);
}

.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
    display: block;
    padding: 0.5rem;
}

.back-link:hover {
    color: var(--accent-gold);
}

/* Main Content */
.admin-main {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
    min-height: 100vh;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(218, 165, 32, 0.2);
}

.admin-header h1 {
    color: var(--text-primary);
    font-size: 2rem;
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

/* Items Grid */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.item-card {
    background: var(--bg-secondary);
    border: 2px solid rgba(218, 165, 32, 0.3);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition-medium);
    position: relative;
}

.item-card:hover {
    border-color: var(--accent-gold);
    box-shadow: var(--glow-gold);
    transform: translateY(-4px);
}

.item-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.item-card-title {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.item-card-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit, .btn-delete {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition-fast);
}

.btn-edit {
    background: var(--accent-gold);
    color: var(--bg-primary);
}

.btn-edit:hover {
    background: var(--accent-bright-gold);
}

.btn-delete {
    background: var(--accent-red);
    color: var(--text-primary);
}

.btn-delete:hover {
    background: var(--accent-deep-red);
}

.item-card-image {
    width: 100%;
    height: 200px;
    background: var(--gradient-red-gold);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    object-fit: cover;
}

.item-card-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 2px solid var(--accent-gold);
    box-shadow: var(--glow-gold);
    padding: 2rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: var(--transition-fast);
    z-index: 10;
}

.modal-close:hover {
    background: var(--accent-red);
    transform: rotate(90deg);
}

.modal-body {
    padding-top: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 2px solid rgba(218, 165, 32, 0.3);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-secondary);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group small {
    display: block;
    color: var(--text-muted);
    margin-top: 0.25rem;
    font-size: 0.85rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(218, 165, 32, 0.2);
}

.btn-cancel {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 2px solid var(--text-muted);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-cancel:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

/* Login Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.login-box {
    background: var(--bg-secondary);
    border: 2px solid var(--accent-gold);
    border-radius: var(--radius-xl);
    padding: 3rem;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--glow-gold);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo h2 {
    background: var(--gradient-red-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.login-logo p {
    color: var(--text-secondary);
}

.login-box form {
    margin-bottom: 1.5rem;
}

.login-box .form-group {
    margin-bottom: 1.5rem;
}

.login-box input {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 2px solid rgba(218, 165, 32, 0.3);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
}

.login-box input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.2);
}

.login-error {
    color: var(--accent-red);
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    min-height: 1.5rem;
}

.login-info {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.login-info code {
    background: var(--bg-tertiary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: var(--accent-gold);
}

/* Settings Panel */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.settings-panel {
    background: var(--bg-secondary);
    border: 2px solid rgba(218, 165, 32, 0.3);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.settings-panel h2 {
    margin-bottom: 2rem;
    color: var(--accent-gold);
}

.setting-item {
    margin-bottom: 1.5rem;
}

.setting-item label {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.setting-item input,
.setting-item textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 2px solid rgba(218, 165, 32, 0.3);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
}

.setting-item input[type="color"] {
    height: 50px;
    cursor: pointer;
}

.setting-item input[type="range"] {
    width: 70%;
    margin-right: 1rem;
}

.setting-item input[type="number"] {
    width: 100px;
}

.setting-item span {
    color: var(--accent-gold);
    font-weight: 600;
}

.setting-item label input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
    cursor: pointer;
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

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

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 2px dashed rgba(218, 165, 32, 0.3);
    border-radius: var(--radius-lg);
}

/* Responsive */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .admin-main {
        margin-left: 0;
    }

    .items-grid {
        grid-template-columns: 1fr;
    }
}

