/* Admin specific styling */
.admin-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-topbar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 32px;
    background-color: #000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.topbar-logo-container {
    position: absolute;
    left: 32px;
}

.horizontal-nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

.horizontal-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    /* Give it a default grey/dimmer color */
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.2s;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

.horizontal-nav .nav-item i {
    width: 20px;
    height: 20px;
    color: inherit;
    /* inherit from the parent color for generic icons */
}

/* Make both hover and active states pure white */
.horizontal-nav .nav-item:hover,
.horizontal-nav .nav-item.active {
    color: #ffffff;
    border-bottom: 2px solid #ffffff;
}

.horizontal-nav .nav-item[href="index.html"] {
    color: var(--text-secondary);
}

.horizontal-nav .nav-item[href="index.html"]:hover {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

.admin-container {
    padding: 40px 16px;
    flex: 1;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-top: 24px;
}

@media (min-width: 900px) {
    .admin-grid {
        grid-template-columns: 1fr 350px;
        align-items: start;
    }

    .list-section {
        order: -1;
    }
}

.admin-card {
    background-color: #111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px;
}

.admin-card h2 {
    font-size: 1.25rem;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    background-color: #000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
}

.form-group input:focus {
    border-color: var(--text-primary);
    outline: none;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
}

.checkbox-group input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.image-preview {
    margin-top: 8px;
    width: 100%;
    aspect-ratio: 1/1;
    background-color: #000;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    overflow: hidden;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.form-actions button {
    flex: 1;
    border: none;
    cursor: pointer;
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding: 16px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s;
    display: inline-block;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.hidden {
    display: none !important;
}

/* Table */
.table-container {
    overflow-x: auto;
}

.inventory-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
}

.inventory-table th,
.inventory-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.inventory-table th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.inventory-table td {
    vertical-align: middle;
}

.thumb-img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
}

.action-btns {
    display: flex;
    gap: 8px;
}

button.btn-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

button.btn-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

button.btn-icon.delete:hover {
    background-color: rgba(255, 50, 50, 0.2);
    color: #ff5555;
}

/* Tab System */
.admin-tab {
    display: none;
    animation: fadeIn 0.3s ease;
}

.admin-tab.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Home Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-card-title {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
}

.stat-card-value {
    font-size: 1.5rem;
    font-weight: 800;
}

.stat-card-trend {
    font-size: 0.8rem;
    color: #00ff00;
}

/* Customer Details Header */
.customer-header-card {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    background: #111;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 24px;
}

.clickable-row {
    cursor: pointer;
    transition: background 0.2s;
}

.clickable-row:hover {
    background-color: rgba(255, 255, 255, 0.05);
}