/* ========================================
   Gym City – Admin Panel Styles
   ======================================== */

/* Admin Trigger Button */
.admin-trigger {
    cursor: pointer;
    opacity: 0.3;
    transition: opacity 0.3s;
    font-size: 0.75rem;
}
.admin-trigger:hover { opacity: 1; }

/* Admin Overlay */
.admin-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.admin-overlay.open {
    display: flex;
    align-items: center;
    justify-content: center;
}
.admin-overlay.visible { opacity: 1; }

/* Login Card */
.admin-login {
    background: #111;
    border: 1px solid #333;
    border-radius: 16px;
    padding: 40px;
    width: 90%;
    max-width: 400px;
    text-align: center;
}
.admin-login h2 {
    font-family: 'Teko', sans-serif;
    font-size: 2rem;
    color: #00ff66;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.admin-login p {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 24px;
}
.admin-login input {
    width: 100%;
    padding: 12px 16px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    margin-bottom: 16px;
    transition: border-color 0.3s;
}
.admin-login input:focus { border-color: #00ff66; }
.admin-login .login-btn {
    width: 100%;
    padding: 12px;
    background: #00ff66;
    color: #0a0a0a;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: background 0.3s;
}
.admin-login .login-btn:hover { background: #fff; }
.admin-login .login-error {
    color: #ff4444;
    font-size: 0.8rem;
    margin-top: 12px;
    display: none;
}

/* Dashboard */
.admin-dashboard {
    display: none;
    width: 95%;
    max-width: 1100px;
    height: 90vh;
    background: #0d0d0d;
    border: 1px solid #222;
    border-radius: 16px;
    overflow: hidden;
}
.admin-dashboard.active { display: flex; }

/* Dashboard Header */
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: #111;
    border-bottom: 1px solid #222;
}
.admin-header h2 {
    font-family: 'Teko', sans-serif;
    font-size: 1.5rem;
    color: #00ff66;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
}
.admin-close-btn {
    background: none;
    border: 1px solid #333;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.admin-close-btn:hover { border-color: #ff4444; color: #ff4444; }

/* Dashboard Body */
.admin-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.admin-sidebar {
    width: 200px;
    background: #111;
    border-right: 1px solid #222;
    padding: 16px 0;
    overflow-y: auto;
    flex-shrink: 0;
}
.admin-sidebar button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 20px;
    background: none;
    border: none;
    color: #888;
    font-size: 0.85rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}
.admin-sidebar button:hover { color: #fff; background: #1a1a1a; }
.admin-sidebar button.active {
    color: #00ff66;
    background: rgba(0,255,102,0.05);
    border-left-color: #00ff66;
}
.admin-sidebar button i { width: 18px; text-align: center; }

/* Content Area */
.admin-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}
.admin-content::-webkit-scrollbar { width: 6px; }
.admin-content::-webkit-scrollbar-track { background: #0d0d0d; }
.admin-content::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

/* Tab Content */
.admin-tab { display: none; }
.admin-tab.active { display: block; }
.admin-tab h3 {
    font-family: 'Teko', sans-serif;
    font-size: 1.5rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #222;
}

/* Form Elements */
.admin-field {
    margin-bottom: 18px;
}
.admin-field label {
    display: block;
    color: #aaa;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    font-weight: 600;
}
.admin-field input,
.admin-field textarea {
    width: 100%;
    padding: 10px 14px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    font-family: 'Outfit', sans-serif;
    transition: border-color 0.3s;
}
.admin-field input:focus,
.admin-field textarea:focus { border-color: #00ff66; }
.admin-field textarea { resize: vertical; min-height: 80px; }

/* Cards for items */
.admin-item-card {
    background: #151515;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: border-color 0.3s;
}
.admin-item-card:hover { border-color: #444; }
.admin-item-card .item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.admin-item-card .item-header span {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
}
.admin-item-card .item-actions {
    display: flex;
    gap: 8px;
}

/* Buttons */
.admin-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.admin-btn-green {
    background: #00ff66;
    color: #0a0a0a;
}
.admin-btn-green:hover { background: #00dd55; }
.admin-btn-red {
    background: transparent;
    color: #ff4444;
    border: 1px solid #ff4444;
}
.admin-btn-red:hover { background: #ff4444; color: #fff; }
.admin-btn-outline {
    background: transparent;
    color: #00ff66;
    border: 1px solid #00ff66;
}
.admin-btn-outline:hover { background: #00ff66; color: #0a0a0a; }

.admin-save-bar {
    padding: 16px 24px;
    background: #111;
    border-top: 1px solid #222;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.admin-save-bar .save-btn {
    padding: 10px 32px;
    background: #00ff66;
    color: #0a0a0a;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s;
}
.admin-save-bar .save-btn:hover { background: #fff; transform: translateY(-1px); }
.admin-save-bar .save-status {
    color: #888;
    font-size: 0.8rem;
}

/* Image preview grid */
.admin-img-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.admin-img-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #333;
}
.admin-img-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.admin-img-item .img-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(255,68,68,0.9);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}
.admin-img-item:hover .img-remove { opacity: 1; }

/* Toast */
.admin-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #00ff66;
    color: #0a0a0a;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    z-index: 10001;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 20px rgba(0,255,102,0.3);
}
.admin-toast.show { transform: translateX(-50%) translateY(0); }

/* Add Item Row */
.admin-add-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    align-items: flex-end;
}
.admin-add-row .admin-field { flex: 1; margin-bottom: 0; }

/* Plan row layout */
.plan-fields {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-dashboard { height: 95vh; width: 98%; flex-direction: column; }
    .admin-body { flex-direction: column; }
    .admin-sidebar {
        width: 100%;
        flex-direction: row;
        display: flex;
        overflow-x: auto;
        padding: 0;
        border-right: none;
        border-bottom: 1px solid #222;
        flex-shrink: 0;
    }
    .admin-sidebar button {
        flex-shrink: 0;
        padding: 10px 14px;
        font-size: 0.75rem;
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
    }
    .admin-sidebar button.active {
        border-left-color: transparent;
        border-bottom-color: #00ff66;
    }
    .admin-content { padding: 16px; }
    .plan-fields { grid-template-columns: 1fr; }
    .admin-add-row { flex-direction: column; }
}

/* Browse Button styling */
.admin-browse-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid #00ff66;
    color: #00ff66;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    user-select: none;
}
.admin-browse-btn:hover {
    background: #00ff66;
    color: #0a0a0a;
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.3);
}

