/* Main content */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Top bar */
.top-bar {
    height: 70px;
    min-height: 70px;
    max-height: 70px;
    background-color: var(--color-bg-surface);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    padding: 0 30px;
    justify-content: space-between;
    flex-shrink: 0;
}

/* Sidebar toggle button (hidden on desktop) */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    color: var(--color-text-secondary);
    border-radius: 8px;
    transition:
        background-color 0.2s,
        color 0.2s;
    margin-right: 12px;
    flex-shrink: 0;
}

.sidebar-toggle:hover {
    background-color: var(--color-border);
    border-color: var(--color-border-medium);
}

.sidebar-toggle i {
    font-size: 20px;
}

/* Mobile responsive styles for top bar */
@media (max-width: 768px) {
    .top-bar {
        padding: 0 16px;
    }

    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.search-container {
    flex-grow: 1;
    max-width: 600px;
    position: relative;
    margin-right: 20px;
    display: flex;
    align-items: center;

    [dir="rtl"] & {
        margin-left: 20px;
        margin-right: unset;
    }
}

.search-container input {
    width: 100%;
    padding: 12px 50px 12px 44px;
    border-radius: 12px;
    border: 2px solid var(--color-border);
    background-color: var(--color-bg-input);
    font-size: 14px;
    height: 46px;
    color: var(--color-text-heading);
    transition: all 0.2s ease;
}

.search-container input:hover {
    border-color: var(--color-border-medium);
    background-color: var(--color-bg-surface);
}

.search-container input:focus {
    outline: none;
    border-color: var(--color-accent);
    background-color: var(--color-bg-surface);
    box-shadow: 0 0 0 4px var(--color-accent-ring);
}

.search-container input::placeholder {
    color: var(--color-text-placeholder);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-placeholder);
    font-size: 16px;
    pointer-events: none;
    transition: color 0.2s ease;

    [dir="rtl"] & {
        right: 16px;
        left: unset;
    }
}

.search-container input:focus + .search-icon,
.search-container:focus-within .search-icon {
    color: var(--color-accent);
}

.search-button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-accent-gradient);
    color: var(--color-danger-text);
    border: none;
    border-radius: 10px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px var(--color-accent-shadow);

    [dir="rtl"] & {
        left: 6px;
        right: unset;
    }
}

.search-button:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px var(--color-accent-shadow-lg);
}

.search-button:active {
    transform: translateY(-50%) scale(0.98);
}

.search-button i {
    font-size: 14px;
}

.user-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}
